0

I have been told that I shouldn't be using "one thread per" anything aproach if I want my application to scale beyond "not so far", and that there were other architectures I should look into. Only I weren't told any of those architectures' names, and I couldn't find much on google.

Specifically I need this for a real-time web game, mostly chat-based. I would be using web sockets, but I need to process all the incoming events (many per second per game) concurrently fast enough.

If possible, I need this architecture to be viable in Ruby or PHP.

Any ideas?

4

1 回答 1

1

我不熟悉 Ruby 或 php 可用的 API。如果他们可以访问 Win API 并且可以是多线程的,则推荐的 Windows 功能是连接到句柄和套接字的 IOCP(I/O 完成端口)。每个可用核心一个线程通常最适合最大化扩展。

于 2012-04-30T20:27:13.830 回答