From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8941 invoked by alias); 23 Mar 2011 03:58:23 -0000 Received: (qmail 8921 invoked by uid 22791); 23 Mar 2011 03:58:20 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Mar 2011 03:58:07 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2N3vp40002972 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 22 Mar 2011 23:57:51 -0400 Received: from fche.csb (vpn-8-169.rdu.redhat.com [10.11.8.169]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p2N3vopf028275; Tue, 22 Mar 2011 23:57:50 -0400 Received: by fche.csb (Postfix, from userid 2569) id 998635811F; Tue, 22 Mar 2011 23:57:49 -0400 (EDT) Date: Wed, 23 Mar 2011 03:58:00 -0000 From: "Frank Ch. Eigler" To: Paul Smith Cc: pcp@oss.sgi.com, systemtap@sourceware.org, Ben Birch Subject: Re: [pcp] sketch of possible web pmapi Message-ID: <20110323035749.GA30308@redhat.com> References: <20110322175345.GH13236@redhat.com> <6FF2157A-0696-4DFE-AAAC-86EA22292452@aconex.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6FF2157A-0696-4DFE-AAAC-86EA22292452@aconex.com> User-Agent: Mutt/1.4.2.2i Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2011-q1/txt/msg00513.txt.bz2 Hi, Paul - > This is great. This looks RESTful, but not sure if that was the > intent. Would be worth following the REST pattern fully. I read about REST, but only with web-app newbie eyes. > Also, I think JSON is a better text output format and now much > easily parseable by both humans AND code too. [...] My main interest in using XML for the raw output is the ability to easily associate it with an XSLT stylesheet to render the data into HTML. I believe that it would be useful to be able to perform basic navigation over the PCP data with nothing other than a plain old web browser or spider, even without javascript. JSON could be an alternative output format, selected with some URL parameter. OTOH then HTML could be the same thing. > > /context?local > > /context?hostname=HOSTNAME > > /context?archivefile=FILENAME > > ?poll-timeout=SECONDS > > /context/CONTEXT/copy > > > Following REST pattern (see wiki pattern above), this should be a > POST. The 'get' bits after the query string I believe are still > valid (although traditionally odd for POST, most people still do > that ). (I have no informed opinion on this.) > To add more clarity here to make sure I'm following things > correctly, I'm presuming the above Create Context action would > require a '?...&contextName=foo' [...] Actually, I was thinking that the server process would assign an opaque context name, since it's the one in position to make a unique one. > > - list/describe metrics > > > > /context/CONTEXT/metric?glob=GLOB > > /context/CONTEXT/metric?pmids=ID1,ID2,ID3 > Following the REST pattern again, and stealing liberally from the > way ElasticSearch does this, I would suggest: > > /context/{contextname}/_metric?glob=... Are you only proposing to prefix the listing-type operations with an underscore, or is there something else? > /context/_metric?pmids=... > > Where the query on the _metric action is across _all_ defined > Context names. Other action verbs like _fetch (see below) could > then theoretically be applied across multiple contexts: I've been cosidering separate contexts as belonging to independent concurrent users, so I'd prefer not to expose the "all contexts" object at all. > /context/foo,bar,othercontextnumber3/_metric?pmids=.... This could make sense; is there any PCP precedent or need for this? > > /context/CONTEXT/value?pmids=ID1,ID2,ID3 > > /context/CONTEXT/value?pmids=ID1,ID2,ID3&time=TIME > > What about: > > /context/{contextname}/_fetch?.... Sure, no strong opinion. > [...] > I think the poll-timeout should be a client value, not part of the > protocol..? Did you mean that? I've been thinking of it as a statement that the client intends to poll the PCP system no less frequently than the negotiated poll-timeout value. The main purpose of this is to manage the lifecycles of the underlying pmNewContext / pmDestroyContext calls, and specifically the enqueued trace-events. > If you're meaning a timeout on the web-proxy pulling values from the > PMDAs then that should be a configuration value on that side, no the > REST or XMLRP protocol layer? I'm not quite sure what you mean. > [...] Getting ahead of myself here, a 'pcp-head' JavaScript UI > client like Ben's ElasticSearch one could include graphs etc > too... Perhaps a nice cross platform pmchart replacement... *ducks*. This is what we have in mind as a potential eventual result. - FChE