[Stackless] announcing Concurrence Framework

Henk Punt henkpunt at gmail.com
Wed Jan 14 23:45:36 CET 2009


Hi,

Actually it is 'pyevent' i am using :-), i just had to rename it to
concurrence._event.pyx because of the way Pyrex handles
module/package names.... it is in the same directory as the core.py module.
I did need to fix some small issues with the original pyevent, 1 was a
ref counting issue, the other was that it would
drop out of the event processing loop on each unexpected/unhandled
exception. I changed that to just log the exception, because
i need to create server daemons that preferably just keep on going
(months of uptime).
Anyway, the _event module is only referenced from core.py and it
should therefore not be too difficult to swap it for something
else...
For now i will concentrate on writing documentation and examples though....

stay tuned!

p.s. I am very interested in comments on the API side of things, e.g.
is the library API consistent?, e.g. do all clients have a 'connect'
method?, all servers a 'serve' method?,
does the message passing thing work nice in practice? (I tried to
emulate Erlang a bit here with the Tasklet.receive method), etc etc.
I would prefere to have the API nice and consistent first
before fleshing out more implementation details (for instance the http
server does not handle POST  at the moment ....)

On Wed, Jan 14, 2009 at 9:07 PM, Phoenix Sol <phoenix at burninglabs.com> wrote:
> Very cool; thanks for sharing!
>
> I just recently pulled out my socketlibevent thing to play with, and while
> setting up libevent and pyevent I accidentally ran into 'libev'; have you
> seen this? There is already a python wrapper, 'pyev'. Anyway it's smaller,
> faster, has more features and supposedly fewer bugs.
>
> At a glance I didn't see where you pulled in libevent, but I take it you are
> not using pyevent... this is very interesting to me by itself; I've been
> wanting a good alternative to pyevent, and have been too lazy | busy to do
> it myself ;-)
>
> I look forward to going over your code more. Thanks again and take care.
>
> Phoenix Sol
> 541-646-8612
> 130 'A' Street,
> Suite 6
> Ashland, Oregon
> 97520
>
>
> On Mon, Jan 12, 2009 at 7:22 AM, Henk Punt <henkpunt at gmail.com> wrote:
>>
>> Hi,
>>
>> I would like to announce the availablility of the 'Concurrence
>> Framework'. (http://concurrence.googlecode.com)
>>
>> Basically it is a library build on top of Stackless that enables the
>> easy creation of high performance network servers
>> (http servers, chat servers, comet servers etc etc).
>>
>> It is similar in scope to the Twisted framework, but it uses a
>> Lightweight-processes-with-message-passing approach to concurrency as
>> opposed to Twisteds event-driven model.
>>
>> I have created this framework out of frustration with Twisteds model.
>> After working for some years with Twisted it has become apparent to me
>> that the event-driven model for IO/socket programming although very
>> performant, quite easily leads to difficult to maintain program
>> code...
>>
>> Instead I would prefer to program in a 'blocking' style like you would
>> traditionally do with threads. At the same time I still would like to
>> retain
>> the performance and lack of threading issues of event-driven IO.
>>
>> This is what the Concurrence Framework provides... (trough Stackless
>> and libevent)
>>
>> Most notably it already includes:
>> - a Socket API,
>> - a DBAPI 2.0 compatible implementation of a MySQL Driver
>> - an implementation of a HTTP1.1/WSGI compliant webserver.
>>
>> Some components are implemented in Pyrex for speed (low level
>> interface to libevent, IO buffer interface, low-level MySQL stuff).
>>
>> The code is currently quite usable, but some interfaces might still
>> change as I gather feedback from the community.
>>
>> In the following weeks I will try to finalize the core documentation
>> and I will create a proper website to host it.
>>
>> In the meantime, anyone interested can checkout the code from coogle code:
>>
>> svn checkout http://concurrence.googlecode.com/svn/trunk/ concurrence
>>
>> from there please follow the instructions in INSTALL.TXT (currently
>> Linux/MacOSX only).
>>
>> Documentation can be found in doc/_build/html/index.html, but this is
>> a work in progress...
>> Examples used in the documentation can also be found in the examples
>> directory.
>> The unittests in the test directory could also provide some guidance
>> on how to use the framework.
>>
>> Issues/feedback can be mailed to me or you can add an issue on
>> http://code.google.com/p/concurrence/issues/list.
>>
>> Enjoy,
>>
>> Henk Punt
>>
>> _______________________________________________
>> Stackless mailing list
>> Stackless at stackless.com
>> http://www.stackless.com/mailman/listinfo/stackless
>
>




More information about the Stackless mailing list