Archived
This forum has been archived. Please start a new discussion on GitHub.
C# and Protobuf
Hi team,
I am currently using protobuf with C++ base on the information from ZerocLab. I would like to add clients running on c# .NET communicate with C++ servers, base on the same protobuf.
As far as I understand I may reuse the same slice file and handle the message as raw buffer in C#. But it would be really nice I can have similar mechanism in the c# side as well.
Is it possible to build/wrap a similar streamhelper thing in c# side?
Raymond
I am currently using protobuf with C++ base on the information from ZerocLab. I would like to add clients running on c# .NET communicate with C++ servers, base on the same protobuf.
As far as I understand I may reuse the same slice file and handle the message as raw buffer in C#. But it would be really nice I can have similar mechanism in the c# side as well.
Is it possible to build/wrap a similar streamhelper thing in c# side?
Raymond
0
Comments
-
Hi Raymond,
It's currently not possible to setup helpers with Ice for C# to transparently serialize/de-serialize operation parameters with Protobuf. You will have to implement some wrappers manually to do this yourself. We will consider making this possible with Ice for C#.
Btw, which protobuf C# implementation do you use?
Cheers,
Benoit.0 -
Hi Benoit,
I plan to use protobuf-net on c# side for my project. actually my project will involve c# GUI and c++ server components. Will use ICE and ICEStorm for transportation and protobuf for messaging protocol.
Rgds,
RaycrayHi Raymond,
It's currently not possible to setup helpers with Ice for C# to transparently serialize/de-serialize operation parameters with Protobuf. You will have to implement some wrappers manually to do this yourself. We will consider making this possible with Ice for C#.
Btw, which protobuf C# implementation do you use?
Cheers,
Benoit.0 -
Hi,
Ok thanks for the information. Just out of curiosity, why did you choose to use protobuf instead of Slice types and the Ice encoding?
Cheers,
Benoit.0 -
Hi Benoit,
I did some benchmark about ICE vs protobuf messaging codec, I found protobuf give slightly higher throughput (with higher CPU usage as well). That's why I decided to use protobuf as messaging protocol.
Raymond0