I spent far too long today playing with two different networking systems. The first was RabbitMQ and py-amqplib. This seems pretty nice, you can send hundreds of messages in a fraction of a second... though it then seems to take *forever* to process them. Appears to force in-order delivery, including an explicit ack from the client code... probably not suitable for low-latency (game) applications.
So for some reason I started playing with PyQNet. It was (by contrast) processing around 3000 messages/second, though the messages in PyQNet can get loaded into a single package/packet and send together, so there would be fewer packets, though that was with 500B packages, so not all that many fewer. Thing is, it doesn't matter how fast it is, as no-one uses it.
PyQNet has a traditional "struct" based interface. You define message-types (structs) and the structs are linearized/delinearized on sending/receiving. But what newbie user wants to define structs like that? So this evening, after PyGTA, I sat down and coded up a simple experiment to use compressed json as the wire encoding for data... still preliminary, but it seems to slow down to about 1/10th of the speed, but it does feel better as an API.
Ah well, have spent far too much time playing with this stuff today, maybe some other day I'll actually have a game to write and writing a network library for it will come up again.
Pingbacks are closed.