Eureca.io involves two main actors, a server and a client.
eureca.io is the central element of eureca.io. It contains the server side code, and is considered as the trusty entity. The server maintains references to each connected client, and allow you to call client exported methods.
eureca.io support two kinds of clients :
The clients are able to call all server exported methods.
Each eureca.io actor need to export functions to make them available for RPC.
Exporting functions is very simple, you only need to define them under "exports" namespace.
When the server exports a function, it's available to the client without further action.
when clients exporta function, it must be explicitly allowed in the server side.
Eureca.io can use various transport layers, this make it easy to switch from one library to another, compare performance and chose the right one. Supported transports are :
- socket.io (legacy)
Above transport all relies ont XHR or websocket and are reliable transport, they are perfect for applications. but eureca.io also support webRTC ! which can be used are reliable or unreliable transport making it ideal for games
Note: WebRTC support is still experimental and have a limitation, the server side WebRTC stack is only supported on linux throught wrtc
Each eureca.io actor expose events which allow you access high and low level features.