RNet is a NodeJS powered websocket/datachannel routing library with unified browserify client-code that's both NodeJS and browser-compatible. It uses a process called 'bootsnapping', in which a HTTP page-request is routed through executed client code on the server. This in-server 'bootsnap' client picks up the requested URI, routes it, and produces a snapshot of the requested page in it's current dynamic state as if it were running in the browser. The resulting HTML is sent back to the client in the http-response.
This process is performed without a headless browser and performs extremely well using in-process messaging. It's so fast that it's being used as the default page renderer for users entering a RNet-powered website. The benefit of this bootsnapping approach is three-fold:
- SEO-crawlers can easily index your application's content without special measures
- Browsers automatically switch to a much faster SPA-mode once the websocket connection is up
RNet uses two modes of messaging. The most obvious one is the URI-based routing mechanism. This method fits well where the user is interacting with the application by clicking on links and buttons. These links are routed directly to a view handler. The second messaging mode is by emitting/listening for events. This is more useful for data-traffic that's not directly bound to a resource/view (like sdp or chat messaging).