- A general purpose asynchronous framework that uses an event based style for building highly scalable applications
- Runs on the JVM.
- Everything is non-blocking.
- Embraces the style of node.js and extends it to the JVM. Think node.js on steroids.
- Polyglot. The same (or similar) API will be available in multiple languages: Initially Ruby (JRuby), Groovy and Java and going ahead... JavaScript (Rhino/Nashorn), Python (Jython), Clojure, Scala etc.
- Goes with the recent developments with InvokeDynamic in Java 7 and bets on the JVM being the future premier runtime for dynamic languages.
- Enables you to create network servers or clients incredibly easily.
- True threading. Unlike node.js, Python Twisted or Ruby EventMachine, it has true multi-threaded scalability. No more spinning up 32 instances just to utilise the cores on your server.
- Incredibly simple concurrency model. Write your code as single threaded like node.js, watch it scale across multiple cores (unlike node.js)
- Understands multiple network protocols out of the box including: TCP, SSL, UDP, HTTP, HTTPS, Websockets
- Sendfile support for writing super scalable web servers
- Will provide plugins for talking AMQP, STOMP, Redis etc
- Provides an elegant api for composing asynchronous actions together. Glue together HTTP, AMQP, Redis or whatever in a few lines of code.
Take a look at some of these working Ruby examples to see the kind of things you can do with Node.x
We have finished the proof of concept, and work is now in progress for the 1.0 alpha release in a few months time
Node.x core is written in Java. We then provide a thin layer in each of the JVM languages we support which allows the API to be used in each of the supported languages.
We do not expose the Java API directly in the other languages since we wish to retain the normal coding idioms for each supported language.
We don't leak Java stuff to other languages through the API.
Node.x internally uses Netty for much of the asynchronous IO.
- Operating system: Node.x currently runs on Linux and OSX. If you're on Windows, create a Linux virtual machine using your favourite virtualisation software and use that.
- Apache ant - This is the build tool currently used. Make sure the ant bin directory is on your PATH.
- JDK, version 1.7.0 or later. You can use OpenJDK or the official Oracle JDK. Make sure the JDK bin directory is on your PATH.
- JRuby, version 1.6.4 or later. Make sure the JRuby bin directory is on your PATH
- Yard, for building the Ruby API documentation. To install yard 'jruby -S gem install rdiscount' followed by 'jruby -S gem install yard'
- Groovy. Make sure the Groovy bin directory is on your PATH.
From root directory 'ant'
- To build javadoc: 'ant javadoc'
- To build Ruby yard docs: 'ant yardoc'
- To run Java tests: 'ant javatests'
- To run Ruby tests: 'ant rubytests'
- To run all tests: 'ant tests'
From root directory 'ant dist'
The distro tar.gz will be created in the 'target' directory
First you will need to obtain a distro. Once we have done some releases you'll be able to obtain a pre-made distro and install that. But, it's early days, so for now, you will have to build one yourself. See the previous section for how to do that.
- Operating system: Node.x currently runs on Linux and OSX. If you're on Windows, create a Linux virtual machine using your favourite virtualisation software and use that.
- Everyone will need JDK, version 1.7.0 or later. You can use OpenJDK or the official Oracle JDK. Make sure the JDK bin directory is on your PATH.
If you're just using the Java API you just need the JDK installed. If you want to run the Java examples from the distro, you will need Apache ant installed too.
If you're using the Ruby API you will also need to install JRuby, version 1.6.4 or later. Make sure the JRuby bin directory is on your PATH
If you're using the Groovy API you will also need to install Groovy. Make sure the Groovy bin directory is on your PATH.
Unzip the distro somewhere, e.g. in your home directory
Make sure the bin directory from the distro is on your PATH.
From anywhere 'nodex-java -cp my_classpath org.foo.MyMainClass'
Where org.foo.MyMainClass is a fully qualified class name of your main class.
Where my_classpath is a classpath which allows org.foo.MyMainClass to be located along with any other dependencies of your application
The nodex-java basically takes the same params as the 'java' command
From anywhere 'nodex-ruby my_ruby_script.rb'
Where my_ruby_script.rb is the script to execute.
nodex-ruby takes the same arguments as the jruby command, so you can pass in -I etc as necessary, if you want to add extra stuff to the LOAD_PATH
TODO
Java examples are [here] (https://github.com/purplefox/node.x/tree/master/src/examples/java "Java examples")
Examples must be run from a distro. First install the distro, then cd to the examples/java directory.
Then read the README there.
Ruby examples are [here] (https://github.com/purplefox/node.x/tree/master/src/examples/ruby "Ruby examples")
Examples must be run from a distro. First install the distro, then cd to the examples/ruby directory.
Then read the README there.
There's an IRC channel at irc.freenode.net#nodex if you want to drop in to chat about any user or development topics
There is lots to do! Ping me twitter:@timfox, or drop a mail on the nodex-dev google group.