[Openais] Best solution for safe request / reply protocol

Steven Dake sdake at redhat.com
Mon Aug 21 13:45:44 PDT 2006


On Fri, 2006-08-18 at 16:05 +0200, Fabien THOMAS wrote:
> I would like to do a simple application to remotely execute an action  
> and wait for a result.

> I've seen some different messaging API in openais (evs, evt, msg) and  
> i would like to known what is the best method to do that.
> 

The best solution here is to use the MSG service for this task.
Unfortunately the MSG service is incomplete at this time and won't work
for your purpose.

Another option I suggest is to use the CPG service directly.  Have the
client and server join a cpg group (this is the channel).  Client sends
request.  When server receives request, it replies on the same process
group.  The process group id is stored in the reply message is used by
the client to determine if the reply is for itself or some other node.
The same thing could be done with the evs service.  Each message has a
header id which can be 0 = request 1 = reply.

Regards
-steve

> the protocol will look likes that:
> 
> client:
> 
> open channel to <id>
> send request (here i would like to be sure the message is delivered  
> but it seems that safe message is not implemented ?)
> wait for reply
> close channel
> 
> server:
> 
> create channel <id>
> loop:
> 	wait for request
> 	doit
> 	send reply
> 
> Maybe someone can help me to make the best choice.
> 
> Regards,
> Fabien
> _______________________________________________
> Openais mailing list
> Openais at lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/openais




More information about the Openais mailing list