Skip to main content
More descriptive title .Spelling and grammar.
Source Link
Anko
  • 13.5k
  • 10
  • 56
  • 82

How do I write a game server design questionwith single-threaded networking?

I want to write a game server which haswith one thread for all clients to handle messages,message handling and use something like epollepoll to accept networkingnetwork messages. All iI/oO and database access will be processed in a thread pool and they are asynchronous and non-blocking. My questions are

Given such a scheme, how should I handle other events/messages :(physics, game logic, etc)? Can I implement methods to handle these messages as a blocking interface in the main thread?

  1. How should I handle other events/messages like physics, game logic etc.? Can I implement methods to handle these messages as blocking interface in the main thread?

  2. Is there simple open source popular server(like cocox*d/unity as client) which implemented this way that I can reference.

What simple, popular servers exist (using Cocos*d/Unity as client) that I could look at for an example of this?

game server design question

I want to write a game server which has one thread for all clients to handle messages, and use something like epoll to accept networking messages. All i/o and database access will be processed in thread pool and they are asynchronous and non-blocking. My questions are :

  1. How should I handle other events/messages like physics, game logic etc.? Can I implement methods to handle these messages as blocking interface in the main thread?

  2. Is there simple open source popular server(like cocox*d/unity as client) which implemented this way that I can reference.

How do I write a game server with single-threaded networking?

I want to write a game server with one thread for clients message handling and use something like epoll to accept network messages. All I/O and database access will be processed in a thread pool and they are asynchronous and non-blocking.

Given such a scheme, how should I handle other events/messages (physics, game logic, etc)? Can I implement methods to handle these messages as a blocking interface in the main thread?

What simple, popular servers exist (using Cocos*d/Unity as client) that I could look at for an example of this?

Tweeted twitter.com/#!/StackGameDev/status/451676676641275904
added 4 characters in body
Source Link
upton
  • 111
  • 1
  • 5

I want to write a game server which has one thread for all clients to handle messages, and use something like epoll to accept networking messages. All i/o and database access will be processed in thread pool and they are asynchronous and non-blocking. My questions are :

  1. How should I handle other events/messages like guiphysics, game logic etc.? Can I implement methods to handle these messages as blocking interface in the main thread?

  2. Is there simple open source popular server(like cocox*d/unity as client) which implemented this way that I can reference.

I want to write a game server which has one thread for all clients to handle messages, and use something like epoll to accept networking messages. All i/o and database access will be processed in thread pool and they are asynchronous and non-blocking. My questions are :

  1. How should I handle other events/messages like gui, game logic etc.? Can I implement methods to handle these messages as blocking interface in the main thread?

  2. Is there simple open source popular server(like cocox*d/unity as client) which implemented this way that I can reference.

I want to write a game server which has one thread for all clients to handle messages, and use something like epoll to accept networking messages. All i/o and database access will be processed in thread pool and they are asynchronous and non-blocking. My questions are :

  1. How should I handle other events/messages like physics, game logic etc.? Can I implement methods to handle these messages as blocking interface in the main thread?

  2. Is there simple open source popular server(like cocox*d/unity as client) which implemented this way that I can reference.

added 52 characters in body
Source Link
upton
  • 111
  • 1
  • 5

I want to write a game server which has one thread for all clients to handle messages, and use something like epoll to accept networking messages. All i/o and database access will be processed in thread pool and they are asynchronous and non-blocking. My questions are :

  1. How should I handle other events/messages like gui, game logic etc.? Can I implement methods to handle these messages as blocking interface in the main thread?

  2. Is there simple open source popular server if I adopt(like cocox*d/unity as client side?) which implemented this way that I can reference.

I want to write a game server which has one thread for all clients to handle messages, and use something like epoll to accept networking messages. All i/o and database access will be processed in thread pool and they are asynchronous and non-blocking. My questions are :

  1. How should I handle other events/messages like gui, game logic etc.? Can I implement methods to handle these messages as blocking interface in the main thread?

  2. Is there simple open source server if I adopt cocox*d as client side?

I want to write a game server which has one thread for all clients to handle messages, and use something like epoll to accept networking messages. All i/o and database access will be processed in thread pool and they are asynchronous and non-blocking. My questions are :

  1. How should I handle other events/messages like gui, game logic etc.? Can I implement methods to handle these messages as blocking interface in the main thread?

  2. Is there simple open source popular server(like cocox*d/unity as client) which implemented this way that I can reference.

deleted 5 characters in body
Source Link
upton
  • 111
  • 1
  • 5
Loading
Source Link
upton
  • 111
  • 1
  • 5
Loading