tamfb
neo
Joined: 09/09/2013 04:03:02
Messages: 1
Offline
|
Hi 4ndrew,
The P2P APIs have not been exposed in the more recent versions of the JavaScript API, because the alternative delivery mechanisms of channels, queues and datagroups provide a simpler and more efficient means of achieving the old P2P functionality, without the need to familiarise oneself with additional API methods.
The original P2P functionality did not implement direct client-to-client communication; all communication using the P2P API took place via the server (i.e. client -> server -> serviceprocess -> server -> client).
With the current API, this is analogous to, for example, using a queue to hold client messages, and to have a second process consuming these messages and publishing appropriate responses to the client, either via another queue, or via a channel or a datagroup. An example of such a system can be found at:
Requester: http://um.terracotta.org/developers/nirvana/enterprise/java/examples/?example=Requester
Responder: http://um.terracotta.org/developers/nirvana/enterprise/java/examples/?example=Responder
Using the old P2P API, the "serviceprocess" mentioned above was typically implemented using one of the enterprise APIs (e.g. Java), and would correspond to the "Responder" in the above example.
The "Requester" in this particular example is also implemented in Java, but the same thing can easily be implemented as a JavaScript client that publishes and subscribes to queues in the same way.
Apologies for the confusion caused by old documentation still existing on the current website; we will get this tidied up immediately!
|