[Twisted-Python] Cancel/stop Deferred() at any time

2009-07-14 Thread vitaly
Hello, is there any way to cancel the Deferred callback in those examples? 1. d = defer.Deferred() d.addCallback(methodA).addErrback(methodErr) d.callback(None) 2. d = methodB().addErrback(methodErr) wfd = defer.waitForDeferred(d) Appreciate any help. ___

Re: [Twisted-Python] Cancel/stop Deferred() at any time

2009-07-14 Thread vitaly
Thank you, "cancel" callback - stop running now what you've been asked to exec. Example: some SQL query that takes 5 min and I need to cancel it anywhere in the middle and it, of course, it doesn't matter what the result set. As far as I see from base.py and client.py, some sort of timeout no

[Twisted-Python] OS for Twisted Framework to run on

2009-08-04 Thread vitaly
hi, is there any significant reason/advantage to run the Twisted Framework on Linux or on FreeBSD? Appreciate the help. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

[Twisted-Python] time between request and response

2009-09-10 Thread vitaly
Hi, is there any way to calculate time spent between AMF Request and appropriate AMF Response from TwistedGateway (without using Python's profilers) ? Appreciate the help. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twiste

[Twisted-Python] Preprocessor question

2009-09-10 Thread vitaly
hi, can anyone please point me to the doc-s or just explain what does that line mean on Twisted: [root:twisted:375] Preprocessor expands to: None Thank you. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi

Re: [Twisted-Python] Preprocessor question

2009-09-11 Thread vitaly
Can you point me please to the documentation,may be examples, that explains in details "preprocessor" feature? Quoting "Nick Joyce" : > This _appears_ to be a log message when using the TwistedGateway from > PyAMF. PyAMF gives the option to be able to preprocess service method > calls, to set

[Twisted-Python] twisted python usage

2009-10-02 Thread vitaly
hi, I'm trying to accomplish to work couple of CLI commands without luck. http://twistedmatrix.com/projects/core/documentation/howto/options.html and test/test_usage.py were not really helpful. Commands: 1.python test.py cmd1 -s 'dfsgdfg' -e 'sdfgdfg' 2.python test.py cmd2 -t 123 3.python test.p

Re: [Twisted-Python] twisted python usage

2009-10-02 Thread vitaly
Quoting "Glyph Lefkowitz" : > On Fri, Oct 2, 2009 at 12:47 PM, wrote: > >> hi, >> > > Hi, Vitaly! > > >> I'm trying to accomplish to work couple of CLI commands without luck. >> > > >> http://twistedmatrix.com/projects/co

Re: [Twisted-Python] twisted python usage

2009-10-02 Thread vitaly
eep doing. Quoting exar...@twistedmatrix.com: > On 05:47 pm, vit...@synapticvision.com wrote: >> Quoting "Glyph Lefkowitz" : >>> On Fri, Oct 2, 2009 at 12:47 PM, wrote: >>>> hi, >>> Hi, Vitaly! >>>> I'm trying to accomplish to work couple of CLI

[Twisted-Python] How to chain deferred calls

2009-10-21 Thread vitaly
hi, how can I chain in defer methods that could raise exception while showing the exception that coming from method? I mean, if I'll do: return ( adc1().abc2().abc3().addErrback("Common2AllException") ) than "Common2AllException" will be raised if abc1() raise Exception, but I'd like to see

Re: [Twisted-Python] How to chain deferred calls

2009-10-22 Thread vitaly
Thank you for response. the issue is if adc1() will raise up an exception, than following it .addErrback() will never be called cause adc1() will exit or raise Exception. Quoting "Valeriy Pogrebitskiy" : > Add another .addErrback() directly after adc1() - to handle that > specific exception

Re: [Twisted-Python] How to chain deferred calls

2009-10-22 Thread vitaly
me too, may be its because of the way I'm calling the chain: return ( self.abc1(). addErrback(self.handleFailure1). addCallback(self.abc2,args). addCallback(self.abc3). addErrback(self.handleFailure2) ) I see no call to self.handleFailure1() at all, abc1() just fail on exception

Re: [Twisted-Python] How to chain deferred calls

2009-10-22 Thread vitaly
Correct, sorry, tried: return ( self.abc1(). addErrback(self.handleFailure1). addCallback(self.abc2,args). addCallback(self.abc3). addErrback(self.handleFailure2) ) def abc1(self): if t.test() is None: raise Exception("Error11") else: d = defer.Deferred()

Re: [Twisted-Python] How to chain deferred calls

2009-10-22 Thread vitaly
Thank you a lot for pointing me to the Twisted doc-s, but we're discussing the following snippet: return ( self.abc1(). addErrback(self.handleFailure1). addCallback(self.abc2,args). addCallback(self.abc3). addErrback(self.handleFailure2) ) def abc1(self): if t.te

Re: [Twisted-Python] How to chain deferred calls

2009-10-22 Thread vitaly
Very, very close to want I wanted to understand, thank you! One more q please: what if I complicate the abc1() like following, is this expected to work or again I've missed the point? return ( self.abc1(). addErrback(self.handleFailure1). addCallback(self.abc2,

Re: [Twisted-Python] How to chain deferred calls

2009-10-22 Thread vitaly
This is it! Thank you. Quoting "Andrew Bennetts" : > vit...@synapticvision.com wrote: > [...] >> def abc1(self): >> if t.test() is None: >>raise Exception("Error11") >> else: >>d = defer.Deferred() >>d.callback(1) >>return d >> >> >> and basically, I've

[Twisted-Python] Caching mechanism

2009-11-09 Thread vitaly
hi, is there any cache mechanism for twisted? Could one point me please to that docs? Thank you. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Caching mechanism

2009-11-09 Thread vitaly
Caching the results of some particular method calls, so other server side methods can access those results (I'm thinking about example of global variable per entire server, so once imported, such variable content could be access). Quoting exar...@twistedmatrix.com: > On 05:41 pm, vit...

Re: [Twisted-Python] Caching mechanism

2009-11-09 Thread vitaly
Such global variable(lets say dictionary) will have any size limit? Quoting "Andy Fundinger" : > Part of the beauty of twisted is that you don't actually need to do anything > special to achieve that, just create a global dict or other object of your > choice and access it as needed. More likel

[Twisted-Python] Amount of concurrent connections

2009-11-12 Thread vitaly
hi, what would be expected amount(+-) of concurrent connections for twisted reactor if single request to gateway eq 1Kb and response back 30Kb (I mean response data much more bigger than request)? (1Gb network card on twisted machine) Appreciate the help. __

[Twisted-Python] Multi-reactor architecture

2009-11-12 Thread vitaly
hi, what would be the right thing to start from in order to build multi-reactor arch to handle thousands of concurrent connections? Appreciate the help. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin

Re: [Twisted-Python] Amount of concurrent connections

2009-11-12 Thread vitaly
Sorry, forgot to mention, per second. Amount of concurrent connections per second. Quoting "Eero Nevalainen" : > vit...@synapticvision.com wrote: >> hi, >> what would be expected amount(+-) of concurrent connections for >> twisted reactor if single request to gateway eq 1Kb and response >

Re: [Twisted-Python] Amount of concurrent connections

2009-11-12 Thread vitaly
Of course its also depend on frequency of r/r, but also on size of data. Or am I missing something? Quoting "Bokhan Artem" : > vit...@synapticvision.com пишет: >> hi, >> what would be expected amount(+-) of concurrent connections > > Why this should depend on size of responses/requests? > >

Re: [Twisted-Python] Multi-reactor architecture

2009-11-12 Thread vitaly
How reverse proxy knows to balance between couple of twistd processes? Do you have may be an example(or doc link) of such proxy that can distributing connections to each twistd process? Quoting "Reza Lotun" : >> hi, >> what would be the right thing to start from in order to build >> multi-rea

Re: [Twisted-Python] Multi-reactor architecture

2009-11-12 Thread vitaly
You right, distributed systems architecture. Probably I need to rephrase my question more precisely: how to build distributed system architecture with Twisted technology only ? As you mentioned, even reverse proxy could be a another twisted process. Quoting "Reza Lotun" : >> How reverse prox

Re: [Twisted-Python] Multi-reactor architecture

2009-11-13 Thread vitaly
Doesn't the event loop have a limit of connections it could handle? Quoting "Reza Lotun" : >> hi, >> what would be the right thing to start from in order to build >> multi-reactor arch to handle thousands of concurrent connections? > > Why would you want multiple reactors? The only reason would

Re: [Twisted-Python] Multi-reactor architecture

2009-11-13 Thread vitaly
I've get confused enough already :-)) Once there is a Site that serving many clients and reactor.listenSSL(), for example, that actually serving many TCP connections and all these going through TwistedGateway, my logic, please correct me if I wrong, says at some point there will be a limit

Re: [Twisted-Python] Multi-reactor architecture

2009-11-13 Thread vitaly
thank you for such detailed response. I feel, finally I've succeed to express my original question correctly. So if I go one step forward, and lets assume that indeed there is such limit of concurrent connections, THAN: should it be resolved by another architecture or another usage type of Tw

Re: [Twisted-Python] Multi-reactor architecture

2009-11-13 Thread vitaly
So if I get stick to the "vertical scalability"(Site has sessions), is it gonna be helpful for performance to run Twisted reactor on a single core machine vs multi-core machine (after all Python itself has a Global Interpreter Lock)? OR the entire "TwsitedGateway+listenSSL+Site+reactor" USAG

[Twisted-Python] server push data to client

2009-11-17 Thread vitaly
hi, what could be the way(Producer/Consumer?) and simple,basic example to push data(~10Kb) from Twisted based server(that listening for incoming requests) into client side(for example FLEX) not as a response to the incoming request, but occasionally, triggered by server side??? In tradition

Re: [Twisted-Python] server push data to client

2009-11-18 Thread vitaly
Thank you. Did anyone tried AmFast: http://code.google.com/p/amfast/ ??? Quoting lasizoillo : > 2009/11/17 : >> hi, >> what could be the way(Producer/Consumer?) and simple,basic example to >> push data(~10Kb) from Twisted based server(that listening for incoming >> requests) into  client side(

[Twisted-Python] long-polling channels with Twisted

2009-11-18 Thread vitaly
hi, is there any example how to implement long-polling channel with Twisted while using reactor()? Thank you. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] long-polling channels with Twisted

2009-11-19 Thread vitaly
Long-polling/push over HTTP from server to clients. Quoting "Itamar Turner-Trauring (aka Shtull-Trauring)" : > On Wed, 2009-11-18 at 18:22 -0500, vit...@synapticvision.com wrote: >> hi, >> is there any example how to implement long-polling channel with >> Twisted while using reactor()? > > Wha

Re: [Twisted-Python] long-polling channels with Twisted

2009-11-19 Thread vitaly
Found this one easily to suite in current environment: http://code.google.com/p/amfast/wiki/MessagingServer#Producer/Consumer_Messaging Quoting "Reza Lotun" : > Hi, > >> is there any example how to implement long-polling channel with >> Twisted while using reactor()? > > I'm not sure what you me

[Twisted-Python] TwistedGateway instead of TwistedChannelSet

2009-11-19 Thread vitaly
hi guys, how the following example could be re-created using TwistedGateway, reactor.listenSSL and reactor.run instead of TwistedChannel? Appreciate the help. # -- import logging import sys from twisted.application import service, strports from twisted

[Twisted-Python] twisted.web.server sessions

2009-11-21 Thread vitaly
hi, is the re any convenient way to get from twisted.web.server all non expired sessions in one single call? Regards, Vitaly. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted

[Twisted-Python] cron-style scheduler for Twisted

2010-04-14 Thread vitaly
hi, is there any cron-style scheduler in Twisted? Could one point me to the docs where it could be found? Thanks. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] cron-style scheduler for Twisted

2010-04-14 Thread vitaly
Thank you. Quoting exar...@twistedmatrix.com: > On 01:11 pm, vit...@synapticvision.com wrote: >> hi, >> is there any cron-style scheduler in Twisted? >> Could one point me to the docs where it could be found? >> Thanks. > > There's . > > Jean-Paul > >

[Twisted-Python] Twisted usage

2010-04-14 Thread vitaly
hi, is there any examples how to create (using Twisted) client that creates several TCP requests one after another and handle in asynch manner TCP responses for previous requests? Thanks. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com

Re: [Twisted-Python] Twisted usage

2010-04-15 Thread vitaly
Yes, thank you. Quoting "Glyph Lefkowitz" : > > On Apr 14, 2010, at 10:51 AM, vit...@synapticvision.com wrote: > >> hi, >> is there any examples how to create (using Twisted) >> client that creates several TCP requests one after another and handle in >> asynch manner TCP responses for previous r

[Twisted-Python] Shared resource manioulation example

2010-05-28 Thread vitaly
Hi, I'm looking for a Twisted based example how it should be properly done update/delete of global dictionary's SAME key:value pair from different functions all together. Or by another words, two functions are trying to update the same key:value pair of the same dictionary at the same time, than

Re: [Twisted-Python] Shared resource manioulation example

2010-05-28 Thread vitaly
Thank you for reply. I'm calling each update/delete function as a separate Deferred, no explicit threads on those functions. OK than, let's complicated it a bit with "dictionary of lists of dictionaries" instead of simple dictionary and let's put it all under reactor(). There are 2 incomi

Re: [Twisted-Python] Shared resource manioulation example

2010-05-28 Thread vitaly
the same dictionary at the same time, than how to do >> it properly with Twisted? >> >> Thanks a lot. >> > > Vitaly, > > As a relative newbie to both Twisted and Python (I wish I had more time > to play with it, as there are lots of things I don't really

Re: [Twisted-Python] Shared resource manioulation example

2010-05-28 Thread vitaly
Of course its up to me to determine if it's a data collision or not, but I was thinking may be Twisted can provide me with some already existing mechanism of its own. After all its already a pretty massive and complicated framework with tons of capabilities ... But I'd like to get back to the

Re: [Twisted-Python] - SPAM!!!!!

2010-12-02 Thread vitaly
twisted-python@twistedmatrix.com ADMINISTRATOR BLOCK THIS RUSSIAN WHO IS SPAMMING OUT LIST PLEASE: Vovan regards, subscriber. Quoting Vovan : > ?? ??? ? ?? ?, ? ??? > ?? ?? ?? ??? ?? > ??