This post is just going over some of the technologies which will be used for the new webgui.
The current plan is to use Nettophere - which is Netty + Atmosphere.
Netty - is an excellent network implemntation 
Atmosphere - is supposed to create the "best connection" between browser & server with little work.

Above is just the default sample which comes with Nettosphere - a multi-player Snakes game - currently 3 browsers are playing.  

Next step would be to find the minimal amount dependencies

MaVo posted link to article about Atmosphere + AngularJS

Below I created an IFrame to the sandbox.  A place were we can try designs.  The general design is to have a large Desktop in a single browser tab. Each service will be a draggable & resizable element on that desktop.  You should be able to drag and move around the 2 Arduino services.

MaVo

9 years ago

dependencies of the newest version (2.3.0) of nettosphere:

as the pom of specifies them:

(nettosphere-2.3.0.jar)
atmosphere-runtime-2.3.0.jar
geronimo-servlet_3.0_spec-1.0.jar
logback-classic-1.0.13.jar
logback-core-1.0.13.jar
netty-3.10.0.Final.jar
slf4j-api-1.6.4.jar
 

what the snake example is distributed with:

atmosphere-runtime-2.3.0.jar
geronimo-servlet_3.0_spec-1.0.jar
jackson-annotations-2.4.0.jar              - is it required?
jackson-core-2.4.1.jar                            - is it required?
jackson-databind-2.4.1.jar                    - is it required?
javax.inject-1.jar                                       - is it required?
logback-classic-1.0.13.jar
logback-core-1.0.13.jar
nettosphere-2.3.0.jar
(nettosphere-games-2.3.0.jar)               - only providing an example, not required
netty-3.10.0.Final.jar
slf4j-api-1.6.1.jar

Jackson is a JSON stream parser - currently MRL uses gson .. would like to switch to jackson at some point - but we don't need both, so needs some coordination.

I like playing with the example game they have - just to see it run and view some of the runtime details.
I was shocked to see it keep spawning async threads when a client attached..  at first it looked like it was a bug and there was just an endless supply of threads being created.

 100s of threads ! When a single client attaches .. but after watching it run for a while, the threads stopped increasing until there was exactly 200 of them .. so some config somewhere gives you 200 Async Operation threads.  

When multiple clients attach there is no decrease nor increase of this thread count. However, when all clients detach you can see the thread count decrease until its 0 again.  The game seems to be responsive with a good amount of low latency through-put.