Communication between C++ server and Python app
Cameron Simpson
cs at zip.com.au
Sun Apr 29 02:24:52 EDT 2012
On 29Apr2012 11:42, Chris Angelico <rosuav at gmail.com> wrote:
| On Sun, Apr 29, 2012 at 10:45 AM, kenk <marcin.maksymiuk at googlemail.com> wrote:
| > I've got a server process written in C++ running on Unix machine.
| > On the same box I'd like to run multiple Python scripts that will
| > communicate with this server.
| >
| > Can you please suggest what would be best was to achieve this ?
|
| Personally, I would recommend a TCP socket, because that allows the
| flexibility of splitting across multiple computers.
And the pain of ensuring security, if you're in an open network.
| But for
| efficiency, you may want to consider a Unix socket too.
A UNIX socket or even a named pipe has the benefit of:
- not being available remotely
- access control with normal UNIX permissions
and of course efficiency as you say.
Generalising to a TCP socket later shouldn't be too hard if the need
arises.
Cheers,
--
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/
Waiting for the bus is a bad idea if you turn out to be the bus driver.
- Michael M. Butler on the Singularity
More information about the Python-list
mailing list