Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6736573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:08:44+00:00 2026-05-26T11:08:44+00:00

I have a game running in N ec2 servers, each with its own players

  • 0

I have a game running in N ec2 servers, each with its own players inside (lets assume it a self-contained game inside each server).

What is the best way to develop a frontend for this game allowing me to have near real-time information on all the players on all servers.

My initial approach was:

  • Have a common-purpose shared hosting php website polling data from each server (1 socket for each server). Because most shared solutions don’t really offer permanent sockets, this would require me to create and process a connection each 5 seconds or so. Because there isn’t cronjob with that granularity, I would end up using the requests of one unfortunate client to make this update. There’s so many wrong’s here, lets consider this the worst case scenario.

  • The best scenario (i guess) would be to create small ec2 instance with some python/ruby/php web based frontend, with a server application designed just for polling and saving the data from the servers on the website database. Although this should work fine, I was looking for some solution where I don’t need to spend that much money (even a micro instance is expensive for such pet project).

What’s the best and cheap solution for this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:08:45+00:00Added an answer on May 26, 2026 at 11:08 am

    Is there a reason you can’t have one server poll the others, stash the results in a json file, then push that file to the web server in question? The clients could then use ajax to update the listings in near real time pretty easily.

    If you don’t control the game servers I’d pass the work on updating the json off to one of the random client requests. it’s not as bad as you think though.

    Consider the following:

    1. Deliver (now expired) data to client, including timestamp
    2. call flush(); (test to make sure the page is fully rendered, you may need to send whitespace or something to fill the buffer depending on how the webserver is configured. appending flush(); sleep(4); echo "hi"; to a php script should be an easy way to test.
    3. call ignore user abort (http://php.net/manual/en/function.ignore-user-abort.php) so your client will continue execution regardless of what the user does
    4. poll all the servers, update your file
    5. Client waits a suitable amount of time before attempting to update the updated stats via AJAX.

    Yes that client does end up with the request taking a long time, but it doesn’t affect their page load, so they might not even notice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a game. I want to have game entities each have their own
Is it possible to i/o to a running process? I have multiple game servers
I have a game server running on Google App Engine. Some of my HTTP
Ok, I have my android game running smooth but can't get it to advance
Hi i have a custom view running my game. Once the player loses it
I am making a fighting game in Flash and while I have everything running,
I have two development sites call api.localhost and game.localhost . Both are running from
I have a game application that I will be running in a web browser
I have a C++ game running through JNI in Android. The frame rate varies
I have a game on Facebook that has been running successfully for almost a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.