Threading to processing on the server... FAR too easy.

Something is wrong; someone has pulled a fast one on me, I swear, because switching my TCP server over from threading to processing (forking) was ridiculously simple.

All I did (aside from changing the class names themselves) was swapping ThreadingMixIn with ForkingMixIn for my TCPServer extension class… and holy crap, it runs perfectly. Watched top to see the processes get spawned, ran a few different clients and connected happily.

Holy crap. :)

Granted, this has nothing to handle concurrency at the moment (all the actual work beyond setting up the server to accept connections has been on the client side), but I’ve already largely wrapped my head around doing that with processing/multiprocessing, so that won’t be such a major undertaking.

This isn’t a huge accomplishment in terms of deliverables or anything, but it’s pretty cool to see something major like this just up and work.

Comment

Commenting is closed for this article.

Trials and Tribulations

You've made your way to a brief record of the odd and intriguing events which constitute the development of my pet project, The Great Two-Dimensional Online RPG.

Tags

android, architecture, c++, client, crafting, ec2, git, graphics, ipc, java, leveling, maps, menus, movement, multiprocessing, processing, pydoc, pygame, python, queue, rendering, scaling, server, skills, stack, synchronization, textpattern


RSS Feeds

Search This Site