public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* http/xml bridge for web-based pcp clients
@ 2011-02-03 21:35 Frank Ch. Eigler
  2011-02-04  5:22 ` Nathan Scott
  0 siblings, 1 reply; 2+ messages in thread
From: Frank Ch. Eigler @ 2011-02-03 21:35 UTC (permalink / raw)
  To: pcp; +Cc: systemtap

Hi -

Eventually, it'd be nice if a java/javascript type web application
could suck data out of a PCP installation and present it in glorious
HTML.  This should include normal metric access as well as the new
event stuff from 3.5.0.  The key missing link right now seems to be a
web-accessible interface.  (nathans' json-pcp work, to the extent I
understand it, is not directly responsive to this need.)

The smallest new piece of code that seems to accomplish the need would
be a mini http server that speaks a xmlrpc-ish version of the PMAPI.
It'd be like a pminfo-over-http.  One extension would be that a single
pcp client connection would be reused for the duration of a web
"session", consisting of many independent xmlrpc calls.

As for implementation details, something like libmicrohttpd [1] for
the protocol level stuff; or perhaps XML-RPC [2] and its abyss http
code for http server side support; plain vanilla LGPL C code for the
glue between that and PMAPI.

Does this sound sensible?

- FChE

[1] http://www.gnu.org/software/libmicrohttpd/, LGPL
[2] http://xmlrpc-c.sourceforge.net/, BSD

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: http/xml bridge for web-based pcp clients
  2011-02-03 21:35 http/xml bridge for web-based pcp clients Frank Ch. Eigler
@ 2011-02-04  5:22 ` Nathan Scott
  0 siblings, 0 replies; 2+ messages in thread
From: Nathan Scott @ 2011-02-04  5:22 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: systemtap, pcp


----- "Frank Ch. Eigler" <fche@redhat.com> wrote:

> Hi -
> 
> Eventually, it'd be nice if a java/javascript type web application
> could suck data out of a PCP installation and present it in glorious
> HTML.  This should include normal metric access as well as the new
> event stuff from 3.5.0.  The key missing link right now seems to be a
> web-accessible interface.  (nathans' json-pcp work, to the extent I
> understand it, is not directly responsive to this need.)

Yes, not directly ... there was some hand-waving involved around the
lines of an apache plugin to do the http side of things and hand off
work to pmproxy, but didn't get that far.

Definitely agree this is a missing piece of the puzzle still, would
love to see something (small & fast) in this space.

> The smallest new piece of code that seems to accomplish the need
> would
> be a mini http server that speaks a xmlrpc-ish version of the PMAPI.
> It'd be like a pminfo-over-http.  One extension would be that a
> single
> pcp client connection would be reused for the duration of a web
> "session", consisting of many independent xmlrpc calls.
> 
> As for implementation details, something like libmicrohttpd [1] for
> the protocol level stuff; or perhaps XML-RPC [2] and its abyss http
> code for http server side support; plain vanilla LGPL C code for the
> glue between that and PMAPI.
> 
> Does this sound sensible?

From the json pmproxy translator experiment, I'd say we can learn:
- fair bit of work involved in translating every PCP PDU, this is
probably too low a level for javascript clients.
- the connection statefulness (or lack thereof) is a problem - I'd
tried to have no new state in pmproxy, but it falls down in some
places, like on profile+fetch PDUs IIRC.
- worse still, http/javascript clients are unlikely to keep the
socket connection open, so some form of session state must be kept
there in the end and not clear whether the connection to pmcd can
be dropped and reestablished without extra state on the server.

cheers.

-- 
Nathan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-04  5:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-03 21:35 http/xml bridge for web-based pcp clients Frank Ch. Eigler
2011-02-04  5:22 ` Nathan Scott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).