Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CAB3E200BCE for ; Fri, 2 Dec 2016 10:29:06 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C94D0160B24; Fri, 2 Dec 2016 09:29:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1D55E160B16 for ; Fri, 2 Dec 2016 10:29:05 +0100 (CET) Received: (qmail 84427 invoked by uid 500); 2 Dec 2016 09:29:05 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 84412 invoked by uid 99); 2 Dec 2016 09:29:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Dec 2016 09:29:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id A89E01A06DC for ; Fri, 2 Dec 2016 09:29:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.1 X-Spam-Level: X-Spam-Status: No, score=-3.1 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-2.999, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=greenbytes.de header.b=OCdS1HOa; dkim=pass (1024-bit key) header.d=greenbytes.de header.b=OCdS1HOa Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id iPuEA_zfhYrC for ; Fri, 2 Dec 2016 09:29:01 +0000 (UTC) Received: from mail.greenbytes.de (mail.greenbytes.de [5.10.171.186]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 7B28B5F1AE for ; Fri, 2 Dec 2016 09:29:00 +0000 (UTC) Received: by mail.greenbytes.de (Postfix, from userid 117) id D0D3B15A06B1; Fri, 2 Dec 2016 10:28:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1480670938; bh=udrEbbv436MeEJbGXZvpyUmjGG60sHwbk6O7qJUuEtc=; h=From:Subject:Date:References:To:In-Reply-To:From; b=OCdS1HOa4QefMjLK6UKiLgCO5TjlHOQKoxKAXYe5cQW47Gc04NkYhd2Qk2wmFDiXy 2Xigc+/fJvlbRuhpXjRdKTfvP+3FWAjjrzHBlkqIRO3e0Chp2MdeW83KJ6WvFXGT18 ZtpQ0N6PvyHES83OEW8r0S3c5gS8cgvyAVNVLJUo= Received: from [192.168.1.175] (unknown [192.168.1.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail.greenbytes.de (Postfix) with ESMTPSA id 5ADF515A040D for ; Fri, 2 Dec 2016 10:28:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1480670938; bh=udrEbbv436MeEJbGXZvpyUmjGG60sHwbk6O7qJUuEtc=; h=From:Subject:Date:References:To:In-Reply-To:From; b=OCdS1HOa4QefMjLK6UKiLgCO5TjlHOQKoxKAXYe5cQW47Gc04NkYhd2Qk2wmFDiXy 2Xigc+/fJvlbRuhpXjRdKTfvP+3FWAjjrzHBlkqIRO3e0Chp2MdeW83KJ6WvFXGT18 ZtpQ0N6PvyHES83OEW8r0S3c5gS8cgvyAVNVLJUo= From: Stefan Eissing Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: JSON for mod_status Date: Fri, 2 Dec 2016 10:28:58 +0100 References: <128EB450-7EF2-44CD-9D0A-9B1AA913AC2F@jaguNET.com> <1480531092.4019.27.camel@mimir.webthing.com> <73D2DF78-864E-40E2-B20E-8348060763BF@jaguNET.com> <30A04E20-B8B3-428C-98AC-011203591A89@jaguNET.com> To: dev@httpd.apache.org In-Reply-To: Message-Id: <86F3C1E9-83AE-46B6-89A3-1F578EB8C07D@greenbytes.de> X-Mailer: Apple Mail (2.3251) archived-at: Fri, 02 Dec 2016 09:29:07 -0000 > Am 01.12.2016 um 23:14 schrieb Jim Jagielski : >=20 >=20 >> On Dec 1, 2016, at 2:16 PM, William A Rowe Jr = wrote: >>=20 >>=20 >> Note that mod_bmx_status entries focus on what most management >> frameworks are looking for, so thus far, it doesn't deliver an entire >> dataset per connection or worker thread. It certainly could, of = course. >=20 > Nor does it expose anything from any other beans created > by any other module. >=20 > Can it? >=20 > If so, exactly how. >=20 >>=20 >> Again, it simply iterates the entire contents of each bean presented >> to it's own print_bean_fn callback. If you have a look at; >> https://github.com/hyperic/mod_bmx/blob/master/modules/bmx/mod_bmx.h >> that should give you a somewhat higher altitude perspective on = Aaron's >> API design. >=20 > So mod_bmx_status has to query mod_bmx for "all beans" ?? It seems to me from the name of the callback that this is for "printing" = stuff, either all or only the name matching (which is probably a URL = parameter. Fair enough.=20 But as Jim pointed out, it would be more powerful if one could a) detect which beans are potentially available b) retrieve and aggregate them So, we'd have BeanProviders that take over a namespace. They register at = server start. ProviderRegistry["proxy/balancer"] -> registered provider hook by the = module ProviderRegistry["proxy/type/h2"] -> registered provider hook by = mod_proxy_http2 ProviderRegistry["proxy/type/h2c"] -> registered provider hook by = mod_proxy_http2 One can query this registry. For lookups, there is a BeanContext that caches beans once retrieved. So = there is not need to look them up again in the same request. That is = passed to all registered bean provider queries, so that providers can = also query for other beans while assembling their own. A bean produced this way is then send to the client in the requested = format using a standard set of BeanToJSON, BeanToXML, BeanToHTML = serializers. The beans just need to be a slim wrapper around = apr_table_t/apr_array_header_t/const = char*/int/apr_size_t/apr_off_t/double. The registry can be mapped to URL space, so=20 * https://localhost/status/proxy/balancer would list the bean there, * https://localhost/status/proxy/type would list all beans registered = with that prefix. -Stefan