python server

Frithiof Andreas Jensen frithiof.jensen at die_spammer_die.ericsson.com
Wed Nov 9 05:38:07 EST 2005


"linuxpld" <linuxpld at gazeta.pl> wrote in message
news:1131387737.953307.178470 at g44g2000cwa.googlegroups.com...
> Hello
>
> I`m writing a program (server in future) in python.
> I would like to write it in such a way that I will be able to write gui
> in any language and connect to my python program and use functionality
> included with it.
> are there any libraries that I could use?

That depends on what you want and what other "goodies" you want.

I liked "Python Web Modules" http://www.pythonweb.org/ a lot, mostly because
I needed a decent Database interface and because you do not have to "buy"
the entire framework like you do with f.ex. CORBA if you only want to use
some of it. Everything runs a browser these dayz.

Another possibility is to write a command-line interpreter that takes
commands from a socket and returns results. All ASCII of course. ASCII is
easy to debug.

This is very generic, robust and easy to write test scripts for. The
disadvantage is that you need a parser in the GUI and one in the
Application. The huge advantage is that you completely separate the
internals of the two programs from each other.

Most client-server UNIX/Linux applications are written this way; i.e. this
programming method survives in the wild because it is stable and it works.
The RPC frameworks tend to run up on a wild hype-cycle before being
generally left to maintenance programmers to sort out.

Consider a "Mailbox" system, where packages of work is send to a server
process and processed results are shipped back to the client process. The
trick is to keep all state inside the "work packages" so the servers do not
need to track anything. "MAKE" is a file-based implementation of this.


OTOH:

For Python <-> Python situations, the "Python Remote Objects", PYRO is not
bad at all. And it does have an Event mechanism, which can be used as a
"Mailbox" service.  For reliable "shared memory" tasks ZOPE is good or maybe
SPREAD.

CORBA is overkill for everything, IMO ;-)

>
> I dont know if i wrote it understandably but maybe picture will explain
> it:
>
> |------------|
> | python |
> |            | <- module in python -> <- connection ("???") -> <-gui in
> any language (java, c++, python, etc).
> | server  |
> |-----------|
> what could I use as "???"? http? mqseries? webservices? what are the
> possibilites?
>
> thx for answers
> linuxfan
>





More information about the Python-list mailing list