Return-Path: Delivered-To: apmail-incubator-libcloud-archive@minotaur.apache.org Received: (qmail 14879 invoked from network); 7 Feb 2011 18:03:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Feb 2011 18:03:57 -0000 Received: (qmail 69289 invoked by uid 500); 7 Feb 2011 18:03:57 -0000 Delivered-To: apmail-incubator-libcloud-archive@incubator.apache.org Received: (qmail 69151 invoked by uid 500); 7 Feb 2011 18:03:55 -0000 Mailing-List: contact libcloud-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: libcloud@incubator.apache.org Delivered-To: mailing list libcloud@incubator.apache.org Received: (qmail 69143 invoked by uid 99); 7 Feb 2011 18:03:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Feb 2011 18:03:54 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tomaz@cloudkick.com designates 209.85.214.47 as permitted sender) Received: from [209.85.214.47] (HELO mail-bw0-f47.google.com) (209.85.214.47) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Feb 2011 18:03:49 +0000 Received: by bwz10 with SMTP id 10so4880561bwz.6 for ; Mon, 07 Feb 2011 10:03:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.34.142 with SMTP id l14mr3744501bkd.152.1297101807536; Mon, 07 Feb 2011 10:03:27 -0800 (PST) Received: by 10.204.14.16 with HTTP; Mon, 7 Feb 2011 10:03:27 -0800 (PST) In-Reply-To: <3693C551-7009-4248-AA94-A76FCE3E3655@apache.org> References: <3693C551-7009-4248-AA94-A76FCE3E3655@apache.org> Date: Mon, 7 Feb 2011 19:03:27 +0100 Message-ID: From: Tomaz Muraus To: libcloud@incubator.apache.org Content-Type: multipart/alternative; boundary=000325556c8a79ca58049bb50cf8 Subject: Re: [libcloud] libcloud roadmap and plans for the future --000325556c8a79ca58049bb50cf8 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Feb 7, 2011 at 4:04 PM, Jerry Chen wrote: > > On Feb 7, 2011, at 8:48 AM, Tomaz Muraus wrote: > > > On Mon, Feb 7, 2011 at 4:57 AM, Jed Smith wrote: > I agree. Speak up, people! > > BTW, I started up a wish list on the wiki a while back: > http://wiki.apache.org/incubator/LibcloudWishlist > > I'm not convinced it has the best voting mechanism (it acts like a IRC > topic vote!) but at least we can get an idea of the weighting. > Cool, I have updated the wiki with other ideas. On Mon, Feb 7, 2011 at 4:24 PM, Jed Smith wrote: > On Mon, Feb 7, 2011 at 10:04 AM, Jerry Chen wrote: > > > > As long as the abstraction doesn't create weird race conditions, nor > forces us to modify each driver for async stuff to work, I would be okay > with this capability. I just can't wrap my head around how one would test > for correctness and stability. > > I believe it would. You now need to track what requests you have out > and call the appropriate callback, a very difficult (and tedious > task). A supposedly stateless library just inherited a /lot/ of state. > In Twisted and other event-driven system everything runs inside a single thread (reactor) and as long you are only using asynchronous API, you don't need to worry about race conditions. In any case, adapting the library for async stuff would definitely require some refactoring, but I could argue that this might not be such a bad idea. Anecdote: I solved this problem for the Linode iPhone app. If you're > not familiar with UIKit/Foundation development for iOS, it's all > asynchronous. I spent very many hours debugging the code that did the > linkage between APIRequest instances and the callback event on them. > It got so difficult to do properly with Apple's APIs that I eventually > stumbled upon a hopelessly inelegant solution: every request the > iPhone app makes is a batch, with a test.echo action containing an ID > which is a key into the pending-requests dictionary. Seriously. > > That's what asynchronous ends up becoming in a request-receive > environment. It's a rabbit hole of inelegant solutions and a lot of > tedious state tracking in the library. Yes, I agree, debugging in a lot of callback oriented frameworks can be a huge pain. One of the good examples of this is NodeJS - with a lot of nested callbacks and no long stack traces finding a root cause can be pretty painful (Twisted partially solves this with defer.SetDebugging(True)). So, yes, in general debugging and writing asynchronous code can be painful, but Twited has enough of syntactic sugar which makes it a lot less painful (deferreds, inlineCallbacks, ...). > -- > Jed Smith > jed@jedsmith.org > --000325556c8a79ca58049bb50cf8--