跨平台实时数据

发布于 2024-10-10 06:34:53 字数 246 浏览 12 评论 0原文

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

我应该实现 ActiveMQ 或 Tibco 之类的东西,还是应该有其他更好用的解决方案?

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.

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

分分钟 2024-10-17 06:34:53

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

HTTP 是一种通过 TCP 套接字工作的传输协议。所以,HTTP 也是套接字。为您提供安全性的是对您发送的内容进行加密。 SSL 就是答案。使用 HTTPS 确保您的应用程序安全。

现在关于排队。需要排队来解耦信息的传递及其处理。这对于您的情况来说是更可取的,因为处理可能需要时间,并且您不希望在服务器处理数据时阻止发送者(移动设备)。我建议您使用消息代理的开源实现(如 ActiveMQ、RabitQ、Qpid 等)。 Tibco 很完美,但要花一些钱。如果您打算使用 Java 消息代理,也可以在 Java 中实现您的服务器,并使用所有消息代理都支持的 JMS API。

我希望这有帮助。

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 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.

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.

I hope this helps.

醉城メ夜风 2024-10-17 06:34:53

选项 1:

通过 HTTPS 和 T 秒计时器的 RSS 消息格式。
HTTPS 是基于 SSL 套接字的加密传输协议(也用于电子银行)。

选项 2:

通过 HTTPS 和 T 秒计时器进行 REST。
对于自定义 REST 协议来说,基于二进制而不是像 Http 这样基于文本是一件好事吗?

选项 3:

踢 HTTP 服务器、php 并在 Java 中使用 SSL 套接字。< br>
http://stilius.net/java/java_ssl.php

Option 1:

RSS message format via HTTPS and T second timer.
HTTPS is cryptographic transfer protocol over SSL sockets (also used by e-banking).

Option 2:

REST via HTTPS and T second timer.
Is it a good thing for a custom rest protocol to be binary based instead of text based like Http?

Option 3:

Kicking HTTP server, php and using SSL sockets in Java.
http://stilius.net/java/java_ssl.php

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文