GameLogic and IPC

Hello,

What do you think is the best method of inter-processes communication with GameLogic? I’ve been using sockets, but it seems me that sockets create unnecessary overhead and would slow down older systems. Whenever the system is slow creating a socket, the game freezes up while it waits.

I’ve been trying to make Blender launch a thread that handles the sockets (it’s my understanding this will allow Blender to run the game smoothly while the thread modifies the datasets I’m keeping track of), but I can’t seem to get this working.

Reading and writing a common file is another way to go, but also creates enormous overhead.

A memorymaps have been suggested, but the need for a physical file to be mapped seems extraneous.

Does anyone have any other ideas?

If you’re working with IPC, memorymaps, and shared files… being just a noob, that all seems quite ellaborate for Blender, game engine or otherwise.

Shared resources, and continuity, are a common network problem. Sockets are actually quite reliable but you have to have system level permissions to make full and efficient use of them.

If you are truly working at that level, perhaps you should check on priority settings. Not to sound foolish or naieve <sp?>, but if it is performance you’re concerned about, process threading and response (be it Unix/Linux or Windows) - permissions and priority - seems more likely to be your issue than implementation method.

Sockets do seem to be the way to go, except that socket.close() doesn’t work. I have a system that makes a connection every quarter second and this results in a system with thousands of sockets stuck on TIME_WAIT. I’ve tried everything, but it just seems to be impossible to explicitly close a socket without having to wait for it to time out.