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 9020561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:03:00+00:00 2026-06-16T05:03:00+00:00

I have almost completed a turn-based multiplayer game with node.js and socket.io. I have

  • 0

I have almost completed a turn-based multiplayer game with node.js and socket.io.

I have express.js as web server and another class acting as game server, using socket.io.

My problem is that these two are running in the same application. I have a web-landing page where users can log in and see their player details and chat in the lobby. Now until here there is nothing related to game logic. So i’m asking myself why in the hell is this game server running in the same app with webserver. Also note that, in the future, there may be different servers like (europe server, americas server, asia server, etc.) but the same landing page and login mechanism stays.

So what is the perfect way to achieve this?

Should i make two separate node.js apps, one webserver and one game server. However in that case will i be able to share session data between sockets and requests?

Another drawback is that when navigating the site, any unexpected behaviour may cause the webserver to throw exception and close the application thus shutting down the game server also.

  • 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-06-16T05:03:01+00:00Added an answer on June 16, 2026 at 5:03 am

    You may have completely separate node.js apps and a common session store, such as Redis, to check if a user authenticated with the webserver before allowing access to the game server. The common session store would also help with simultaneous game servers, not just one web + one game server.

    You may also prevent closing the application by catching all errors, but that is not generally recommended.

    Later edit:
    Here is a small list of advantages and disadvantages regarding session stores. It’s not for node.js, but it applies here:
    http://techwhizbang.com/2009/12/memcache-session-store/

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

Sidebar

Related Questions

I have been working within another question on this site and have almost completed
I have been designing a web app in node.js with express and mongoDB, and
i have almost completed my game and now i wish to do something with
I almost have this Powershell script completed but I am stuck at the last
I have almost completed my Android application so am considering ways of distributing the
I have an almost complete simple web app written as a Python CGI script.
I have almost completed implementing MegaMenu Reloaded in to my website however a random
I am running Ruby on Rails 3 and I have almost completed my application.
I have almost completed an ASP.NET webforms website using jQuery Mobile. I am stuck
Here almost we have completed the functionality.When we clicking on add button of each

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.