RCWeb Live API
TargetR RCWeb Live is designed to control web pages using WebSockets and JavaScript.
The custom web server maintains connections to every web browser on the web site. Web pages are updated immediately by sending JavaScript from one web browser to another without refreshing the page.
Every web browser effectively becomes both a web server and a web client. Multiple web browsers displaying the same page share JavaScript actions to create a distributed system.
The web server is designed to primarily act as a proxy. JavaScript is sent between web browsers to update the page without the server needing to parse or understand the JavaScript. All state is managed by the web browsers themselves allowing the web server to be stateless and highly performant.
The project requires Java 21 because it uses virtual threads to handle many concurrent connections.
Project Architecture
The project is divided into two primary packages:
- net.targetr.wtm3: Web Traffic Manager 3. A custom, lightweight Java HTTP server built using virtual threads to efficiently handle many concurrent connections. It provides the foundation for routing, request handling, and secure TLS connections.
- net.targetr.rc: Remote Control Web. The application layer built on top of WTM3. It manages WebSocket connections and routes JavaScript commands between connected web clients in virtual rooms.