Python SocketServer timeout patch and Twisted (was: Is this project still active and under maintaince?)

49 views
Skip to first unread message

Giulivo Navigante

unread,
Apr 2, 2009, 8:25:32 AM4/2/09
to ml...@googlegroups.com
This message has been forwarded from a one to one dicussion involving
the status of mlapd, thanks Zhang for participation :+)

---------- Forwarded message ----------
From: Zhang Huangbin <michae...@gmail.com>
Date: 2009/4/2
Subject: Re: Is this project still active and under maintaince?
To: Giulivo Navigante <giulivo....@gmail.com>

On Apr 2, 2009, at 19:25, Giulivo Navigante <giulivo....@gmail.com> wrote:
> 2009/4/1 Zhang Huangbin <michae...@gmail.com>:
>> Another issue:
>>
>> As i posted in iredmail google group[1], there's a bug in python which
>> version is less than 2.6, reference:
>> - http://bugs.python.org/issue742598
>>
>> Maybe you should consider using twisted as socket server.
>>
>> [1] http://groups.google.com/group/iredmail/t/fe56951fceeca271
>
> it was a bug related to python, which has been fixed in version 2.6 so
> it should not be a problem anymore,

I don't think so. Many main-stream linux distrobutions ship
python-2.4.x, such as Red Hat Enterprise Linux/CentOS 5.x, and the
life cycle will be ended at least 5-6 years later. So i suggest you
migrate to twisted or other SocketServer (you know, just a
suggestion).

And the performance of twisted is better, so that mlapd can handles
more clients.

> but most important than all, I
> wanted to keep mlapd tiny and as less intrusive as possible, with very
> few dependencies in fact it just uses the standard python libraries
> and requires only python-ldap, moving to twisted would be nice but
> implies rewriting and a lot of new dependencies

I agreed, less dependence will make it easy to install and deploy. But
you know, suggestion is suggestion. :)

> Zhang , or Michael?

I'm Chinese, my chinese name in english is Zhang Huangbin. Call me
Zhang, thanks. but colleagues call me michael :)

> I opened some issues by myself with the details you provided to keep
> track of them in the future and I would thank you again for your
> appreciation, but it would be great if we could move this discussion
> too on the mailing list, to not have the private inbox filled by
> something that could be instead of public interest
>
> If you don't mind, I would forward there the discussion! :)

Go ahead sir. I agree, public and share them. :)

Giulio Fidente

unread,
Apr 2, 2009, 9:44:29 AM4/2/09
to mlapd
> On Apr 2, 2009, at 19:25, Giulivo Navigante <giulivo.naviga...@gmail.com> wrote:
> > 2009/4/1 Zhang Huangbin <michaelbi...@gmail.com>:
> > > Another issue:
> > >
> > > As i posted in iredmail google group[1], there's a bug in python which
> > > version is less than 2.6, reference:
> > > -http://bugs.python.org/issue742598
> > >
> > > Maybe you should consider using twisted as socket server.
> > >
> > > [1]http://groups.google.com/group/iredmail/t/fe56951fceeca271
>
> > it was a bug related to python, which has been fixed in version 2.6 so
> > it should not be a problem anymore,
>
> I don't think so. Many main-stream linux distrobutions ship
> python-2.4.x, such as Red Hat Enterprise Linux/CentOS 5.x, and the
> life cycle will be ended at least 5-6 years later. So i suggest you
> migrate to twisted or other SocketServer (you know, just a
> suggestion).

it is unfortunately true that a lot of ditributions ship older
versions, but I think this is something that should be taken care of
by the distributors, because there is already a fix ... if there is an
updated version (python 2.6 in our case) which includes important
fixes, should we (Red Hat or whatever) backport some of the changes
into 2.4 if we cannot upgrade the release we're shipping?

I'd like then to submit a bugzilla to Red Hat about this, anyway
consider that Fedora 10 already includes version 2.5.2 and 2.6.1 is
scheduled for Fedora 11 (currently in Beta)

> And the performance of twisted is better, so that mlapd can handles
> more clients.

unless you have gathered already some data, this would be difficult to
evaluate, I would say that mlapd will generally end up overloading the
LDAP servers in case of many concurrent requests earlier than
consuming all the local resources

> > but most important than all, I
> > wanted to keep mlapd tiny and as less intrusive as possible, with very
> > few dependencies in fact it just uses the standard python libraries
> > and requires only python-ldap, moving to twisted would be nice but
> > implies rewriting and a lot of new dependencies
>
> I agreed, less dependence will make it easy to install and deploy. But
> you know, suggestion is suggestion. :)

it is and thanks for letting us discuss this on the list :p

Zhang Huangbin

unread,
Apr 2, 2009, 10:03:52 AM4/2/09
to ml...@googlegroups.com

On Apr 2, 2009, at 21:44, Giulio Fidente <giulivo....@gmail.com>
wrote:


>>
>>>>
>>>>
>>>>
>>
> it is unfortunately true that a lot of ditributions ship older
> versions, but I think this is something that should be taken care of
> by the distributors, because there is already a fix ... if there is an
> updated version (python 2.6 in our case) which includes important
> fixes, should we (Red Hat or whatever) backport some of the changes
> into 2.4 if we cannot upgrade the release we're shipping?

> I'd like then to submit a bugzilla to Red Hat about this, anyway
> consider that Fedora 10 already includes version 2.5.2 and 2.6.1 is
> scheduled for Fedora 11 (currently in Beta)

Submit patches to upstream is always the right way. But I think we
have to maintain another copy of this patch in mlapd repository and
mention this in README file or whatever. Upstream won't merge it as
soon as we expect, and other users which already deployed old version
will get benefit from your patch.

Giulio Fidente

unread,
Apr 2, 2009, 12:35:42 PM4/2/09
to mlapd
On Apr 2, 4:03 pm, Zhang Huangbin <michaelbi...@gmail.com> wrote:
> On Apr 2, 2009, at 21:44, Giulio Fidente <giulivo.naviga...@gmail.com>  
> wrote:
> > it is unfortunately true that a lot of ditributions ship older
> > versions, but I think this is something that should be taken care of
> > by the distributors, because there is already a fix ... if there is an
> > updated version (python 2.6 in our case) which includes important
> > fixes, should we (Red Hat or whatever) backport some of the changes
> > into 2.4 if we cannot upgrade the release we're shipping?
> > I'd like then to submit a bugzilla to Red Hat about this, anyway
> > consider that Fedora 10 already includes version 2.5.2 and 2.6.1 is
> > scheduled for Fedora 11 (currently in Beta)
>
> Submit patches to upstream is always the right way. But I think we  
> have to maintain another copy of this patch in mlapd repository and  
> mention this in README file or whatever. Upstream won't merge it as  
> soon as we expect, and other users which already deployed old version  
> will get benefit from your patch.

looking deeply at the patch, it seems that the bug would not affect
mlapd anyway, because mlapd uses asyncore to create the socket and
asyncore in turn uses the module called "socket", not "ServerSocket"
which is instead the one affected by that bug!

no needs for change for us then and we should stay safe with the
version 2.4 bundled in Red Hat too

Giulio Fidente

unread,
Apr 2, 2009, 12:40:02 PM4/2/09
to mlapd
On Apr 2, 6:35 pm, Giulio Fidente <giulivo.naviga...@gmail.com> wrote:
> looking deeply at the patch, it seems that the bug would not affect
> mlapd anyway, because mlapd uses asyncore to create the socket and
> asyncore in turn uses the module called "socket", not "ServerSocket"
> which is instead the one affected by that bug!

sorry for the typo, the module patched is BaseServer from
"SocketServer", not "ServerSocket"
Reply all
Reply to author
Forward
0 new messages