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 C82C411DD4 for ; Fri, 29 Aug 2014 20:59:49 +0000 (UTC) Received: (qmail 32481 invoked by uid 500); 29 Aug 2014 20:59:49 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 32442 invoked by uid 500); 29 Aug 2014 20:59:49 -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 32430 invoked by uid 99); 29 Aug 2014 20:59:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Aug 2014 20:59:49 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aconway@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Aug 2014 20:59:44 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7TKxL1s030877 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 29 Aug 2014 16:59:22 -0400 Received: from [10.3.113.137] (ovpn-113-137.phx2.redhat.com [10.3.113.137]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7TKxKts017017 for ; Fri, 29 Aug 2014 16:59:20 -0400 Message-ID: <1409345959.13978.30.camel@localhost> Subject: Re: REST API for AMQP management? From: Alan Conway To: users@qpid.apache.org Date: Fri, 29 Aug 2014 16:59:19 -0400 In-Reply-To: References: <1409341222.13978.4.camel@localhost> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Virus-Checked: Checked by ClamAV on apache.org On Fri, 2014-08-29 at 19:45 +0000, Gibson, Jack wrote: > Alan - > > I have been playing with vertx to amqp 1.0 set of restful services to > manage dispatch routers. So, I wouldn¹t mind helping out. Let me know to > engage. > I've been distracted for a while so I need to get my head back into the dispatch management code. I have some work to finish up, mostly merging functionality from the old C agent into the new python agent. The python agent is basically a schema validater and dispatcher of AMQP management requests into the C code. The management requests and responses are essentially just name/value maps or lists of maps. The type system is simple for now: strings, bools, integers and floats. I doubt it will get much more complicated than that. So I think for REST all we need is a HTTP server (presumably the default python one would do) that converts HTTP requests to and from a router.Message with python maps as properties and body. The management code is already quite JSON friendly so that might be an easy way to do it. Have a look at dispatch/python/qpid_dispatch_internal/management/agent.py Agent.receive() is wired up to get AMQP management messages. It calls Agent.handle() to process the message, and returns an AMQP response. The REST listener would be similar to receive() - create a request from the HTTP request, feed it to Agent.handle() and convert the response to a HTTP response. We can tidy things up a bit to make a clean interface between REST, AMQP messages and whatever other feeds might come along and a more generic Agent. With a clean API we should be able to re-use the same REST code for inside dispatch, in your vertx services, or as a stand alone tool that converts between REST and AMQP, or in tools for managing Qpid or other AMQP services. I want to separate and make public the AMQP management client for scripting, so that could be the basis of a stand-alone REST to AMQP gateway. Let me know what you think! Cheers, Alan. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For additional commands, e-mail: users-help@qpid.apache.org