Hello again,

I'm reasonably new to networking and concurrency, so here goes:

I'm interested in designing a game server using vibe-d.
My primary use of vibe-d is the fiber-aware concurrency mechanisms.

Previous to vibe-d, I was using ENet[1] for my network protocol:

ENet's purpose is to provide a relatively thin, simple and robust network communication layer on top of UDP (User Datagram Protocol).
The primary feature it provides is optional reliable, in-order delivery of packets.

ENet is supposedly reasonably thread-safe[2] although I don't think that's necessary.

It would be optimal for me to utilize ENet for networking with vibe-d for concurrency;
however, I don't want to be in a situation wherein performance is heavily degraded due to this combination.

ENet, by default, uses synchronous blocking sockets. However, a timeout can be set to 0 which results in non-blocking behavior.

ENet provides enet_host_service which functions similar to a recv on UDP or TCP.
My architecture is basically to have on fiber constantly calling enet_host_service
and then if data is received, create a new fiber to handle whatever action (connection, movement, etc.)

  • Is this architecture reasonably scalable?
  • Is having one fiber constantly recving good enough to handle a thousand concurrent players, all performing actions in a 3D game world?
  • If not, then how is this problem resolved?

Sorry if my provided information is a little too unspecific. I mostly just want to make sure I'm not way off track here.

Regards,
Kelet