Cross platform real-time-data

眉间皱痕 提交于 2019-12-11 17:16:29

问题


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?

Best regards,
Paul Peelen


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/4601898/cross-platform-real-time-data

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