C++:云计算库:有没有这样一个库,我不需要写太多网络东西?
我希望我的服务器应用程序能够发送数据以供一堆不同的客户端处理,然后将处理后的数据返回到服务器。
理想情况下,我会有一些像 some_process = send_to_client_for_calculate(connection, data)
这样的调用,
我只需要能够向客户端发送一堆数据,告诉客户端要做什么(最好是在相同的消息,可以使用数组 [命令,数据] 来完成,然后返回数据...
我正在分解神经网络的各个部分(非常大),然后将它们全部组装起来。
如果我需要更清楚,请告诉我如何做。
I want my server app to be able to send data to be processed by a bunch of various clients, and then have the processed data returned to the server.
Ideally, I'd have some call like some_process = send_to_client_for_calculating(connection, data)
I just need to be able to send a bunch of data to a client, tell the client what to do (preferably in the same message, which can be done with an array [command, data]), and then return the data...
I'm breaking up pieces of a neural network (tis very large), and then assembling them all later.
If I need to be clearer, let me know how.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我很震惊没有人把它扔在那里...... boost::asio。
I'm shocked no one has thrown it out there... how about boost::asio.
为什么不看看如何使用 Apache ActiveMQ 呢?它是一个 Java JMS 服务器,但它具有 C++ 绑定,并且只需编写最少的网络代码即可完成您想要的操作。您基本上只是订阅消息,然后发回回复。 MQ 服务器负责为您处理调度和消息持久性。
Why don't you have a look at using Apache ActiveMQ? It's a Java JMS server, but it has C++ bindings, and does what you want with a minimum of writing networking code. You basically just subscribe to messages, and send responses back. The MQ server takes care of dispatch and message persistence for you.
您可以尝试使用 beanstalkd,一个快速工作队列。不知道是否符合你的目的。有一个用 C 编写的 客户端库,您应该能够从 C++ 中使用它。
You could try using beanstalkd, a fast working queue. I don't know if it fits your purposes. There is a client library written in C, which you should be able to use from C++.
我建议查看 gSOAP,它用 C++ 实现 SOAP,包括网络。
I'd suggest looking at gSOAP, which implements SOAP in C++, including networking.