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 216FE17C7F for ; Wed, 1 Oct 2014 14:55:34 +0000 (UTC) Received: (qmail 13202 invoked by uid 500); 1 Oct 2014 14:55:33 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 13168 invoked by uid 500); 1 Oct 2014 14:55:33 -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 13157 invoked by uid 99); 1 Oct 2014 14:55:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2014 14:55:33 +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=73518f9c31=rhs@alum.mit.edu designates 18.7.68.20 as permitted sender) Received: from [18.7.68.20] (HELO alum-mailsec-scanner-8.mit.edu) (18.7.68.20) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2014 14:55:27 +0000 X-AuditID: 12074414-f79446d000001f1d-4b-542c15ca3c29 Received: from outgoing-alum.mit.edu (OUTGOING-ALUM.MIT.EDU [18.7.68.33]) by alum-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP id 45.B8.07965.AC51C245; Wed, 1 Oct 2014 10:55:06 -0400 (EDT) Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) (authenticated bits=0) (User authenticated as rhs@ALUM.MIT.EDU) by outgoing-alum.mit.edu (8.13.8/8.12.4) with ESMTP id s91Et5cb006055 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Wed, 1 Oct 2014 10:55:06 -0400 Received: by mail-wi0-f169.google.com with SMTP id cc10so779017wib.4 for ; Wed, 01 Oct 2014 07:55:05 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.180.81.195 with SMTP id c3mr14774151wiy.11.1412175305025; Wed, 01 Oct 2014 07:55:05 -0700 (PDT) Received: by 10.27.171.21 with HTTP; Wed, 1 Oct 2014 07:55:04 -0700 (PDT) In-Reply-To: References: <1411061014.2381.10.camel@localhost> <1411408261.3082.45.camel@localhost> Date: Wed, 1 Oct 2014 10:55:04 -0400 Message-ID: Subject: Re: Proton tutorial: synchronous request-response From: Rafael Schloming To: "users@qpid.apache.org" Content-Type: multipart/alternative; boundary=f46d044401ce6ab02305045daf4e X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFKsWRmVeSWpSXmKPExsUixO6iqHtKVCfE4MAtTYuzK/4zOjB6TL3z gC2AMYrbJimxpCw4Mz1P3y6BO2NNazt7QWN5xaefbA2M75K7GDk5JARMJBr39zFD2GISF+6t Z+ti5OIQErjMKHGrYyIzhHOfSeL6nB1MEM4ERolfDy+AtfAKCEqcnPmEBaK9WGL27x9A7RxA RZ4S939pgoQ5gTYce3cWqncLk0TzomeMIAkWARWJPZevs0DMCZCYeOU32ExhASuJhc+esYHY bAKaEtsubwSzRQSMJVoXv2YFsZkFvCTef2pknsAoMAvJGbOQpGYBncEsoC6xfp4QRFhbYtnC 18wQtprE7W1X2ZHFFzCyrWKUS8wpzdXNTczMKU5N1i1OTszLSy3StdDLzSzRS00p3cQICW+R HYxHTsodYhTgYFTi4VVI0A4RYk0sK67MPcQoycGkJMprKqwTIsSXlJ9SmZFYnBFfVJqTWnyI UYKDWUmEdzY/UI43JbGyKrUoHyYlzcGiJM77bbG6n5BAemJJanZqakFqEUxWhoNDSYKXFxjH QoJFqempFWmZOSUIaSYOTpDhXFIixal5KalFiaUlGfGgiI8vBsY8SIoHaO9PEZC9xQWJuUBR iNZTjJYci/pe9jJxvDn8Dkiu6/zWzyTEkpeflyolztsO0iAA0pBRmge3DpbkXjGKA30vzMsN chUPMEHCTX0FtJAJaGHyGm2QhSWJCCmpBsY6nlmXlsl7nzNM/HTAfv6Vc4eTPeRvzTA5d8M8 a8e7pA3J8im/l+UtCMjvse864eOx/N5CvSpj1bqzK2JWOx9MbG+45v/SZdqc9LkmKzY+WMJW UN/KMEG41Tv0+rrup+sXuTxvqFH9U5U/9fnjI0dv9Sc1/L8kID99fXDYpM0B+16ESTk36n1T YinOSDTUYi4qTgQAqZ3HaU0DAAA= X-Virus-Checked: Checked by ClamAV on apache.org --f46d044401ce6ab02305045daf4e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Yes, right now the demo consists of some shared convenience/utility code along side the Spout, Drain, and Server classes that define the actual client/server behavior. I intend to pull the utility code into proton-j proper and pull in the Spout, Drain, and Server classes (or possibly a simplified/better documented version of them) as examples. --Rafael On Wed, Oct 1, 2014 at 9:58 AM, Martin, Jimmy < jamesmartin@paypal.com.invalid> wrote: > Rafael, > > Do you envision the code in your demo async framework becoming an officia= l > part of proton-j in the future? I thought you had said something to that > effect in a previous post. > > -Jimmy > > On 10/1/14, 6:54 AM, "Rafael Schloming" wrote: > > >I have a set of examples for proton-j that is more current. They were > >developed midway through the 0.8 development cycle so they may need a > >little bit of updating, but I intend to verify that they work against th= e > >release, add a bit of docs and include them in 0.8 RC2. > > > >You can check them out here for now: > > > > https://github.com/rhs/qpid-proton-demo > > > >--Rafael > > > > > >On Tue, Sep 30, 2014 at 12:05 PM, Gibson, Jack > > > >wrote: > > > >> Its great to see some more real world use cases being created but how > >> about some proton-j examples? It seems to be woefully behind to the > >>point > >> where even some of the out of the box examples aren=C2=B9t fully funct= ionally > >> anymore=C5=A0 > >> > >> Jack > >> > >> > >> > >> > >> On 9/22/14, 12:51 PM, "Alan Conway" wrote: > >> > >> >On Thu, 2014-09-18 at 13:33 -0400, Justin Ross wrote: > >> >> > >> >> > >> > >> > http://svn.apache.org/viewvc/qpid/proton/branches/examples/tutorial/sync_ > >> >>client.py?view=3Dmarkup&pathrev=3D1626029 > >> >> > >> >> I think "invoke" is an unintuitive name there. It's not "invoking > >>the > >> >> request" or "invoking the client". Invoke usually implies a named > >> >>piece of > >> >> application logic. I think in this case "send" or "send_request" > >>would > >> >>be > >> >> better, as in "send the request (and this is a request for which I > >> >>expect a > >> >> synchronous response)". > >> > > >> >Yes I don't really like invoke either but I also don't like send. I > >>want > >> >to say: "send a request *and* wait for a response". The word "send" i= s > >> >heavily used already in all the messaging APIs to mean "just send a > >> >message". > >> > > >> >I also considered "call". This really is the moral equivalent of an R= PC > >> >(C for "call") The only difference between this and RPC is dressing i= t > >> >up as a method call on a proxy object instead of exposing the > >>underlying > >> >message exchange. However given that we want to expose this as a > >>message > >> >exchange, neither "invoke" nor "call" is very satisfying. > >> > > >> >I'd love a better alternative! > >> > > >> >> > >> >> On Thu, Sep 18, 2014 at 1:23 PM, Alan Conway > >> wrote: > >> >> > >> >> > I checked this in on the examples branch. > >> >> > > >> >> > > >> > >>>>---------------------------------------------------------------------= -- > >>>>- > >> >> > r1626029 | aconway | 2014-09-18 13:11:12 -0400 (Thu, 18 Sep 2014) > >>| 7 > >> >> > lines > >> >> > > >> >> > NO-JIRA: Added tutorial/sync_client.py to demonstrate a synchrono= us > >> >> > request-response client. > >> >> > > >> >> > This client uses the familiar paradigm of making blocking calls > >>that > >> >> > send a > >> >> > request and return the response. > >> >> > > >> >> > Made some improvements to BlockingThread error handling and > >>timeouts. > >> >> > > >> >> > > >> > >>>>---------------------------------------------------------------------= -- > >>>>- > >> >> > > >> >> > It needs a little work to be realistic (needs to check correlatio= n > >>ids > >> >> > at least) but it is quite neat. > >> >> > > >> >> > Most of the current tutorial examples are in an event driven styl= e, > >> >> > which is great for servers and intermediaries but less familiar o= n > >>the > >> >> > client side. This demo shows that you can also do traditional > >> >> > client-driven request response quite easily. The error handling i= s > >> >> > simple: invoke() throws if anything goes wrong. > >> >> > > >> >> > I did this the hard way first - by writing my own raw event > >>handlers. > >> >>It > >> >> > was instructive but, well, hard. Then I noticed Gordon's > >> >> > BlockingConnection class already did everything I had figured out > >>the > >> >> > hard way (blocking and error handing) so I rewrote it using that > >>and > >> >>it > >> >> > was very easy. > >> >> > > >> >> > So far I think this is promising. > >> >> > > >> >> > Cheers, > >> >> > Alan. > >> >> > > >> >> > > >> >> > > >>--------------------------------------------------------------------- > >> >> > To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org > >> >> > For additional commands, e-mail: users-help@qpid.apache.org > >> >> > > >> >> > > >> > > >> > > >> > > >> >--------------------------------------------------------------------- > >> >To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org > >> >For additional commands, e-mail: users-help@qpid.apache.org > >> > > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org > >> For additional commands, e-mail: users-help@qpid.apache.org > >> > >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org > For additional commands, e-mail: users-help@qpid.apache.org > > --f46d044401ce6ab02305045daf4e--