Posted September 19, 2011
Ok, here goes.
I have a web server running in Python.
I have potentially several instances of my game engine running as standalone C++ processes.
They communicate with each other via sockets (given that the game engine needs to be expendable over several computers, sockets are a must).
So far, I've used barebone TPC/IP to communicate between server and engine(s) with a narrow custom-made protocol (ie, agreed upon hard formats for each type of request) which worked ok, because server-engine communications have been light (either I was mostly working on one or the other).
However, now I'm thinking I should extend my little protocol to pass along more complex structures via the sockets to save some development time and a few white hairs :).
My gut feeling is to go find some C/C++ XML library (if I can't find a satisfactory one in Python, I can always create a wrapper for it using the C/C++ library) and use that as an intermediate step (converting data structures to XML and then passing XML strings over the sockets re-creating the data structure from the string on the other end).
Before I start, get all invested and find out later I could have saved myself a lot of trouble using something else, does anyone know about a better solution?
I have a web server running in Python.
I have potentially several instances of my game engine running as standalone C++ processes.
They communicate with each other via sockets (given that the game engine needs to be expendable over several computers, sockets are a must).
So far, I've used barebone TPC/IP to communicate between server and engine(s) with a narrow custom-made protocol (ie, agreed upon hard formats for each type of request) which worked ok, because server-engine communications have been light (either I was mostly working on one or the other).
However, now I'm thinking I should extend my little protocol to pass along more complex structures via the sockets to save some development time and a few white hairs :).
My gut feeling is to go find some C/C++ XML library (if I can't find a satisfactory one in Python, I can always create a wrapper for it using the C/C++ library) and use that as an intermediate step (converting data structures to XML and then passing XML strings over the sockets re-creating the data structure from the string on the other end).
Before I start, get all invested and find out later I could have saved myself a lot of trouble using something else, does anyone know about a better solution?
Post edited September 19, 2011 by Magnitus
This question / problem has been solved by cjrgreen
