0

My requirement is to make RPC calls between different processes. By nature these calls are 1-1; meaning single sender single receiver. I am architecturally restricted to use only unix domain sockets for this purpose.

I wanted to use 'rpcgen' towards this end. But the problem is that rpcgen works over TCP/UDP as transport mechanisms. What i want is to run them over domain sockets. Given that they dont support it over domain sockets; i figured out to stub the transport routines with my own code after generation to accomplish what i need. But that does not look easy at all.

I explored an option where the generated XDR stream can be written to a local buffer which can then be transported that way i want it; ie. over domain sockets. May be i can retreive it at the remote end to make it work. This might involve another copy of data but performance is not my concern at this point in time.

Is there a readymade solution for this kind of problem? What are my best options here.

Thanks Sudarshan

isud
  • 11
  • 5
  • It's absolutely valid to use rpc over unix domain sockets. Try to use rpcgen with option '-n local' to generate corresponding stubs. – kofemann Dec 17 '13 at 07:34
  • Hi, I checked that this needs TI-RPC. It seems that the standard rpcgen tool doesnt support this. To be able to use TI-RPC, I would need libtirpc. Due to the need to support this on multiple platforms, it is not a straightforward choice for me. – isud Dec 17 '13 at 18:52
  • Is there a way to use the standard RPCGEN tool(also called TS-RPC) towards this end? – isud Dec 17 '13 at 18:53
  • Well, classic RPC is TCP and UDP based. TI-RPC stands for Transport Independent RPC. If you want to use unix domain socket, then you should use ti-rpc. TI-RPC exists for linux, solaris, windows and, probably, can be built for osx as well. – kofemann Dec 17 '13 at 20:10
  • Thanks for the response. But TI-RPC is not a part of the libc unlike the standard rpcgen. Since I need to have this run over multiple platforms, I need to cross compile the source of this tool for different platforms before I can use it. I will check it out. There are many source files in the package. As this is an embedded platform, the code size is a factor as well. Looks like I need to evaluate this tool before I use it! – isud Dec 18 '13 at 11:24

0 Answers0