#1 2012-08-13 15:28:39

corchi72
Member
Registered: 2010-12-10
Posts: 232

I can send a message from a server to a specific client

I wrote a client / server and the server is a service.
Then I wrote a client that reads data from the server and processes them.
Now my requirement is if a client can communicate with another client directly or must pass through the server, if server communicate via a server how do I send a message to a particular client?

Sorry for the turn of phrase, but basically I do make a statement to a remote client. how can I do?

Client -> Server -> Client

thanks

Offline

#2 2012-08-14 07:18:44

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: I can send a message from a server to a specific client

The underlying architecture is STATELESS.
See the documentation about it.
So, in a stateless world, you should have several clients on the same server, with no expectation of the particular state of data.

If you want clients to be "synchronized", you should better do it with a state-less approach.
This can be done easily with the "Refreshing" methods of the framework, or with a dedicated service.

Of course, you can create a server instance on the client side, and allow direct connect from other clients, by-passing the main server.
mORMot allows you to create as many servers and clients as possible in the same process.
But you will need to open the port or register the HTTP binding with administrator rights on the client, and allow firewall, proxy and port forwarding on the network. Not an easy task for the customer!

So my advice in this case is to stick to the Stateless approach, and use the main server as the main synchronization point of all clients.
Trying to multiply the "servers" on the network is possible, but potentially much difficult to work with.

Offline

Board footer

Powered by FluxBB