简体   繁体   中英

Java socket programming chat room for android and ios

My team is developing a java-socket programming with push notifications based realtime chat application for android and ios.

We have worked a lot on the code and built it.But there are a few questions that are worthy to be answered before scaling the application.

1)Is java based socket programming scalable for a billion users?Is it the best way to make a chat application.

2)How many poeple can a chat room handle?Is it possible to add about 500-1000 participants?

3)Does this all depend on the physical server(performance) and what will be the expense?

Please help if you know anyone of the answers and thankyou in advance.

A socket is only a system to move data between a client to a server.

There are some limitations on the number of socket that a single SO can handle, but it is possible to scale between different nodes. Java can do that without problems.

If you choose the right architecture and scale it horizontally there is potentially no problem handling also millions of concurrent users and thousand of users on the same room.

The biggest bottleneck is on the network speed because handling millions of messages can block your network. So phisically the problem generally isn't the cpu but the network throughput.

To have an idea on how much simultaneous connections a server can handle read this article :

In 2011 WhatsApp achieved 1 million established tcp sessions on a single machine with memory and cpu to spare. In 2012 that was pushed to over 2 million tcp connections . In 2013 WhatsApp tweeted out: On Dec 31st we had a new record day: 7B msgs inbound, 11B msgs outbound = 18 billion total messages processed in one day ! Happy 2013!!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM