Glossary:
Nirvana JavaScript: Peer to Peer Service Clients
Nirvana provides a rich set of APIs that provide developers with the ability to create Peer to Peer (P2P) applications. We call these Peer to Peer applications Services. This guide will demonstrate how Nirvana Peer to Peer Services work, and provides examples code snippets for all relevant concepts.
P2P Service Components
There are two parts to a Peer to Peer Service in Nirvana: a Server Service and a Client. In JavaScript, only the client portion is available. To see more information about the Server service see the Peer to Peer sections of our the Java, C# or C++ Developer Guides.
A Nirvana Peer to Peer Client is a process that connects to a Nirvana Realm, obtains a reference to a Server Service and begins communicating with it.
When a Client connects to the Server Service, all communication between the Client and server sevice takes place through the Nirvana Realm, using Nirvana's standard communication protocols.
P2P Service Types
There are two types of Nirvana Peer to Peer Service Clients: Event-based (supported by all APIs including JavaScript) and Stream-based (for Enterprise APIs only).
Event-based Services
The Nirvana JavaScript API allows you to build JavaScript Nirvana Peer to Peer Clients for Event-based services.
Nirvana Peer to Peer Event-based Services communicate via events which are published by the Event-based Client, and received and responded to by the Event-based Server Service.
Examples
The following examples give methods needed to implement a client to work with Java, C# or C++ Server Service:
For more information on Nirvana Peer to Peer Services please see the API documentation.
