4

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)

  • 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?

  • 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

rajTho
  • 51
  • 1
  • 4

1 Answers1

4

Have you considerer to use 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/

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

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

You can read here: http://www.hivemq.com/mqtt-over-websockets-with-hivemq/ or here http://mqtt.org/wiki/doku.php/mqtt_over_websockets

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)

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

I hope it can be useful 

Gabriele Santomaggio
  • 21,656
  • 4
  • 52
  • 52
  • Thanks Gas. would there be any firewall issues to use AMQP over port 80 or 443? I believe these ports will be opened up by the firewalls but not sure if the firewalls explicitly block non HTTP traffic over those ports – rajTho Apr 25 '14 at 19:57
  • 1
    Actually I don't know, it depends from the firewall, but usually it isn't a good practise, if you use amqp over http you shouldn't have any problem. just a few question.. Do you need an AMQP message? Is your aim receive push messages to the mobile application? I think you have to develop some near real-time application that update the trading information to the mobile device, is that right? – Gabriele Santomaggio Apr 26 '14 at 08:32