[Twisted-Python] PB vs JMS
I looked at PB for an architecture with one client distributing some processing to several servers. Now I came across JMS and I have seen that using ActiveMQ with the Stomp protocol there would be a good support for Python. Surprising I couldn't find any article comparing the two technologies. I wonder if they target different problems (it doesn't look to me). Is anyone able to sketch advantages of one solution against the other? Thanks, Jacopo ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
[Twisted-Python] Structural issues in Lore XHTML documents
I've been looking over the xhtml documents used to generate the twisted documentation, and I've noticed a number of issues: - some docs do not have a DOCTYPE declaration, I think they should all have one - of those documents that do have DOCTYPEs, some are using xhmtl-strict, and some are using xhtml-transitional, which is preferred? I think they should all use the same one - some of the docs are lacking an xml namespace attribute in their root element...I think they should either all have one, or none of them should - according to: http://twistedmatrix.com/projects/lore/documentation/howto/lore.html all of the docs should have the same text in both their element and their element...this is not the case I'm planning to correct some of these issues, but I wanted to get others' opinions on exactly how to go about it. For example, what DOCTYPE to use, XMLNS to use, etc. Thoughts? Suggestions? I've opened a ticket (#4050) at http://twistedmatrix.com/trac/ticket/4050 Please comment. Thanks, Kevin Horn ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
[Twisted-Python] getting #2015 (Generic SASL library) moving again?
I'd like to see this ticket get moving again. I've gone over what's been done so far (and put my comments in the ticket), and it looks like everything is at least mostly ready to be merged into the Twisted trunk. So what else needs to be done to get this to happen? I'm happy to try and get it done, but a little direction would be really handy. ;) Kevin Horn ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] PB vs JMS
On Mon, Oct 5, 2009 at 9:14 AM, wrote: > I looked at PB for an architecture with one client distributing some > processing to several servers. Now I came across JMS and I have seen that > using ActiveMQ with the Stomp protocol there would be a good support for > Python. > Surprising I couldn’t find any article comparing the two technologies. I > wonder if they target different problems (it doesn’t look to me). > Is anyone able to sketch advantages of one solution against the other? > > I don't think there is a good comparison between the two because they're different technologies addressing different problems. JMS is a messaging middleware defined at the Java language API level (hence the need to for STOMP protocol and similar adapting layers for use with Python or other non-Java languages). PB is a "secure, easy-to-use Remote Procedure Call (RPC) mechanism." For the system you're descibing it seems like message middleware is more what you want. Unless you want to implement your own load balacing, work distribution and failover algorithms? Another alternative to ActiveMQ is RabbitMQ which implements AMQP, which a Python client can speak directly without using a limited protocol like STOMP. There's also handful of good AMQP python libs including one for use in Twisted: txamqp. -Drew ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] PB vs JMS
Drew Smathers wrote: Hi, > JMS is a messaging > middleware defined at the Java language API level (hence the need to for > STOMP protocol and similar adapting layers for use with Python or other > non-Java languages). A bit off-topic, but note that it's sometimes possible to use JMS almost as-is with Python too. Doing that is probably pointless if one's not coming from Java world and expect to see a similar API in Python and it probably doesn't make much sense for open source messaging middleware but it makes sense if you have to use proprietary software such as WebSphere MQ or webMethods that doesn't care much about open protocols, especially when there's a need for seamless integration with Java JMS clients. http://jira.springframework.org/browse/SESPRINGPYTHONPY-12 https://src.springframework.org/svn/se-springpython-py/sandbox/dsuch/jira/SESPRINGPYTHONPY-12/ https://src.springframework.org/svn/se-springpython-py/sandbox/dsuch/misc/jms-wmq-examples.py -- Dariusz Suchojad ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] Structural issues in Lore XHTML documents
On Mon, Oct 5, 2009 at 12:22 PM, Kevin Horn wrote: > I've been looking over the xhtml documents used to generate the twisted > documentation, and I've noticed a number of issues: > Are these issues really affecting you in some way? > I'm planning to correct some of these issues, but I wanted to get others' > opinions on exactly how to go about it. For example, what DOCTYPE to use, > XMLNS to use, etc. > They are supposed to be XHTML, so they should be annotated as appropriate for that format. Lore doesn't define its own attributes, on purpose: it uses existing XHTML facilities like "class" to encode its metadata. > Thoughts? Suggestions? > I'm sure we'd be happy to accept some patches to clean these documents up, especially if it's bothering you, but it seems pretty low-priority to me :). ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] getting #2015 (Generic SASL library) moving again?
On Mon, Oct 5, 2009 at 12:34 PM, Kevin Horn wrote: > I'd like to see this ticket get moving again. Excellent! > I've gone over what's been done so far (and put my comments in the ticket), > and it looks like everything is at least mostly ready to be merged into the > Twisted trunk. > Your analysis on the ticket looks fairly thorough. > So what else needs to be done to get this to happen? I'm happy to try and > get it done, but a little direction would be really handy. ;) > The workflow is pretty simple. 1. author submits change 2. reviewer reviews change 3. someone responds to feedback 4. "someone" becomes "author", repeat Right now we're stuck in the middle of step 3, but given that therve does not appear to be actively working on this branch, the path forward is clear. *You* become "someone", and submit a patch that finishes dealing with the issues that you have mentioned as not already taken care of by therve's subsequent changesets. The best way to do this is to submit a patch against the branch, rather than against trunk. Given such a patch, a twisted committer can then apply the patch to the branch and submit to buildbots (etc) as appropriate. By submitting it against the branch, you make it easy for the reviewer to examine the changes you're submitting in isolation from the rest of the larger change, to see if they address the points that you've brought up. If the reviewer is happy with your changes, then the patch + branch will be immediately merged to trunk; of course, the next review might have a little more feedback for you to deal with ;). Thanks for your interest! ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] Structural issues in Lore XHTML documents
On Mon, Oct 5, 2009 at 1:25 PM, Glyph Lefkowitz wrote: > On Mon, Oct 5, 2009 at 12:22 PM, Kevin Horn wrote: > >> I've been looking over the xhtml documents used to generate the twisted >> documentation, and I've noticed a number of issues: >> > > Are these issues really affecting you in some way? > Yes and no. I'm playing around with some automated processing of these documents (mostly as an exercise to learn lxml), and I'm having to work around some of these things. And since I was thinking about it anyway, I thought I'd take the opportunity to fix up some "broken windows". > > >> I'm planning to correct some of these issues, but I wanted to get others' >> opinions on exactly how to go about it. For example, what DOCTYPE to use, >> XMLNS to use, etc. >> > > They are supposed to be XHTML, so they should be annotated as appropriate > for that format. Lore doesn't define its own attributes, on purpose: it > uses existing XHTML facilities like "class" to encode its metadata. > > The main thing I was worried about was whether they were supposed ot be xhtml-strict or xhtml-transitional. > Thoughts? Suggestions? >> > > I'm sure we'd be happy to accept some patches to clean these documents up, > especially if it's bothering you, but it seems pretty low-priority to me :). > > It's not "bothering" me per se, and we're agreed that it's not any kind of priority, just thought I might as well try and fix it up while I was looking at it. FYI: I've hacked together a simple "lorelint" script to automatically check for these type of issues. Happy to share if anyone thinks it might be useful for future release mgmt automation or whatever. Kevin Horn ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] getting #2015 (Generic SASL library) moving again?
On Mon, Oct 5, 2009 at 1:32 PM, Glyph Lefkowitz wrote: > On Mon, Oct 5, 2009 at 12:34 PM, Kevin Horn wrote: > >> I'd like to see this ticket get moving again. > > > Excellent! > > >> I've gone over what's been done so far (and put my comments in the >> ticket), and it looks like everything is at least mostly ready to be merged >> into the Twisted trunk. >> > > Your analysis on the ticket looks fairly thorough. > Thanks! Though, really I just went over the changesets that therve submitted, and checked them against exarkun's suggestions. > > >> So what else needs to be done to get this to happen? I'm happy to try and >> get it done, but a little direction would be really handy. ;) >> > > The workflow is pretty simple. > >1. author submits change >2. reviewer reviews change >3. someone responds to feedback >4. "someone" becomes "author", repeat > > Right now we're stuck in the middle of step 3, but given that therve does > not appear to be actively working on this branch, the path forward is > clear. *You* become "someone", and submit a patch that finishes dealing > with the issues that you have mentioned as not already taken care of by > therve's subsequent changesets. The best way to do this is to submit a > patch against the branch, rather than against trunk. Given such a patch, a > twisted committer can then apply the patch to the branch and submit to > buildbots (etc) as appropriate. By submitting it against the branch, you > make it easy for the reviewer to examine the changes you're submitting in > isolation from the rest of the larger change, to see if they address the > points that you've brought up. > > If the reviewer is happy with your changes, then the patch + branch will be > immediately merged to trunk; of course, the next review might have a little > more feedback for you to deal with ;). > > Thanks for your interest! > > That's kind of what I figured. >From my previous review of the current status, it looks pretty well done to me, but I'll start taking a look at it in more detail, and see what I can come up with. Might need some more tests, etc. Kevin "Someone" Horn ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
[Twisted-Python] Is it necessary to utilize twisted.cred in twisted web?
I have googled this topic and found and example in (A) http://www.mail-archive.com/twisted-...@twistedmatrix.com/msg01796.html well, another simpler example is (B) http://www.mail-archive.com/twisted-...@twistedmatrix.com/msg01788.html My questions are: 1. Does the approach in (A) be recommended? To generate resource dynamically seems not efficient and not necessary for simple scenario. Is there other way to bind twisted.cred and twisted.web together? (except the deprecated twisted.web.guard) 2. The approach in (B) which suggests that request.getSession() along is quite enough to implement an simple authentication feature. Here the "simple scenario" means to guard some resource with username and password. To do it: In a protected resource, just to check for a flag in the session, if failure, then redirect to login page. If succeeded, render the resource. Why shall we bother the portal, credentials, checker, ? Any suggestion? Thanks in advance. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] Is it necessary to utilize twisted.cred in twisted web?
Hi, I'd love to provide a 'canonical answer' to this question, but unfortunately it is something that I've been confused with in the past too. I'm hoping there is a sort of 'best practice' answer to this, and I'd additionally hope that this answer might appear in this extremely good running series on Twisted Web: http://jcalderone.livejournal.com/tag/sixty+seconds thanks, Alex On Mon, Oct 5, 2009 at 9:08 PM, biziap biziap wrote: > I have googled this topic and found and example in > (A) http://www.mail-archive.com/twisted-...@twistedmatrix.com/msg01796.html > well, another simpler example is > (B) http://www.mail-archive.com/twisted-...@twistedmatrix.com/msg01788.html > > My questions are: > 1. Does the approach in (A) be recommended? To generate resource > dynamically seems not efficient and not necessary for simple scenario. > Is there other way to bind twisted.cred and twisted.web together? > (except the deprecated twisted.web.guard) > > 2. The approach in (B) which suggests that request.getSession() along > is quite enough to implement an simple authentication feature. Here > the "simple scenario" means to guard some resource with username and > password. > To do it: In a protected resource, just to check for a flag in the > session, if failure, then redirect to login page. If succeeded, render > the resource. Why shall we bother the portal, credentials, > checker, ? > > Any suggestion? Thanks in advance. > > ___ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > -- Alex Clemesha clemesha.org ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] Is it necessary to utilize twisted.cred in twisted web?
crossposted to twisted-...@twistedmatrix.com, which is probably a better venue... On Oct 6, 2009, at 12:08 AM, biziap biziap wrote: > I have googled this topic and found and example in > (A) http://www.mail-archive.com/twisted-...@twistedmatrix.com/msg01796.html > well, another simpler example is > (B) http://www.mail-archive.com/twisted-...@twistedmatrix.com/msg01788.html > > My questions are: > 1. Does the approach in (A) be recommended? To generate resource > dynamically seems not efficient and not necessary for simple scenario. > Is there other way to bind twisted.cred and twisted.web together? > (except the deprecated twisted.web.guard) There's a few problems with this approach. The biggest is that it requires username/password data to be sent on every authenticated request. Another one is more of a design principle; that you shouldn't have account/permissions code inside resource display code. I violate this principle all the time ;-) The use of dynamic resource instantiation is a common idiom in twisted.web coding, though. it isn't inherently inefficient, as long as your resource objects are fairly sane. > 2. The approach in (B) which suggests that request.getSession() along > is quite enough to implement an simple authentication feature. Here > the "simple scenario" means to guard some resource with username and > password. > To do it: In a protected resource, just to check for a flag in the > session, if failure, then redirect to login page. If succeeded, render > the resource. Why shall we bother the portal, credentials, > checker, ? true, depending on your needs, this may be all that you need. from your description, though, it sounds like you'd be doing this authentication step in every resource you want to protect, which could become tedious (aka error-prone) in a big project. twisted.cred can seem daunting when you're just trying to protect a trivial web resource or two, but for more advanced uses like more complicated authentication levels, it's worth the time to learn. also, a big part of its real value comes when you need to support a variety of protocols and/or authentication types. -phil ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python