C++/Java serialization library suitable for socket stream?

不想你离开。 提交于 2020-01-04 09:19:31

问题


I need to write a server in C++/Obj-C that can receive streamed data from several clients built in Java and C++. The challenge: I need to serialize and deserialize the data structures efficiently. One C++ client will be generating 128x96x2-dimensional float arrays, plus some metadata, about 30 times per second (video features). A Java client will be generating a smaller feature vector -- probably 200 values, 1-10 times per second. I've about resigned myself to rolling my own implementation, but before I do, I'd like to ask recommendations.


回答1:


Google Protocol Buffers supports your required languages and streaming of serialized data structures, but I am not sure how you would best handle those large arrays. There is some ongoing work here in this area of protobuf for Java - background here.

With this in mind, you might be able to produce something that works using Java and C++ protobuf, with custom code in C++ to handle the Java array encoding in that branch.



来源:https://stackoverflow.com/questions/4178075/c-java-serialization-library-suitable-for-socket-stream

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!