Long Running Web Process in Java (
LRWPinJava) is an open source implementation of the Long Running Web Process (LRWP) using Java technology. LRWP is a protocol used by a web server to communicate with its peers. LRWP is similar to CGI, but faster, since the peer is persistent across requests. In LRWP, a TCP connection is established between the LRWP peer and a LRWP agent. The LRWP agent could be the web container or a process running within the web container and the LRWP peer could be any process running on a network. The LRWP peer at connection registers the web context that the peer is interested in. . When a request for that context is made, the agent transfers the input to the LRWP peer and sends the output from the peer back to the web client. The LRWP agent supports multiple peers concurrently.
The LRWP inJava has been implemented using Servlets (Glassfish container) leveraging the container multi-threading to support multiple peers concurrently. The implementation is light-weight and extremely fast. The performance of LRWP in Java is faster then the C implementation by 78% on a 4 core system in a real world C++ application.
LRWP in Java can be used to replace CGI-BIN applications. It can also be used by web 2.0 applications, C, /C++, Java, PHP and RUBY applications.