Page 2 of 2
Posted: Mon Jul 30, 2007 5:52 pm
by nathanr
I'm thinking a daemon rather than a php app would be more suited

just the thinking we all love at the end of a project
Posted: Mon Jul 30, 2007 7:27 pm
by Christopher
feyd wrote:memcache and shmop may be of interest.
True, but it also sounds like something as simple as an SQLite database on a RAM disk would do the job as well. The Share Nothing style is to use standard tools and standard methodologies to solve problems. It also implies that the solution to a performance problem is rearchitecting ... not building a bigger, rocket powered hammer.
Posted: Mon Jul 30, 2007 11:20 pm
by john2496
I did some tests and I realized that even if I could communicate between threads, php is slow. Really slow, its great for web apps but not for servers

. For example, in the game there are literally hundreds of game objects that need to be updated once a second. Php takes over 27 seconds to do a simple loop through an array of objects and call the update() method on each one. The processing involved in updating the entities calls for nothing more than a few simple conditionals (pulled from local vars, no db stuff or anything) and sometimes simple math (no floating points).
I'm almost done porting the server into java and use memcached for communication betwen the php client & js server.
