如何在这个系统内沟通? [英] How to communicate within this system?

查看:169
本文介绍了如何在这个系统内沟通?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们打算设计一个具有三个层的系统。


  1. HQ,单个服务器

  2. / li>




$ b

HQ与用户双向通信的节点进行双向通信。用户从不与总部通信,反之亦然。



从HQ(使用Delphi)判定Windows应用程序的权力和用户iPad的本机桌面应用程序。他们对节点没有意见。



如果有令人信服的技术论据,我可能能够在Windows程序中将其从命令降低到喜欢 (和,为了等于,使其基于浏览器)。节点没有GUI,他们只是坐在那里玩中间人。



这些事情最好的沟通方式是什么(SOAP / HTTP / AJAX / jQuery / home- brewed-protocol-on-top-of-TCP / something-else?)最好使用相同的协议端到端,还是使用不同的hq - 节点和节点 - iPad的协议? >

这两个接口中的每一个的两端可能希望启动一个事务(如果我自己的协议滚动我可以轻松做到),所以我应该使用push / pull /投票或什么?



我希望这个描述是有道理的。请问如果没有的话。谢谢。






更新:

文件大小通常低于1MB没有可能超过10MB甚至5MB。在第一个文件被确认之前,不会发送第二个文件。



文件流程从下坡从HQ到节点到iPad。文件永远不会流动上坡,但会有一些小数据包(除了acks),这些数据是由iPad上的用户操作启动的。这些将转到本地节点,然后到总部。我们可能在说< 128字节。



我想也会有一般控制&

解决方案

对于推/拉(发布/订阅或对等通信)可以使用跨平台的消息代理。我不确定Microsoft Message Queue(MSMQ)是否有(iOS)客户端库,但我也会评估开源解决方案,如 HornetQ Apache ActiveMQ Apollo OpenMQ ,Apache QPid RabbitMQ



所有这些解决方案为分布式消息传递提供了可靠的基础,如故障转移,集群,持久性,高性能和许多客户端。可以交换任何内容类型(JSON,二进制,纯文本)的基础架构消息,顶层消息可以包含路由和优先级信息。他们还支持事务消息传递。



有Delphi和Free Pascal 客户端图书馆可用于许多企业级的开源消息产品。 (我是其中一些的作者,支持ActiveMQ,Apollo,HornetQ,OpenMQ和RabbitMQ)


We intend to design a system with three "tiers".

  1. HQ, with a single server
  2. lots of "nodes" on a regional basis
  3. users, with iPads.

HQ communicates 2-way with the nodes which communciate 2-way with the users. Users never communicate with HQ nor vice-versa.

The powers that be decree a Windows app from HQ (using Delphi) and a native desktop app for the users' iPads. They have no opinion on the nodes.

If there are compelling technical arguments, I might be able to beat them down from "decree" to "prefer" on the Windows program (and, for isntance, make it browser based). The nodes have no GUI, they just sit there playing middle-man.

What's the best way for these things to communicate (SOAP/HTTP/AJAX/jQuery/home-brewed-protocol-on-top-of-TCP/something-else?) Is it best to use the same protocol end to end, or different protocols for hq<-->node and node<-->iPad?

Both ends of each of those two interfaces might wish to initiate a transaction (which I can easily do if I roll my own protocol), so should I use push/pull/long-poll or what?

I hope that this description makes sense. Please ask questions if it does not. Thanks.


Update:
File size is typcially below 1MB with nothing likely to be above 10MB or even 5MB. No second file will be sent before a first file is acknowledged.

Files flow "downhill" from HQ to node to iPad. Files will never flow "uphill", but there will be some small packets of data (in addition to acks) which are initiated by user action on the iPad. These will go to the local node and then to the HQ. We are probably talking <128 bytes.

I suppose there will also be general control & maintenance traffic at a low rate, in all directions.

解决方案

For push / pull (publish / subscribe or peer to peer communication), cross-platform message brokers could be used. I am not sure if there are (iOS) client libraries for Microsoft Message Queue (MSMQ), but I would also evaluate open source solutions like HornetQ, Apache ActiveMQ, Apollo, OpenMQ, Apache QPid or RabbitMQ.

All these solutions provide a reliable foundation for distributed messaging, like failover, clustering, persistence, with high performance and many clients attached. On this infrastructure message with any content type (JSON, binary, plain text) can be exchanged, and on top messages can contain routing and priority information. They also support transacted messaging.

There are Delphi and Free Pascal client libraries available for many enterprise quality open source messaging products. (I am am the author of some of them, supporting ActiveMQ, Apollo, HornetQ, OpenMQ and RabbitMQ)

这篇关于如何在这个系统内沟通?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆