Giter VIP home page Giter VIP logo

vx-usergrid's Introduction

Sample App for Vert.x

This is a sample app using request routing from Usergrid. It demonstrates how you would build a dispatcher and an authentication mechanism (currently just stubbed out) using vert.x's built-in http server.

You must have the vert.x binary installed in order for this to work. see http://vertx.io/install.html for details.

Once installed, you can run this sample app by cloning this repository and running the following maven command: mvn vertx:run

(Kudos to @rhart for a vert.x maven plugin that just kind of worked.)

Once the sample app is running, the following are some sample URLs to try:

Permutations of org/app parsing from command line (we do a lot of this in Usergrid):

Authentication failure:

What happens when you throw an uncaught exception from a handler:

Poke around the source. There are a lot of notes via in-line and javadoc comments on my thoughts about how things would be built out (some of it specific to Usergrid, but most fairly general).

Overall this is a very intriguing framework with a bunch of potential and given its building blocks (Netty and Hazelcast) could be used in a production scenario right now as there is not very much code. However, after playing with this for a day, here are some things I'm not psyched about:

  • I don't like anonymous inner classes and not doing such makes it difficult to get at vert.x configuration and context information
  • Mocking connection plumbing is very difficult
  • Classloader isolation is agressive (exercise: try to acquire a logger from within one of the Handler implementations)

Overall I can't wait to see some performance numbers of this crushing node.js and similar. I've felt for a long time that Java's NIO (when properly done - like Netty) is basically unriviled in it's multi-core performance. It has been my goto when I want to get stuff done correctly. I'm happy to see it become 'cool' again.

vx-usergrid's People

Contributors

zznate avatar

Stargazers

Ed Anuff avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.