The idea is to integrate luvmonkey into b2g so that apps have a local backend that's just as robust and can share code with the remote web servers.
Local servers can't be running for all apps all the time because of memory constraints. A mobile phone may have 100 apps installed and that would use more ram than the phone has (at least 5-10mb each).
We could have options where an app declared it's desired lifespan (all the time, start on app launch, end on app close, etc) The user of the device would need a way to manage this as well if there were too many misbehaving apps and memory ran out.
The javascript in the UI side needs a way to access the local servers. This could be done with special routing at the gecko level that matches app ids to local ports.
So suppose I have an app installed from http://todos.gaiamobile.org/manifest.json, would the root of my local http server be exposed at local://todos.gaiamobile.org/ ?
How much do we trust these local node processes. Should we limit their permissions so that it's safe to install any app just like it's safe to browse to any website or should we give them full access and leave it up to the user to trust the apps?
Also for purposes of playing nice with other local servers, should we give each one a custom port or something so that the browser side knows how to route to it?