0

I have a project to create a messaging system for iOS, Android, web browser as the client. What kind of protocol can i use? I have read about the HTTP and Socket programming. Some solution that come up:

  1. GET/POST HTTP
  2. Socket

If we have the socket programming, how can we arrange the socket connection with the load balancing?

Any idea which one can I apply or other protocol?

Thanks


My first plan is to create something like a usual chatting app we know nowadays, but integrated with some other functions in the current system. Which one should I use?

user2936719
  • 165
  • 2
  • 10
  • 1
    Have you looked at using the [Web Socket](http://en.wikipedia.org/wiki/WebSocket) protocol? It handles framing and other such things and there are lots of libraries and examples detailing chat servers. – Los Frijoles May 27 '14 at 15:48
  • So it will implement socket on the server side? – user2936719 May 27 '14 at 15:55
  • *Everything uses sockets* on the server side if its a network server. The main thing that is to be solved with network communication is the *format* of communication. HTTP is one format, so if FTP, and WebSockets is yet another. Its most common to roll your own protocol, but using an existing standard (like WebSockets) will make learning it much easier. Each protocol has its own features and drawbacks (such as http can only do "question-response" things) which you need to research before deciding on a solution. – Los Frijoles May 27 '14 at 16:04
  • My first plan is to create something like a usual chatting app we know nowadays, but integrated with some other functions in the current system. Which one should I use? – user2936719 May 27 '14 at 16:35

2 Answers2

1

I strongly recommend that you use an established protocol, IRC. For a general overview of IRC see http://en.wikipedia.org/wiki/Internet_Relay_Chat

Read about one Android library implementation at IRC library for Android (From 2.3.3 to 4.0.3 )?

This could go a long way towards solving your problem. Mainly though, "don't reinvent the wheel" as the saying goes.

Community
  • 1
  • 1
catfood
  • 4,267
  • 5
  • 29
  • 55
  • I'm afraid I misread the question and made an unsupported assumption that you intend a "chat" style of messaging. If you're trying to implement a chat, yes, please use IRC. If you're thinking of something more like email or some other paradigm, great, and I still recommend you use an existing protocol and existing libraries if at all possible. – catfood May 27 '14 at 16:12
  • My first plan is to create something like a usual chatting app we know nowadays, but integrated with some other functions in the current system. Which one should I use? – user2936719 May 27 '14 at 16:36
0

You can check SignalR to use on the Website part. This will allow you to create real time connections. It uses WebSockets:

http://signalr.net/

Bura Chuhadar
  • 3,653
  • 1
  • 14
  • 17