[Tutor] Talking between C++ & Python ?

Alan Gauld alan.gauld at btinternet.com
Fri Apr 6 16:43:27 CEST 2007


"Dave S" <pythontut at pusspaws.net> wrote

>> are co-located then a database is a good solution for
>> those volumes. It probably requires that each end
>> implements a poller to check for updates and a
>
> Yep both apps are on the same machine, the company just wants to put 
> a
> corporate GUI on my Python code to claim it as their own

OK, If you go doewn the GUI route a more efficient solution to
polling at each end would be a lightweight socket interface from
the client to server. I'm not sure which end originates the big
data volumes, but I'll assume the server.
Client makes request to server via socket
Server writes data to database
Server sends response to client to say data is available
Client reads data from database.

Should be more flexible than a csv file although it would work
in the same way.


> I had never heard of SOAP - there is just so much out there but it 
> does seem
> to be for remote apps.

SOAP is rapoidly becoming the standartd for remote message
passing between different architectures/lamnguages. Its only
downsides are that it is expensive on both CPU (parsing XML)
and bandwidth (XML v Binary encoding). There are a few security
issues too, but you can get encrypting libraries etc now too.

> SQLite ? - just Googled it and it looks interesting.

It could be any database that you can access from both C++
and Python. So if you already use SQL Server or Oracle or
DB2 then just use that and the appropriate adapters.

Just some more thoughts,

Alan G. 




More information about the Tutor mailing list