FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Infrastructure

 
 
LinkBack Thread Tools
 
Old 10-29-2009, 03:04 AM
Ben Boeckel
 
Default Suitability of Python for daemon processes

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Toshio Kuratomi wrote:

> On Wed, Oct 28, 2009 at 05:08:03PM -0400, Mike McLean wrote:
>> On Mon, Oct 26, 2009 at 12:41 AM, Dennis Gilmore <dennis-
OMEdqnBlyiw@public.gmane.org> wrote:
>>
>> The daemon distinction might be wrong thing to fixate on here. There
>> is nothing in that distinction that should exclude python (or most any
>> language). I think the real factors of concern are: size, complexity,
>> speed, system load, robustness, and security.
>>
> <nod> By and large I agree with you. One thing further to think about is that
> becoming dependent on a tool written in an interpreted language means that
> you need to install that language on your system and may become tied to a
> specific version of that language. In theory, this shouldn't be worse than
> tying yourself to a specific C library but in practice I've found that
> parallel installing interpreters and their libraries is a lot less supported
> than parallel installing a C lib.
Hopefully we have 2.4 as the minimum version. I'm pretty sure 2.4 is ubiquitous
even on the enterprise-y distributions, but if we need older, we can try for
that as well.

> Using python in Fedora Infrastructure probably isn't too big a deal as we
> have abundant python programmers here to port things forward if the main
> developers don't but it is something to consider with other languages or
> in other environments.
We're aiming to get it to work on RHEL/CentOS 4 (base, not + EPEL) and Debian
stable so that current mirrors running systems that old don't need to upgrade
the OS to start using our software (I'm pretty sure we have the hardware to run
test instances of the software with various setups). If the libraries we end up
using just aren't available, I think RHEL 5 will be a suitable minimum. When
Python 3 comes looming over any distribution that starts using our software, we
should be able to help port things over. I'd expect Fedora to be the first for
this to happen to, but I could see Gentoo having howtos for getting 3.0 as the
main Python before that (not that servers would be running such a setup
anyways).

> -Toshio

- --Ben
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBCAAGBQJK6RQ4AAoJEKaxavVX4C1Xw54P/2z9WxTx03+EQLF9LMjtrzSV
gdwCAoV4kmjI0eiWN1uaMVZp8qRWuWDF7WW74wl4wbbwoi5ipc +iekuM8a91Mzzp
jwE/MAbRufX6zCFkZL48ToU9Hvga02CeCIC6wmQIsruJ/TT5Y3O3XdHyVXSB1DD/
+okXSLTyL0PpVKBG+v/qy6Gn+qNzNBLTIzJQkRG4bQS7ThbfteumD5gdGDpx51nm
RNze8l+e3giY/XQzO+tf9025xv9Wac3e0DzWSTcDYKtiaEDGbeF/asr767gV5Q8f
RjbqzKcLUHn15Rp8jAWl4KtGo9OgbL9MQi3nPsFArqbzb836cu O/LTNkG+BnbhPj
49sVele1+GMcOOlwdtT4qvAOg7WH668FgNc5x0zAx6xxP1RGsi 5oLVEFtRReUXx1
t4sOFT/qIKTSbJW0BrOvFJ7m2DNaq5v/JE5vYSZ30KccjiW4PAzBzRPNdl2tbuD7
j9o9N9bTTe+HFSI+6VBiwvf193oS8nS0oZxBcUaBsvoR5FlKw1 GggclHVEYBU3jK
rj3dyBh7OH9QlukX8ueBOp7yIydsz5AkWNMwRS9LtsRmubGBvr O5qE24DE0M7YVv
MkeQwPSwkAQ08OUKlK8NanHoMdFNSSkqJeEyHWNgHP0oekpjwG HyBml+j0Vgpiy1
eiTRw28QhGdA94AQOl4V
=X7Gb
-----END PGP SIGNATURE-----


_______________________________________________
Fedora-infrastructure-list mailing list
Fedora-infrastructure-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-infrastructure-list
 
Old 10-29-2009, 03:13 AM
Ben Boeckel
 
Default Suitability of Python for daemon processes

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mike McLean wrote:

> On Mon, Oct 26, 2009 at 12:41 AM, Dennis Gilmore <dennis-
OMEdqnBlyiw@public.gmane.org> wrote:
>> On Sunday 25 October 2009 06:26:49 pm Jeroen van Meeuwen wrote:
>>> And koji.fedoraproject.org, no?
>> koji is a mod_python app. it doesnt run as a daemon at all.
>> but it it all python.
>
> There are python daemons in the system though. The builders run kojid,
> which is a daemon, and the process that triggers repo regeneration
> (kojira) is a daemon. Of course, these are not public facing -- they
> really only talk to the hub.
>
> The daemon distinction might be wrong thing to fixate on here. There
> is nothing in that distinction that should exclude python (or most any
> language). I think the real factors of concern are: size, complexity,
> speed, system load, robustness, and security.
True. I think the speed at which we can deliver with Python makes it much more
attractive, even if not just at first. We could something similar to what git
did with bash and replace the Python with C incrementally if necessary, but I
think that if we go about it right, it shouldn't be much of an issue.

> It's entirely possible to create large and complex systems with
> Python. It's expressiveness and interpreted nature are a big help
> here. Robustness is probably more a factor of design and good coding
> than the language itself. That being said, the relative ease of
> programming in Python, coupled with its exception handling, likely
> give it an advantage over C in this department (over the same
> development time at least). That's my opinion; others may disagree
> (and of course Python is not the only rapid development language with
> good exception handling).
I agree here. This thread is a fact-finding mission and research. We wanted to
make sure we weren't headed down the wrong road before we headed out.

> Security threats are everywhere. With Python at least you have to
> worry much less about buffer overflows, but of course you can
> introduce security flaws in any language.
Of course.

> Obviously, as an interpreted language, system load and speed are where
> Python suffers. There are optimization tricks, but you'll never get
> close to execution speed of C. You can rewrite crucial portions in C,
> though I rarely see that actually done.
One place where we had concerns were when dealing with the "shopping list" I
referred to elsewhere in the thread. This list is 60MB on one of the Ubuntu
mirror directories we have here (our Fedora mirror has been decommissioned while
we await more disk space). I imagine Fedora's will be much larger due to the
drpm files and secondary architectures put even more into it. We have code that
is able to extract information without loading the entire file into our process
space. It's very close to what it would be if it were C except for a .split()
call on a string (but it's simple enough that a sscanf could do it as well if
needed) and the memory/strcmp stuff Python has baked in. Hopefully we will have
unit tests and timing on our code this weekend.

- --Ben
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBCAAGBQJK6RZ8AAoJEKaxavVX4C1XjsMP/0g54tOwnu0MhsH+uhZDx23N
uTHMs0CCOZaG+e4VJR3xocOU/Xul5IfZ2fDodKai9YwsA9S3ORuvLR0riKh0IbLW
Js8RJW7e2oBWDHUK9nCXIGbuJoPhQrwD+3x88LctxXIy6I34Sw +d8GvrT7vTxgdp
S2keUtAgOOm1JGw+JEAyutTa28yRGnFRLZmopgGAXNtUuFf2nv l77Dm1/R1T/9OE
YcFykF9eEt8LeZ/9M895eGswmASH3LFPTeYOhmz1g5xPHauu1y7wHoHBkfeFieVa
mhtMWLaA8ZfhLKt8FUBUALc0KcDlv42yqyCq7FeKipaaPpyWoH Gf6Ce4ZOKgLGPs
5KcDDfVg7xxYH9xoTJ0kiYfy/7ExDr70WUwFg4oRVAl6sEZhVl6+Iz+64UXGVU0z
3o5QH7OKOkyKI9iQheg0b3sXLuhNGyrGz+b0vaEYj7TtoQWHk9 qV5UEnoawsTXw+
f51GiQdeZmRNZS1N4m1reX2tUtw0ol1cHcpfpvdqOZazLaSVDw u7CbTyIfalmy79
fDc/yPWWPdcS+mU9LbgqBcEng4lzo/aQSMWHDDzk+r5uIuTibGzslP+hB/fnuuws
ibZvpaDZhLElmqcZbAqMZdHVvS5DCXUjeLcPcx5qJBZ3xrcLnO 3/GHapXVec3mIr
d9UZxP4emQ7cOl8DMkbJ
=Nhy3
-----END PGP SIGNATURE-----


_______________________________________________
Fedora-infrastructure-list mailing list
Fedora-infrastructure-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-infrastructure-list
 
Old 10-29-2009, 02:38 PM
Toshio Kuratomi
 
Default Suitability of Python for daemon processes

On Thu, Oct 29, 2009 at 12:04:08AM -0400, Ben Boeckel wrote:
> Hopefully we have 2.4 as the minimum version. I'm pretty sure 2.4 is ubiquitous
> even on the enterprise-y distributions, but if we need older, we can try for
> that as well.
>
Just a note. If you're targeting RHEL/CentOS4 as your minimum, you need to
target python-2.3 as your minimum python version.

-Toshio
_______________________________________________
Fedora-infrastructure-list mailing list
Fedora-infrastructure-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-infrastructure-list
 

Thread Tools




All times are GMT. The time now is 05:58 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org