Return-Path: X-Original-To: apmail-qpid-users-archive@www.apache.org Delivered-To: apmail-qpid-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 000B91731D for ; Mon, 19 Jan 2015 14:04:25 +0000 (UTC) Received: (qmail 17216 invoked by uid 500); 19 Jan 2015 14:04:26 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 17178 invoked by uid 500); 19 Jan 2015 14:04:26 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 17156 invoked by uid 99); 19 Jan 2015 14:04:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jan 2015 14:04:25 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of prvs=24611055b9=rhs@alum.mit.edu designates 18.7.68.18 as permitted sender) Received: from [18.7.68.18] (HELO alum-mailsec-scanner-6.mit.edu) (18.7.68.18) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jan 2015 14:04:20 +0000 X-AuditID: 12074412-f79e46d0000036b4-88-54bd0eb1c214 Received: from outgoing-alum.mit.edu (OUTGOING-ALUM.MIT.EDU [18.7.68.33]) by alum-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP id 13.D1.14004.1BE0DB45; Mon, 19 Jan 2015 09:03:29 -0500 (EST) Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) (authenticated bits=0) (User authenticated as rhs@ALUM.MIT.EDU) by outgoing-alum.mit.edu (8.13.8/8.12.4) with ESMTP id t0JE3R3x017507 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT); Mon, 19 Jan 2015 09:03:28 -0500 Received: by mail-pd0-f170.google.com with SMTP id p10so25252851pdj.1; Mon, 19 Jan 2015 06:03:27 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.70.98.200 with SMTP id ek8mr43729978pdb.163.1421676207754; Mon, 19 Jan 2015 06:03:27 -0800 (PST) Received: by 10.70.47.106 with HTTP; Mon, 19 Jan 2015 06:03:27 -0800 (PST) In-Reply-To: <54B8DE9E.20000@redhat.com> References: <54B84527.5010402@redhat.com> <20150116080639.GI3432@redhat.com> <54B8DE9E.20000@redhat.com> Date: Mon, 19 Jan 2015 09:03:27 -0500 Message-ID: Subject: Re: c reactor / gordon's examples From: Rafael Schloming To: "proton@qpid.apache.org" Cc: "users@qpid.apache.org" Content-Type: multipart/alternative; boundary=001a11c22e8a59540a050d01c9e8 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrKKsWRmVeSWpSXmKPExsUixO6iqLuRb2+Iwdt7nBZrT3panF3xn9GB yWPqnQdsAYxR3DZJiSVlwZnpefp2CdwZx4/NYSpYrFpxr/UEcwPjO7kuRk4OCQETiSd39zNB 2GISF+6tZ+ti5OIQErjMKDH571NGCOcIk8THE00sIFVCAqUSj5c8YQSxeQUEJU7OfMIC0V0i cfNBG3MXIwdQjZdEe1soSJhTQENi68puZog5mxklzs6ZzgZSwyKgKvHwRg7EmACJD5t3MYPY wgJaEp0/D4LZbAKaEtsub2QDsUUETCUuXbnCCmIzCxhLTP+xgwVkDDPQqg9dhhMYBWchOWgW QgbCVJdYP09oFlivmsTtbVfZIWxtiWULXzMvYGRdxSiXmFOaq5ubmJlTnJqsW5ycmJeXWqRr ppebWaKXmlK6iRES4EI7GNeflDvEKMDBqMTDyxGwJ0SINbGsuDL3EKMkB5OSKO9V1r0hQnxJ +SmVGYnFGfFFpTmpxYcYJTiYlUR4A74AlfOmJFZWpRblw6SkOViUxHl/Llb3ExJITyxJzU5N LUgtgsnKcHAoSfD+5AUaKliUmp5akZaZU4KQZuLgBBnOJSVSnJqXklqUWFqSEQ+K9fhiYLSD pHiA9oK18xYXJOYCRSFaTzEac1w6uWsmE8eUEwdmMgmx5OXnpUqJ8x4EKRUAKc0ozYNbBEtt rxjFgf4W5nUDJjohHmBahJv3CmgVE9AqsV0gLxaXJCKkpBoYzQ8Xu1T7lIj+/rd6146bVee5 SwKnBJhWl79U8TFs81jvfs0/lGdOqfojmaMH7Rb+9ShbdPtY6OsjYeUVaX7zm5dbqyyqfMO6 cnXZ/G6HZ6s2Od/d59X48OrCho5VKyqP3jzQn55TdSi2MG7uBRV7Nj6mhbJfjtS/nTYv0cLA qOB/+Cnez9nLlViKMxINtZiLihMBkZl1/EgDAAA= X-Virus-Checked: Checked by ClamAV on apache.org --001a11c22e8a59540a050d01c9e8 Content-Type: text/plain; charset=UTF-8 My intention is to support a variety of scenarios for I/O. I believe it is a key requirement that we can create sockets/fds in either python or C and regardless of where they are created, they need to be serviceable by a single I/O loop written either buy us or by others in C or in pure python. (I think that covers all the bases, but if I'm missing a key combination, then let me know.) I believe the implementation is almost able to support all these scenarios now, modulo a few details here and there. I will post some code snippets of all the different permutations fairly soon (probably tomorrow as I am off today). --Rafael On Fri, Jan 16, 2015 at 4:49 AM, Gordon Sim wrote: > On 01/16/2015 08:06 AM, Flavio Percoco wrote: > >> One thing that I did want to mention (and forgot, obviously) is that >> for things like non-blocking IO, we want to make sure the API works >> well not just with eventlet but also with asyncio[0]. >> >> Also, it'd be worth taking a look at how the Twisted[1] api works since >> it's a long-time python project with an event based API like the one >> you guys are building for proton. >> > > > Yes, I very much agree on both points. There is a JIRA (with a patch > attached I believe) for python 3 support, and once that is in then figuring > out how it would work well with asyncio is one of the things I've had in > mind. Likewise with twisted. > > I knocked a couple of quick examples using the tornado event loop. There > is still some work there though to better control the write interest in > AMQP sockets, when that is triggered by non-AMQP events. > > > Hope this helps, >> Flavio >> >> [0] https://docs.python.org/3/library/asyncio.html >> [1] https://pypi.python.org/pypi/Twisted >> >> > --001a11c22e8a59540a050d01c9e8--