Reputation: 43
i want to make a simple game(application), web browser game multiplayer game, that require constant connection with the server.
right now, im using ajax and normal php wamp server, but i think it is the wrong way to go because i need to send request to the server every second(for update)from each user... it seems just wrong..
i know something abound ape-project, but i need something for windows(for now)
what other option i have? web-socket is a bit tricky and not supported by a lot of old browser, so it is not good... please help, and thanks ahead.
Upvotes: 0
Views: 2274
Reputation: 2651
In todays world there are tons of options available for you. What you are looking for is a PUSH semantics rather than PULL i.e. You don't want to POLL servers from client (periodically) for new updates, but you want server to PUSH data to client as and when it is available.
You should look at Publisher-Subscriber workflows, where you can have one channel per user where other users can publish there updates. Each user will then subscribe to it's channel to retrieve any updates in real-time
There are a lot of readymade pubsub solutions available in the market. A few that comes to my mind are:
You will also need a transport that connects your pubsub channels to clients on the browser (websocket or something that emulates websocket for you on old browsers). A few options that comes to my mind are:
Hope it helps you.
Upvotes: 3