[Twisted-Python] Re: [Twisted-web] ANN: Twisted 8.2 released

2009-01-06 Thread lasizoillo
2009/1/6 Christopher Armstrong :
> Version 8.2 of Twisted is now out (actually, it's been out for over a
> week now!). You can download it (in Windows, Mac, and source forms)
> at:
>
>http://twistedmatrix.com/

This year is for 9.x version, isn't?

A query to cheese shop returns 8.1 Version:

http://pypi.python.org/pypi?%3Aaction=search&term=twisted&submit=search

:-(

Thanks a lot for all twisted contributors

>
> Twisted 8.2 is a major feature release, also including many important bug 
> fixes:
>
>  * twistd now has a --umask option for specifying the umask
>  * Log observers can now be configured in .tac files
>  * ProcessProtocols can now implement processExited to get reliable
> notification of a process exiting
>  * FTPClient has many more convenience methods
>  * Twisted.words now has a standalone XMPP router
>  * Twisted.names now supports NAPTR records
>  * Twisted.web can now deal with multi-value headers and supports the
> Range header in requests for static files
>
> There have been many additional improvements which you can read all
> about in the release notes:
>
>
> http://twistedmatrix.com/trac/browser/tags/releases/twisted-8.2.0/NEWS?format=raw
>
>
> What is Twisted? From the web site:
>
> Twisted is an event-driven networking engine written in Python and
> licensed under the MIT license.
>
> Twisted projects variously support TCP, UDP, SSL/TLS, multicast, Unix
> sockets, a large number of protocols (including HTTP, NNTP, IMAP, SSH,
> IRC, FTP, and others), and much more. See more at:
>
>http://twistedmatrix.com/
>
>
> --
> Christopher Armstrong
> http://radix.twistedmatrix.com/
> http://planet-if.com/
> http://canonical.com/
>
> ___
> Twisted-web mailing list
> twisted-...@twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Proposal (almost) to switch from Lore to Sphinx

2009-11-17 Thread lasizoillo
2009/11/11 Kevin Horn :
>
> I have written up a proposal here:
>
> http://twistedsphinx.funsize.net/proposal.html
>

In this proposal you say:

Development Work
 * fabric fabfile for automation of docs workflow

Future Work
 * This page has some stuff on using cog in RestructuredText comments
to generate the output of sample scripts.

The second point (in Future Work) uses cog that is integrated in paver:
 * Paver allow automation of docs workflow (fabric is not needed).
 * With paver you can create an bootstraped instalation:

http://www.blueskyonmars.com/projects/paver/getting_started.html#but-people-don-t-have-paver-yet
 * Paver is compatible with setuptools and distutils.

I think that fabric is great for cluster distributions, but paver is
better for manage docs.

Regards,
 Javi

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


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

2009-11-17 Thread 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(for example FLEX) not as a response to the
> incoming request, but occasionally, triggered by server side???
>
> In traditional client/server arch, the server is listening, accepting
> and responding to the client's requests, but here I'm looking for
> something that initiated from server itself and pushing data to client.
>

In HTTP, the client can't open server sockets. The workaround is poll
to the server or open a persistent connection to the server. Some
clients can't open server sockets (they are behind a firewall) and you
need make the same tricks.

Orbited is a comet (server push) framework based on Twisted.
http://orbited.org/

Cometd (the twisted version) can be another example:
http://svn.cometd.com/trunk/cometd-twisted/
http://cometdproject.dojotoolkit.org/

Regards,
Javi

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] debugging a memory leak

2010-02-19 Thread lasizoillo
2010/2/20 Alec Matusis :
> Thank you Werner!
>
> I am playing with your object counter. But before I can interpret the
> results, I have to ask a possibly stupid question.
> Can someone explain to me this behavior of python 2.6 on x86 linux 2.6.24:
>
> 1) start interpreter
> Check the size of the interpreter process:
> $ps -orss -p24316
>  RSS
>  4212
>
> Size is 4MB, fine.
>
> 2) Allocate a huge chunk of memory:
 x=range(1,1000)
> Check the size of the interpreter process:
> $ps -orss -p24316
>  RSS
>  322460
>
> The RSS memory grew by 322460KB =314MB, as I expected
>
> 3) Delete this object:
 del x
> Check the size of the interpreter process:
> $ps -orss -p24316
>  RSS
>  244332
>
> So, the memory is far off its original value! It's up by nearly 240MB, and
> it never gets released. Why is that?
>
> 4)
 import gc
 gc.collect()
> 0
> $ps -orss -p24316
>  RSS
> 244404
> Not much luck here!
>
>

Repeat steps 2 to 4. No more memory is used. Python don't leaks more memory.

Repeat the steps reserving memory like this:
x = [0] * 1000

The memory is cleaned. The problem is in the virtual machine use of integers.

Excuse my poor explanation. My english is very bad,

Reggards,

Javi

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Twisted Sprint this Sunday

2010-03-19 Thread lasizoillo
2010/3/20  :
> Hi all,
>
> Flumotion is going to be hosting a sprint this Sunday (Mid-morning to
> evening, Spanish time).  I'll be introducing a lot of developers to the
> Twisted development process and trying to find them good first-time-
> contributor tickets to work on.  Even if you're not on the Iberian
> peninsula this weekend, you can still participate virtually. :)  If
> anyone wants to help out with reviews or suggest tickets that might be
> productive to work on, meet up with us in #twisted on Freenode.
>
Nobody expects the Spanish sprints. Good news :-)

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Comparing "Stackless Python + Nonblocking Stackless Modules" with Twisted.

2010-05-09 Thread lasizoillo
2010/5/9 Peter Cai :
> Today, a guy gave me an URL
> http://code.google.com/p/stacklessexamples/wiki/StacklessNonblockModules
>
> It's a replacement of standard python socket module. What make it
> different is that this module only blocks a tasklet, not an entire
> Python thread.
>

Gevents does monkey patching too and work with standard cpython.

> With this module and stackless python, theoretically, we can build a
> high concurrency network application framework which has a programming
> style close to traditional multi-thread module.
>

This works with pure-python approach, not with a database driver
written in C. If you monkey-patch python threads with your tasklets,
greenlets or anything else your are lost. Mix threaded model for
blocking things and tasklet/greenlet model for non-blocking thing are
not magic :-(

> The guy who gave me that URL asked a question, "Which style is better?
> The Twited's event-driven style or the imaginary one?"
>
>
> What do you think about it?  Of course, twisted is an mature framework
> we can trust, but doesn't the imaginary one also have pros?
>

IMHO (all from here)

Twisted is coherent with itself. Monkey-patched solutions pretends be
coherent with threaded style, but something fails.

Twisted pros:
 * Is not based in a thread style. Forget wich is a non-reentrant lock
and a dead-lock.
 * If you use a twisted library you don't need think about blocking
issues. If you don't use a twisted library, defer to thread.
 * It's mature.

Monkey patched pros:
 * Convert a thread style application to async one don't need a full
rewrite. Maybe it's not easy, but need less LOCs.
 * If your libraries are prue-python you don't need think, only apply
a monkey-patch.
 * Sounds cool.

Excuse my poor english,

Javi

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Punching a firewall with Twisted?

2010-06-17 Thread lasizoillo
2010/6/17 Stefan Reich :
> Dear 'Twisted' experts!
>
> I have a quick question that I am sure one of you guys can answer easily:
>
> What I want to do is open an incoming port on the router that connects
> my computer to the Internet. More precisely, I want my Python app do
> that automatically.
>
> In other words, this is about punching a hole into a firewall.
>
> I know that this is possible because there are applications that do
> that. Deluge does this, and Deluge uses Twisted. So I have tried to find
> out how/where Deluge tells Twisted to do this, but the Deluge sources
> are quite sizey, and I haven't found that particular needle in the
> haystack yet.
>
> So, can one of you people enlighten me here? :)
>


I don't know if this is Deluge's method, but sounds interesting:
http://samy.pl/natpin/?port=80

If you don't want see deluge code, maybe you want use a sniffer.
Wireshark is great for these things ;-)
http://www.wireshark.org/

Regards,
Javi

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python