TMemoryBuffer is not designed with shared memory in mind. It's just
meant to be a way to capture the transport output as a byte[].
Are you using Linux? If so, an easy way to do shared memory might be
to use /dev/shm with TFDTransport.
-Bryan
On Apr 14, 2009, at 2:50 AM, Yordan Pavlov wrote:
Hi,
i am new to Thrift and currently getting used to it. One of the
benefits of the platform seem to be the ability to easily change the
transport used. To test that out I want to use shared memory instead
of sockets. Is TMemoryBuffer supposed to be used in my case and if
yes, how exactly. The class offers some read() and write() methods but
does not in any way implement coherent memory access. Am I supposed to
use TMemoryBuffer and implement myself the shared memory part? If yes
I would kindly ask for some ideas or third party libraries which can
help in shared memory access from programs written in different
languages.
I guess the answer to this question will be pretty much the same if
asked for the other transports like TFDTransport. Once again am i
right?
Thanks in advance :)