Return-Path: X-Original-To: apmail-zest-dev-archive@minotaur.apache.org Delivered-To: apmail-zest-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 211DF18F9B for ; Mon, 13 Jul 2015 10:58:35 +0000 (UTC) Received: (qmail 45748 invoked by uid 500); 13 Jul 2015 10:58:35 -0000 Delivered-To: apmail-zest-dev-archive@zest.apache.org Received: (qmail 45709 invoked by uid 500); 13 Jul 2015 10:58:35 -0000 Mailing-List: contact dev-help@zest.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zest.apache.org Delivered-To: mailing list dev@zest.apache.org Received: (qmail 45698 invoked by uid 99); 13 Jul 2015 10:58:34 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jul 2015 10:58:34 +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 387081A6EF5 for ; Mon, 13 Jul 2015 10:58:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1 X-Spam-Level: * X-Spam-Status: No, score=1 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id g2Kj27d3ZO1u for ; Mon, 13 Jul 2015 10:58:27 +0000 (UTC) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id D044B20C59 for ; Mon, 13 Jul 2015 10:58:26 +0000 (UTC) Received: from mfilter33-d.gandi.net (mfilter33-d.gandi.net [217.70.178.164]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id C3F7B17209F for ; Mon, 13 Jul 2015 12:58:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter33-d.gandi.net Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter33-d.gandi.net (mfilter33-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id zd+I+fJKJWBV for ; Mon, 13 Jul 2015 12:58:24 +0200 (CEST) X-Originating-IP: 212.195.187.94 Received: from [192.168.1.3] (rab34-h03-212-195-187-94.dsl.sta.abo.bbox.fr [212.195.187.94]) (Authenticated sender: paul@nosphere.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 531641720A3 for ; Mon, 13 Jul 2015 12:58:24 +0200 (CEST) Message-ID: <55A399CF.7050205@nosphere.org> Date: Mon, 13 Jul 2015 12:58:23 +0200 From: Paul Merlin User-Agent: Postbox 3.0.11 (Macintosh/20140602) MIME-Version: 1.0 To: dev@zest.apache.org Subject: Re: Configuration initialization References: In-Reply-To: X-Enigmail-Version: 1.2.3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Niclas Hedhman a =C3=A9crit : > We all should know that Configuration Composite is an Entity, read from= an > EntityStore and runtime modifiable just like any Entity. > > We also know that if it is not found in the Entity Store, the value is = read > from a properties file, named after the identity of the Service Composi= te > the configuration belongs to. > > I am now adding that in addition to Properties files, the file can be r= ead > via ValueSerialization instead. I am also adding that YAML is a format = we > intend to support (I really like that format for Config data). > > But currently there is no YAML ValueSerialization extension available. = If > someone feels itchy to help out; Creating a ValueSerialization extensio= n > for YAML, with the help of SnakeYaml or YamlBeans. > > Since the code is virtually the same inside the Configuration, I will r= ely > on this will get done sooner or later, and my tests are only covering J= SON > and XML for now. I took a couple hours to start a YAML serialization extension. Both SnakeYaml and YamlBeans gave me headhaches when it came to switching from pull-parsing to tree-parsing for deserialization. Looks like theses libraries are not built for advanced usecases. I'll need some more time to come up with something usable. Niclas Hedhman a =C3=A9crit : > And to make this more "integrated", I am introducing > > ModuleAssembly.configurations() > > since otherwise people will be confused that both a entity and a value > needs to be declared. > > (Actually, this speaks even more in favor of proposal to > "Entity=3DIdentity+Value") > > The assembly will take care of duplicating the declared types as both > entities and values, so there won't be a ConfigurationInstance type, at > least not in 2.1. > > Any thoughts? I'm all in favor for going towards "Entity=3DIdentity+Value". In the end, this will allow us to drop a bunch of code as EntityState serialization in EntityStores is pretty different than ValueSerialization (was already before I rewrote ValueSerialization for 2.0). And I don't see the need for theses differences. /Paul