What's the merit of DataPipe compared with MessagePipe?

15 views
Skip to first unread message

Leon

unread,
Jun 25, 2015, 11:15:40 PM6/25/15
to mojo...@chromium.org
Hi,

I read "Mojo IPC Primitives" document and investigated source codes around DataPipe.

"A DataPipe is a unidirectional communication channel, designed for efficient transfer of fixed size binary records."
I think that MessagePipe can also transfer binary data, then what does the "efficient transfer" mean here?

"DataPipe satisfies many use cases for shared memory."
Does it mean that DataPipe is not employing platform pipe channel to transfer data across processes just as MessagePipe? 
But I checked around DataPipe source codes and did not find any clue indicating it's employing share memory under hood.

Sorry have so many questions.. Thanks in advance~

Viet-Trung Luu

unread,
Jun 25, 2015, 11:22:02 PM6/25/15
to Leon, mojo...@chromium.org
Data pipes are not currently implemented using shared memory, but may be in the future. The semantics of data pipes are designed to make this possible. (Note that there are some small changes planned to the API, though it shouldn't negatively affect any users.)

Generally, data pipes should be used for bulk data transfer, and has, e.g., facilities to provide back pressure. Message pipes are designed for reliable, queued transfer of relatively small messages.
 

Sorry have so many questions.. Thanks in advance~

To unsubscribe from this group and stop receiving emails from it, send an email to mojo-dev+u...@chromium.org.

Leon

unread,
Jun 26, 2015, 1:34:05 AM6/26/15
to mojo...@chromium.org, leon...@intel.com, viettr...@chromium.org

Understood. Thanks a lot for kindly reply~
Reply all
Reply to author
Forward
0 new messages