Re: Non-blocking publishing in Python
[email protected] Tue, 5 Apr 2005 06:13:02 -0500
| Newsgroups | gmane.comp.web.mod-pubsub.devel |
|---|---|
| Message-ID | <[email protected]> |
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. Otherw= ise, the following information might be useful to someone else getting started= . There are two python client libraries: pubsublib.py and libkn/libkn.py. According to the source, pubsublib.py is a non-blocking implementation, w= hile libkn.py is blocking. The examples in apps are built off of pubsublib, so= they should be non-blocking. This seems to be true when running as a standalone script, but what about= when I want to embed? Is the logging package being used to help the debugging pr= ocess or are people using pdb? Also, I read somewhere that the client is supposed to be using Twisted in= the near future. Is this still the case, and if so, what's the progress on it= ? Thanks, Brian Quoting [email protected]: > Hello: >=20 > I'm trying to use the apps/publish.py module as a starting point for wr= iting > my > own simple publishing lib to work with repubsub. The script runs fine o= n its > own, but whenever I try to embed it in other code, I seem to get blocki= ng > issues and the CPU load spikes. >=20 > Inside the apps/publish.py script, I looked at the following method cal= ls: >=20 > asyncore.poll() > scheduler.timeout() > scheduler.run() >=20 > Now Python's asyncore does not have documentation on the poll function, > although > in my interpreter, I do see a reference for poll. The two scheduler fun= ction > calls both pass in their implementations. If I comment out that loop, m= y > messages don't get published. So what's going on here?=20 >=20 > Ideally, I'd like to be able to use Twisted's Deferred mechanism to han= dle > the > blocking issue, but I'm unsure the best way to approach it without heav= ily > modifying the code base. >=20 > Any help is greatly appreciated. >=20 > Thanks, > Brian >=20 > --=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 >=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