本文介绍了本机应用程序到服务器的通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写一个移动交易应用(Android / IOS),我需要的最佳方式建议应用程序连接到服务器(的MessageQ)

I am writing a mobile trading app (android/ios) and i need suggestions on the best way to connect the app to the server (messageQ)


  • 如果我使用原始的TCP连接,将我的用户有一个问题,如果他们是落后企业的WiFi的(由防火墙保护)?如果是的话,在这种情况下,是网络插座一个更好的解决方案?

  • If i use raw TCP connection , would my users have a problem if they are behind corporate wifi's (protected by firewalls)? If yes, in that case, is web socket a better solution?

通过后端服务器,与zeroMq研究后,我相信像RabbitMQ的一个羽翼丰满的经纪人是一个更好的选择开始。现在,如果我使用从我的本机应用程序网络套接字连接,兔MQ有sockJS-AMQP的桥梁。但我不知道,如果有一个java和iOS的Web客户端的Socket说话sockJS服务器。
任何有经验的看法有很大的AP preciated

With the backend server, after researching with zeroMq, i believe a full fledged broker like rabbitmq is a better option to start with. Now , if i use a web socket connection from my native app, Rabbit MQ has a sockJS-AMQP bridge . But i am not sure, if there is a java and iOS web socket client to speak to sockJS server .Any experienced views is greatly appreciated

推荐答案

你有considerer使用MQTT?

Have you considerer to use MQTT?

如果您不需要AMQP你也可以使用一个直接MQTT券商,如或

If you don't need AMQP you can also use directly an MQTT broker, such as http://mosquitto.org/ or http://www.hivemq.com/

下面(),你可以找到iPhone和Android一些现成的库

Here (https://github.com/owntracks) you can find some ready libraries for iPhone and Android.

为了解决防火墙问题MQTT可通过HTTP。

In order to solve the the firewall problem MQTT is available over HTTP.

您可以在这里阅读:

要么
这里

这帖子还可以帮助您:(<一href=\"https://www.ibm.com/developerworks/community/blogs/sowhatfordevs/entry/using_mqtt_protocol_advantages_over_http_in_mobile_application_development5?lang=en\" rel=\"nofollow\">https://www.ibm.com/developerworks/community/blogs/sowhatfordevs/entry/using_mqtt_protocol_advantages_over_http_in_mobile_application_development5?lang=en)

This post can also help you : (https://www.ibm.com/developerworks/community/blogs/sowhatfordevs/entry/using_mqtt_protocol_advantages_over_http_in_mobile_application_development5?lang=en)

对于一个iPhone应用程序我直接使用MQTT并与MQTT服务器的RabbitMQ插件

For a iPhone application I used directly MQTT and as server RabbitMQ with the MQTT plug-inhttp://www.rabbitmq.com/mqtt.html

我希望这可能是有用的。

I hope it can be useful 

这篇关于本机应用程序到服务器的通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 01:36