Java Servlets   «Prev 

Stateful Exchange using Java Servlets

Binary Wire Protocol

The HTTP-NG team proposed the Binary Wire Protocol to enhance how the next generation HTTP protocol supports remote operations. HTTP-NG defines object types and assigns each object type a list of methods. Each object type is assigned a URI, so its description and methods can be advertised. In this way, HTTP-NG is proposing a more extensible and object-oriented execution model than that provided with HTTP/1.1, where all methods were statically defined in the servers.
The Binary Wire Protocol carries operation-invocation requests from the client to the server and operation-result replies from the server to the client across a stateful connection. The stateful connection provides extra efficiency. Request messages contain the operation, the target object, and optional data values. Reply messages carry back the termination status of the operation, the serial number of the matching request (allowing arbitrary ordering of parallel requests and responses), and optional return values. In addition to request and reply messages, this protocol defines several internal control messages used to improve the efficiency and robustness of the connection.


Stateful exchange translation using Servlets

1) Stateful Exchange of information
1) Stateful Exchange of information: Your phone rings.

2) You say Hello
2) You say Hello

3) Hey Kate its great to hear your voice
3) Hey Kate its great to hear your voice

4) Hang on I will look
4) Hang on I will look

5) Sorry she changed it a while ago
5) Sorry she changed it a while ago

6) Sure. Talk to you soon.
6) Sure. Talk to you soon.