Re: Non-blocking publishing in Python
[email protected] Tue, 5 Apr 2005 12:43:23 -0500
| Newsgroups | gmane.comp.web.mod-pubsub.devel |
|---|---|
| Message-ID | <[email protected]> |
Adam:
> The question was not bone-headed at all. It's just that sometimes our
> Python guy goes into { while 1: sleep } mode. ;)
In that case, I'll continue to poll() the list. Hopefully the results are=
n't too
asynchronous!
> Both of those client libraries were experimental prototypes, as is
> probably clear from reading the source. Plus, I was kind of learning
> Python as we wrote them.
>=20
> I'm Cc'ing Ben in case he knows the answer to your embedding question.
So is anyone using the Python clients for any interesting applications? I=
've
evaluated some other asynchronous messaging technologies, and mod/re-pubs=
ub
looks the most promising w.r.t. Python and Internet-wide messaging. It wo=
uld be
great if anyone could share some insight into the embedding question, or =
how to
harness the non-blocking behavior of the pubsublib.
> I do know that no one is currently working to port the client library
> to Twisted; right now all the energy and effort is going into
> rewriting the server using Twisted, and hopefully we can learn from
> that to do a client rewrite sometime later. If you're feeling
> ambitious, feel free to take a crack at doing it with Twisted's
> Deferred mechanism...
How is the progress on the server side? Is the current version stable eno=
ugh to
be making changes that would be compatible with the current server develo=
pment?
I have some experience with Twisted, so I wouldn't mind taking a look, bu=
t I
would like to get a sense of the project road map so my work isn't wasted=
.
> -- Adam
Brian
PS Are you Adam Rifkin or another Adam?
> On Apr 5, 2005 4:13 AM,
> [email protected]
> <[email protected]> wrote:
> > Haven't heard anything back from the list regarding this question. If=
it
> is
> > because the question was too bone-headed, then there is no remedy.
> Otherwise,
> > the following information might be useful to someone else getting sta=
rted.
> >=20
> > There are two python client libraries: pubsublib.py and libkn/libkn.p=
y.
> > According to the source, pubsublib.py is a non-blocking implementatio=
n,
> while
> > libkn.py is blocking. The examples in apps are built off of pubsublib=
, so
> they
> > should be non-blocking.
> >=20
> > This seems to be true when running as a standalone script, but what a=
bout
> when I
> > want to embed? Is the logging package being used to help the debuggin=
g
> process
> > or are people using pdb?
> >=20
> > Also, I read somewhere that the client is supposed to be using Twiste=
d in
> the
> > near future. Is this still the case, and if so, what's the progress o=
n it?
> >=20
> > Thanks,
> > Brian
> >=20
> >=20
> > Quoting [email protected]:
> >=20
> > > Hello:
> > >
> > > I'm trying to use the apps/publish.py module as a starting point fo=
r
> writing
> > > my
> > > own simple publishing lib to work with repubsub. The script runs fi=
ne on
> its
> > > own, but whenever I try to embed it in other code, I seem to get
> blocking
> > > issues and the CPU load spikes.
> > >
> > > Inside the apps/publish.py script, I looked at the following method
> calls:
> > >
> > > asyncore.poll()
> > > scheduler.timeout()
> > > scheduler.run()
> > >
> > > Now Python's asyncore does not have documentation on the poll funct=
ion,
> > > although
> > > in my interpreter, I do see a reference for poll. The two scheduler
> function
> > > calls both pass in their implementations. If I comment out that loo=
p, my
> > > messages don't get published. So what's going on here?
> > >
> > > Ideally, I'd like to be able to use Twisted's Deferred mechanism to
> handle
> > > the
> > > blocking issue, but I'm unsure the best way to approach it without
> heavily
> > > modifying the code base.
> > >
> > > Any help is greatly appreciated.
> > >
> > > Thanks,
> > > Brian
> > >
> > > --
> > > =3D=3D=3D=3D
> > > brian lee dae yung
> > > biomimetic art and research
> > > mux space . com
> > >
> > > ----------------------------------------------------------------
> > > This message was sent using IMP, the Internet Messaging Program.
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > SF email is sponsored by - The IT Product Guide
> > > Read honest & candid reviews on hundreds of IT Products from real u=
sers.
> > > Discover which products truly live up to the hype. Start reading no=
w.
> > > http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick
> > > _______________________________________________
> > > Mod-pubsub-developer mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/mod-pubsub-developer
> > >
> >=20
> > --
> > =3D=3D=3D=3D
> > brian lee dae yung
> > biomimetic art and research
> > mux space . com
> >=20
> > ----------------------------------------------------------------
> > This message was sent using IMP, the Internet Messaging Program.
> >=20
> > -------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide
> > Read honest & candid reviews on hundreds of IT Products from real use=
rs.
> > Discover which products truly live up to the hype. Start reading now.
> > http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick
> > _______________________________________________
> > Mod-pubsub-developer mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/mod-pubsub-developer
> >
>=20
>=20
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users=
.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick
> _______________________________________________
> Mod-pubsub-developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mod-pubsub-developer
>=20
--=20
=3D=3D=3D=3D
brian lee dae yung
biomimetic art and research
mux space . com
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick