Skip to content

zznate/vx-usergrid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

Sample vert.x application for Usergrid

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages