跨平台实时数据 [英] Cross platform real-time-data

查看:97
本文介绍了跨平台实时数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为特定类型的应用程序设计一个新平台。这些应用程序将主要存在于iOS和Android设备上。
这些应用程序的主要要求之一是同步实时数据并且安全。我的想法直接涉及到使用套接字的某种排队协议。
服务器的限制是必须使用Java或PHP编写。但是,客户端不受限制。就像我提到的那样,主要是iOS(Objective-C)和Android(Java)设备。

I am working on designing a new platform for a certain type of application. These applications will mainly exists on both iOS and Android devices. One of the main requirements in these applications is that is syncs real time data and is secure. My thought went directly to using some kind of queuing protocol using sockets. The restrictions on the server is that it would have to be written in either Java or PHP. However, the clients are unrestricted. Like I mentioned, mainly iOS (Objective-C) and Android (Java) devices.

我应该实现ActiveMQ还是Tibco之类的东西,还是应该使用其他解决方案呢?

Should I implement something like ActiveMQ or Tibco, or should are there any other solutions that might be better to use?

最好的问候,

Paul Peelen

Best regards,
Paul Peelen

推荐答案

最好的方法是通过HTTP使用RESTful API 。那些说套接字比HTTP更安全的人通常并不真正理解他们在说什么(什么都不是私有的,伙计。只有业务!)

The best way is using RESTful API over HTTP. People that say that sockets is more secure than HTTP usually do not really understand what are they speaking about (nothing private, man. Only business!)

HTTP是一种传输协议通过TCP套接字工作。因此,HTTP也是套接字。给您安全的是对发送内容的加密。 SSL是答案。用户HTTPS,以确保您的应用程序安全。

HTTP is a transport protocol that works over TCP sockets. So, HTTP is also sockets. What gives you security is encryption of what you are sending. SSL is the answer. User HTTPS to make your application secure.

现在开始排队。需要排队才能使信息传递及其处理脱钩。在您的情况下,这是可取的,因为处理可能会花费一些时间,并且您不想在服务器处理数据时阻止发件人(移动设备)。我建议您使用消息传递代理的开源实现(例如ActiveMQ,RabitQ,Qpid等)。 Tibco很完美,但要花一些钱。而且,如果您打算使用Java消息传递代理,则也要使用Java来实现服务器,并使用所有消息传递代理都支持的用户JMS API。

Now about queuing. Queuing is needed to decouple delivery of information and its processing. This is preferable in your case because processing may take time and you do not want to block the sender (mobile device) while server is processing the data. I'd suggest you to use open source implementation of messaging broker (like ActiveMQ, RabitQ, Qpid etc). Tibco is perfect but it costs some money. And if you are going towards Java messaging broker implement your server in java too and user JMS API that is supported by all messaging brokers.

我希望这会有所帮助。

这篇关于跨平台实时数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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