Hello Amin,
Here are my 2cts. If by "shared server" you mean a VPS, it depends on the technical specifications of the server itself and the bandwidth provided.
Technically there is no reason not to be able to handle 100 concurrent connections using a Linux VPS with 4 GB of RAM, 4 GB of SWAP and 100 Mbps connection if dedicated to the app itself.
After that aspect, it depends on the amount of data to manage and of course any other operation you have to do on them. That aspect is related on your experience only.
About the solution, there is something you did not mention, it is MQTT (https://mqtt.org/) and by experience I would use it to send the data between the players and use a socket or pusher to inform the other parts in real time (disconnection, new movement, etc.) because that protocol has a multi subscribers possibility.
I hope it can help a bit. Good luckHello to all,
Thanks for your post, Samuel. Honestly I am not an expert in the server side, however, I think Samuel is correct, that is, probably we are talking about the server's hardware capabilities at the end. Of course, other things must be taken in consideration.
For example, from your three options, I will choose the first one, if possible, discarding the second one, if there is another way. One of the apps that I am developing (also using AB for the client side) uses a websocket with very, very good results.
The app that I am talking about are daily used by more or less 500 people (workers of a company) and the websocket provide to the app basically a chat feature: a very powerfull chat, so we know when someone is online, is typing, etc.
We use the websocket's server also in combination with push notifications, so, if an user is not online (is not in the app), we send to it a push notification, who open the app, who recognize the push type and shown to the user the latest chat's messages.
Once we can go working with the websocket... we love it. I think there is nothing that can be better, except maybe your third option, that is, suposing we no need a websocket, a real bidirectional communication between the server and the clients, and viceversa.
The main problem for the websocket I think it's the required of an own server, that is, probably (but we can talk with our hosting provider) install a websocket server into a shared hosting, for example, like the hosting who serve this webpage.
We need to install a websocket server (we use a Java websocket, if anyone are interested, I can provide here more information), work with it (on the server side) and also in the client side, of course, with the WebSocket control of AB, for example.
Can take a while... I remember we expend several time and work to setup the websocket, etc., but finally it's one of the best feature of the app in my opinion. And that's what I can say at this time about this... not too much help (like Samuel provide), but go ahead and post here any further question or comment.
Hello to all,
I think in your last post you are talking about some possible scenarios of the app, which of course you may need to control. In other words, the app must be ready to work in different scenarios, like what you describe using questions: "So what if one them don't deliver, or delivers 1-2 seconds late?" I supose that things like that must be implemented in an app level, that is, it's a question of the app's implementation. Am not saying that this all are easy, of course... just that maybe it's a question of think about, work on it, etc. Step by step, question by question...
Yes; again my help try are not very useful at all... but is what I can say right now: supose a bad connection scenario... then your server hardware can't do nothing,... so in my opinion it's the app who must control that kind of possible scenarios... in order to maintain the things working... at least in the best way as possible.
Hello Amin,
If with "notifications" you mean push notifications... note that they works like a charm, but, not always in real time... because the notification is finally sended by the thirdparty service that we use, like Google FCM. Or maybe I am a bit wrong and you mean other thing but not exactly push notifications... or there is not a problem to receive that notifications "not in real time" (even when sometimes... they arrive in a merelly real time).
Hello Amin,
First of all, please, sorry for the delay. Believe or not, I am working very hard in certain app these days and I have no time to write a reply! In fact that's the app in which we are using a websocket server for the app's chat and other features.
I have a problem, because, I am the responsible for the client side (working with AB), but not the server side. I ask yesterday to my boss (which is responsible for the server side, among other team members), about the websocket software that we are using: I really think that we use certain specific software, but, my boss told me we are not doing that.
When I ask about the software in the server he told me we use Java "glasfish", which is an "app server" similar than Java "TOMCAT". So it's "glasfish" who launch, execute or maintain the websocket server... WHICH HAS BEEN WRITTEN FROM THE SCRATCH... my boss offer to me this forum thread, in which apparently they base to prepare the websocket server.
And that's all what I can say... except if you want to ask something in particular: in this case I will try to find the right answer or directly reply if possible. No; not too much information, I know, Amin, but you must look for some possible "sample Java websocket server", follow the referred forum link, maybe it's possible to use some software which already offer to us what we need...
The client site (with AB) is more easy... requires their work, of course (I can remember when we develop the chat...), but what we must do is to use the WebSocket control, and, mainly, their Message event. Basically the server can send anything to the app... and viceversa, we commonly use JSON objects to transfer data, which appear very good, since a sole object can have several properties and values.
That's all for now, Amin... not too much help... but maybe we can continue ahead here or in other posts.
Hello Amin,
Thanks for your consideration. Certainly I don't provide too much help... maybe in the future. Maybe other mate know about a possible server websocket software to be used. I think that can be more or less easy to find information... following the above link... or just searching by something like "Java server websocket implementation"...
In fact it's rare that no one already exists... but I can't recommend one of them as I wanted... I am wrong... I figure out that we are using some specific software, but, no... we develop the websocket sever from the scratch. Maybe this can give us some information... probably it's not very, very difficult or complex to start with it... of course later the software can become more complex: database queries, etc., but, probably start with it (using Java, Glasfish, etc.) maybe it's not very, very complex at all...
What I mean is that probably I am missing something... for example, maybe a websocket server is in fact an HTTP server with some kind of particular configuration or something like that? That's what I start to think and what I want to say here...
Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.
This website uses some useful cookies to store your preferences.