[erlang-questions] [ANN] N2O Announcement

Maxim Sokhatsky <>
Thu Aug 15 12:35:53 CEST 2013


Greetings to All!

We are happy to announce that experimental fork of N2O is quite stable to be announced. Let us introduce the reason of refreshing Nitrogen. During our Erlang activities of creating a couple of complex Erlang Web projects we discovered that Nitrogen is extremely useful and productive not only among Erlang frameworks, but even comparable to known modern Web frameworks: https://gist.github.com/5HT/5522302
However, we have discovered the Nitrogen limitations on speed, process registration gaps and technology lock with XHR. So we decided to fork and broke the compatibility with Nitrogen saving the general DSL approach and event system. So if your want to try Nitrogen you will have all the benefits of it with N2O too. Let us state new core features:

* WebSockets from the ground up with fallback to XHR using Bullet
* REST modules handlers using code from FarWest
* Control Events for custom JavaScript controls
* New Editor Elements like Medium.js and TinyMCE
* GProc "comet" registrations and Pub/Sub
* Proper ID instead of class attributes
* Erlang on Xen compatible with instructions of how to install on Xen
* DTL templates instead of Nitrogen slow templates
* Compatible enough to port Nitrogen sites
* Bootstrap and LESS styles boilerplate

Some legacy code is completely removed and simplified for speed:

* simple_bridge removed
* nprocreg removed
* rendering simplified
* framework code reduced to 3000 LOC.

Since one of our goals was to create the fastest web framework in all 7 levels (routing, query, session, templates, dsl, html rendering and javascript rendering) we tuned it up, reaching 15K Req/s (on the same machine raw cowboy yields 30K and raw nginx 60K). We don't send any JS on a first page load, and all JS comes on WebSockets afterwards, so the page is possible to render in one RTT -- in that way we reduced latency.

Big news for MVC fans. From now on you can mix DSL and MVC separation with linking DSL controls by an ID that will produce only JS code and will not produce HTML. HTML could be served statically and variables could be picked up from cookies in JS code (this is experimental at the moment).

But that is not all. We’ve also created a KVS data model framework where you can store all the data with commonly known KV stores: Riak and Mnesia. The data model includes Users, Group, Subscriptions, Likes, Products, Accounts, Transactions, Payments, Purchases, Feeds, ACL, Entries, Comments. You can store those entities in Mnesia and Riak in an abstract manner. More KV databases are to come along with SQL backends.

Here are come sample sites built with N2O:

http://igratch.synrc.com/
http://skyline.synrc.com/

Sources: https://github.com/5HT/n2o
Documentation: http://synrc.com/framework/web/ 		 	   		  


More information about the erlang-questions mailing list