473,765 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Publish/Subscribe Lib for Python?

Does anyone know of a framework or library that will enable me to use
publish/subscribe comms? I want to create a server (using Python)
running on a Unix box that will accept client connections (from GUIs
built with wxPython) and publish realtime data updates to them. Any
advice on where to start?

Thanks.
A.B.
Jul 18 '05 #1
18 3511
>>>>> "Adrian" == Adrian B <bo**@swirve.co m> writes:

Adrian> Does anyone know of a framework or library that will
Adrian> enable me to use publish/subscribe comms? I want to
Adrian> create a server (using Python) running on a Unix box that
Adrian> will accept client connections (from GUIs built with
Adrian> wxPython) and publish realtime data updates to them. Any
Adrian> advice on where to start?

This is easy w/o any special libraries, if it is indeed all you have
to do.

Some options:

- Clients open TCP socket to server as a "subscripti on", server dumps
all the changes to all the connected TCP sockets.

- Clients register their host, port addrs with server, server sends
updates to all the subscribed clients in UDP packets.

- UDP broadcasts might work too, haven't tried it.

Or, you could use something like CORBA (omniORB) for more complicated
scenarios.

Googling also revealed:

http://aspn.activestate.com/ASPN/Coo...n/Recipe/81614

But beware: OSE, which that recipe relies on, seems to be licensed
under QPL.

--
Ville Vainio http://tinyurl.com/2prnb
Jul 18 '05 #2
Look to Twisted Matrix or possibly Spread (with Python). Quick google
search for either should help.

Enjoy,
Mike

Adrian B. wrote:
Does anyone know of a framework or library that will enable me to use
publish/subscribe comms? I want to create a server (using Python)
running on a Unix box that will accept client connections (from GUIs
built with wxPython) and publish realtime data updates to them. Any
advice on where to start?

Thanks.
A.B.

_______________ _______________ _________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/

Jul 18 '05 #3
Adrian B. wrote:
Does anyone know of a framework or library that will enable me to use
publish/subscribe comms? I want to create a server (using Python)
running on a Unix box that will accept client connections (from GUIs
built with wxPython) and publish realtime data updates to them. Any
advice on where to start?

Thanks.
A.B.


http://ose.sourceforge.net/
Jul 18 '05 #4
Adrian B. wrote:
Does anyone know of a framework or library that will enable me to use
publish/subscribe comms?


Pyro's Event Service. http://pyro.sourceforge.net

--Irmen
Jul 18 '05 #5
According to Adrian B. <bo**@swirve.co m>:
Does anyone know of a framework or library that will enable me to use
publish/subscribe comms? I want to create a server (using Python)
running on a Unix box that will accept client connections (from GUIs
built with wxPython) and publish realtime data updates to them. Any
advice on where to start?


Just choose any blogging library that takes your fancy.
--
Ng Pheng Siong <ng**@netmemeti c.com>

http://firewall.rulemaker.net -+- Firewall Change Management & Version Control
http://sandbox.rulemaker.net/ngps -+- Open Source Python Crypto & SSL
Jul 18 '05 #6
Ville Vainio <vi***@spammers .com> wrote in message news:<du******* ******@amadeus. cc.tut.fi>...
Googling also revealed:

http://aspn.activestate.com/ASPN/Coo...n/Recipe/81614

But beware: OSE, which that recipe relies on, seems to be licensed
under QPL.


That it is currently under the QPL means nothing if you aren't intending
to redistribute your own code. Ie., if you are developing a system for in
house or personal use, the contentious parts of the QPL don't actually
kick in and it should be safe to use. Much the same as the GPL really,
where things only apply if you intend to redistribute.

The next version of OSE will try to address this issue by allowing use of
the Python wrappers under a BSD or Python style license, provided that
the C++ layer underneath is left as is. Change the C++ layer underneath
and the QPL will apply up through the Python code as well.

In other words, there will be an attempt to build a wall between the QPL
licensed C++ code and the Python code. It may turn out that this is not
a practical thing to do and even if possible, it may still not satsify the
GPL license clause about other licenses placing additional restrictions
beyond those implied by the GPL. Ie., you still might not be able to
validly use the stuff in an application where you also use Python code
under the GPL.

I would really like to hear other peoples ideas about how to address
licensing where the Python code is actually a wrapper around a C/C++
library under a QPL or GPL type license. Some people seem to believe
that the use of the scripting language implies a line is drawn when
people go to use it and thus what the library underneath is licensed
under doesn't matter. Linking of the library still occurs though, so I
don't believe this is necessarily the case.

So, how can one cast the licensing so as to provide an exception that
provided the underlying C/C++ library isn't changed, that the Python
wrappers can be used under a less restrictive license. I have control of
the licensing on both so can stipulate exceptions, but what is the
best way of doing it?

Comments?
Jul 18 '05 #7
Graham Dumpleton wrote:
....
I would really like to hear other peoples ideas about how to address
licensing where the Python code is actually a wrapper around a C/C++
library under a QPL or GPL type license. Some people seem to believe
that the use of the scripting language implies a line is drawn when
people go to use it and thus what the library underneath is licensed
under doesn't matter. Linking of the library still occurs though, so I
don't believe this is necessarily the case.

(I'm not a lawyer, just someone who seems to get lectured at about
licenses a lot :) ).

If I understand correctly, copyright law does not directly grant one the
right to restrict distribution of *someone else's* copyrighted works
merely because they refer to one's own work. So, if your distributable
does not include any code created by someone else, then the other party
has no right to restrict its distribution based on copyright. So, if
your package connects to anything installed on the system which happens
to implement a given API but does not include any GPL code itself, you
can likely simply point to the fact that you haven't included any of the
GPL-licensed code and be fine.

The FSF peoples seem to have a different interpretation, as, last I
heard, they suggest that software that links to any GPL software, even
at run-time constitutes an infringement (regardless of your not having
distributed the GPL code yourself, and the end-user having a perfectly
valid license to link the two for personal use). Depending on a Free
Software Foundation owned library (i.e. one to which the author has
assigned their copyright to the FSF) in this type of scenario would
likely then be a little risky.

The question becomes murkier when you start to introduce, for instance,
the use of header files from a GPL program to create a SWIG .i file.
There are apparently cases where the use of headers for allowing
interoperabilit y with commercial software was considered a fair-use
infringement (i.e. it is technically a copyright violation, but is
likely to be considered valid should it be brought before a court).
Apparently other cases suggest that the necessary functional
specification isn't actually copyrightable. The question comes down to
what is expression, and what is merely mechanics.
So, how can one cast the licensing so as to provide an exception that
provided the underlying C/C++ library isn't changed, that the Python
wrappers can be used under a less restrictive license. I have control of
the licensing on both so can stipulate exceptions, but what is the
best way of doing it?

Sounds like what you really want is the LGPL for the C/C++ library?
That would keep the GPL-like restrictions for the C/C++ library, but
allow linking it into proprietary Python software. It would *not*
however restrict based on whether it's a Python or C/C++ application
doing the linking. It would also explicitly *not* prevent changes to
the C/C++ library (the whole point of Open Source licenses, particularly
GPL and LGPL being to allow the user to fix bugs and change operation of
the software).

You could add a clause to your license doing something silly like
requiring that a Python DLL be linked into the process to enable the
less restrictive license, but doing that means that you've suddenly got
a non-standard license, which requires everyone to hire a lawyer to
explain it to them, check for incompatibiliti es with other software, ad
nauseam.

Of course, the point of the GPL license (among other things) is to
strongly encourage others to use the license in order to give to users
access to ever-more GPL'd code. The so-called "viral" effects are
intentional. If I understand correctly, the QPL is basically a dual
license encouraging you to either pay Trolltech or GPL your software.
Finding ways *around* these licenses (I'm assuming that the QPL is being
inherited by including Qt or the like) might be considered rude at the
least if the license involves code which is not your own.

So, my suggestion would be (assuming this is possible (you own *all*
copyrights involved)):

* Ditch QPL, license the C/C++ library as LGPL, license the Python
library as BSD/MIT or LGPL.
* Distribute the Python wrapper (with none of the C/C++ project's
code) as a separate project.
o Anyone who uses the C/C++ library is still bound by GPL rules.
o Anyone who combines and redistributes it will be bound by
the GPL, so they can't bundle it with proprietary code.
o The more permissive MIT/BSD license is GPL compatible, so
the wrapper itself can be bundled with the GPL code if desired.
o The wrapper can be bundled with the proprietary code so that
the user can simply install the C/C++ project using it's
installer and the proprietary code can find it at run time.
o Users must combine the system with any proprietary code
themselves. This can be fairly inconvenient.
* Descend into a morass of trying to legally define what it means to
"use" the Python-based interface and try to integrate that into
some Open Source license.
o Is someone allowed to use both interfaces under the less
restrictive license, or only the Python interface?
o Is someone allowed to call the Python interpreter from C/C++
solely to access the functionality?
o Figure out how to cripple the "modify as you wish" focus of
most of these licenses in the case of use of the Python
interface.
* Build your own license using your own high-priced lawyers :) .

The thing, IMO, to keep in mind, is that creating yet another Open
Source license is probably *not* a good idea, despite the fact that it
acts as a make-work project for copyright attorneys, who are obviously
needing more BMWs these days. Choosing one of the existing well
understood and fairly clear licenses (not, e.g. the PSF Python license,
which is an agglomeration of other licenses), such as MIT, BSD, GPL, or
LGPL is probably the best approach for minimising headache and effort.

Good luck,
Mike (again, so not a lawyer it's funny)

_______________ _______________ _________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/

Jul 18 '05 #8

On 29/02/2004, at 4:09 PM, Mike C. Fletcher wrote:
Graham Dumpleton wrote:
So, how can one cast the licensing so as to provide an exception that
provided the underlying C/C++ library isn't changed, that the Python
wrappers can be used under a less restrictive license. I have control
of
the licensing on both so can stipulate exceptions, but what is the
best way of doing it?

Sounds like what you really want is the LGPL for the C/C++ library?
That would keep the GPL-like restrictions for the C/C++ library, but
allow linking it into proprietary Python software. It would *not*
however restrict based on whether it's a Python or C/C++ application
doing the linking. It would also explicitly *not* prevent changes to
the C/C++ library (the whole point of Open Source licenses,
particularly GPL and LGPL being to allow the user to fix bugs and
change operation of the software).

You could add a clause to your license doing something silly like
requiring that a Python DLL be linked into the process to enable the
less restrictive license, but doing that means that you've suddenly
got a non-standard license, which requires everyone to hire a lawyer
to explain it to them, check for incompatibiliti es with other
software, ad nauseam.

Of course, the point of the GPL license (among other things) is to
strongly encourage others to use the license in order to give to users
access to ever-more GPL'd code. The so-called "viral" effects are
intentional. If I understand correctly, the QPL is basically a dual
license encouraging you to either pay Trolltech or GPL your software.
Finding ways *around* these licenses (I'm assuming that the QPL is
being inherited by including Qt or the like) might be considered rude
at the least if the license involves code which is not your own.

So, my suggestion would be (assuming this is possible (you own *all*
copyrights involved)):

* Ditch QPL, license the C/C++ library as LGPL, license the Python
library as BSD/MIT or LGPL.
...


Thanks for the comments. It gives me more things to think about.

As far as ditching the QPL for the C/C++ library and using the LGPL, I
am not sure
that I can. The whole situation is made more complicated for me,
because although
I wrote all the code, it was originally developed while I worked for a
specific
company. I did obtain a license from that company to continue to
develop the code
and to distribute the result, including being able to sub-license
others to also
distribute the code, but the language of that license may well prevent
me from
applying a license such as the LGPL. This is because with the LGPL,
someone could
cherry pick code out of the library and use it in something else to the
extent that
the LGPL allows. At least I don't believe the LGPL would stop this
although the
application or library which used the "cherry picked" code would itself
have to be
LGPL or GPL I would imagine.

The reason why the QPL is working for me so far is that the QPL
essentially restricts
someone to distributing it as is. That is, any changes must be
distributed as a
separate patch. This in effect means that someone can't just cherry
pick code from
it and use it separately. To that end I believe I am working within the
spirit of
my original license obtained from the company who I was originally
working for as
the manner in which I am licensing it and distributing it preserves the
integrity
of the package and people in the main have to use it as distributed.
They can still
make changes if they need to, but if distributing it further, these
would have to
be as a patch.

I'll have to look more at my license for using the original code, but I
think I would
be pushing it to release my current C++ code, based on the original
code, under a
license that allows a free for all. My Python wrappers don't have this
problem as
such because I developed them all on my own time and by itself it
doesn't include
any of the original code. Now one may say that I should have negotiated
a better
license on the original code, but this was back in 1993 before Open
Source took
off to the extent that it has. It wasn't necessarily possible back then
to anticipate
how things would change

Thanks again.
Jul 18 '05 #9
> The next version of OSE will try to address this issue by allowing use of
the Python wrappers under a BSD or Python style license, provided that
the C++ layer underneath is left as is. Change the C++ layer underneath
and the QPL will apply up through the Python code as well.


I can tell you that I immediately ruled out OSE for my open source project
http://bitpim.sf.net licensed under the Artistic License because of the
license of OSE.

Roger
Jul 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1109
by: Russ | last post by:
Can anyone tell me if .NET directly supports the publish/subscribe messaging paradigm? If not directly, does anyone know of any .NET add-ons which offer this type of functionality? Thanks in advance, Russ
0
1485
by: Russ | last post by:
Can anyone tell me if .NET directly supports the publish/subscribe messaging paradigm? If not directly, is there an add-on that is available that offers this type of functionality? Thanks in advance, Russ
1
1438
by: SKumar | last post by:
Hello: I am trying to implement a publish/subscribe model for an applications I am working on. I would very greatful if anybody could offer me some suggestions. The application basically is a connectivity applications like dial, VPN and wireless. Ideally I would like to have a service where all these connectivity componenets can send/publish their statuses to...and I would like to
4
1775
by: Veriblue | last post by:
Hello Folks I am working on a applications which needs a publish/subscribe model to handle events. There can be various components involved and some maybe out of process. Ideally I would like to have Windows Service where these different components can publish there status to and a GUI app that can subscribe to these statuses and be notified. What is the best way to go about implementing this ?
2
1227
by: Alvo von Cossel I | last post by:
hi, i have created an application with vs 2005. i would like to publish it to the web but i think i read a post where it said that it wasnt allowed to do that. is that true? -- Alvo von Cossel I of Germany
0
2075
by: Kamilche | last post by:
''' event.py An event manager using publish/subscribe, and weakrefs. Any function can publish any event without registering it first, and any object can register interest in any event, even if it doesn't exist yet. The event manager uses weakrefs, so lists of listeners won't stop them
2
2355
by: gregory_may | last post by:
I am looking for a publish/subscribe mechanism for .Net/Atlas. Does this exist? I need to make web service callbacks to clients when specific events happen. It almost sounds like RSS, but I am not sure if there is a better fit?
3
4365
by: Ludwig Wittgenstein | last post by:
Hello, all. Does anyone know of documentation about implementing a publish- subscribe model between a .NET Web service provide and a Java service consumer? I have this problem I am trying to solve, and would greatly appreciate it if someone can tell me what the best solution would be for it. I have a .NET 2.0 (ASMX) webservice on a server on a dedicated hosting server, and several clients in different cities running linux servers
3
1655
by: Anonymous | last post by:
How do I publish a web site (web application .net 2.0) from the command line in VS2008?
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9951
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7378
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5275
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2805
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.