E
E
Empty User2014-08-17 01:53:48
Mobile development
Empty User, 2014-08-17 01:53:48

Sockets in mobile app?

I am writing a mobile application with a chat. It turned out like this: Server - NodeJS, client - Socket.io and native code. Everything works fine on both android and ios. So the question is, is it worth using such a system? And is it possible that the server can handle a couple of thousand users?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Timur Shemsedinov, 2014-08-17
@dimash07

There is a potential opportunity to keep many open sockets, for example habrahabr.ru/post/123154 But it all depends on how you write your server on node.js. A couple of hundred thousand users will require multiple node threads, and hence inter-process communication. If they also execute some complex logic, then several threads on several servers may be required. Look at the libraries: cluster , zmq or ready-made solutions for deploying server infrastructure and combining it into one impress bundle .

P
Push Pull, 2014-08-17
@deadbyelpy

For this, sockets are used, because. polling (requests at intervals) implementations create additional overhead.
A couple of thousand is not even a hindrance for the poll implementation. So do it, waiting for a couple of hundred thousand users, maybe questions will already begin there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question