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 D184E200B6C for ; Sun, 28 Aug 2016 09:05:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CFF43160AB4; Sun, 28 Aug 2016 07:05:13 +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 EC131160AAF for ; Sun, 28 Aug 2016 09:05:12 +0200 (CEST) Received: (qmail 17437 invoked by uid 500); 28 Aug 2016 07:05:12 -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 17421 invoked by uid 99); 28 Aug 2016 07:05:11 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Aug 2016 07:05:11 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 5EAFA180424 for ; Sun, 28 Aug 2016 07:05:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.429 X-Spam-Level: * X-Spam-Status: No, score=1.429 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id RZgZn_3Nv5CI for ; Sun, 28 Aug 2016 07:05:08 +0000 (UTC) Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 069AE5F242 for ; Sun, 28 Aug 2016 07:05:08 +0000 (UTC) Received: by mail-wm0-f53.google.com with SMTP id i5so46670061wmg.0 for ; Sun, 28 Aug 2016 00:05:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=La+wFcj0/NzYAdcYMyuJFPdjdEn9WgH5jX65xJfAek8=; b=DMW3kyRM/6mpnkAcYUw3R1Pw+AfOA2gYglpLCpH2Fs4u6Zf/eJrOQFoFLuUuaviIsK x8nMv4H/H82hWdPP8634J8IvQCG3vFaYprhx2T4JQ/IY37/dEn+zM705eeED6VmSMaQq DCiAOMFuQHg8L8sNu6VqfhaBveJfURILb7QdviV+q0SSUdm5a9b0nkRxo1IfEZR9Ujck jLekAn3ZdGgFpwqJBGeGoyEYm/C/S3BGabvk/cEsnBcn5DvToAxdwpoT9XcgJ8L50xoJ KORcLODh/XmrTkpwmFVjR3ga7KDYjWT7UCxE9XEISoyK9ag+bZHuXkhq4VCHxfwVuupQ 5DMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=La+wFcj0/NzYAdcYMyuJFPdjdEn9WgH5jX65xJfAek8=; b=Q0T8Bs8VDBKB81NlUUZNOuuZZA8NXyWdRF4WuGDDYqF17P4lYW7pXIkA78qjyunMe8 AgWHTaqxk/AC194CzZU2KAQ9tMCROpILBpmDX4Txct9k/ND5CFIXFiVdUSfR3vY/LVyW oKstAMklLxfc9wQyh/ULVavM371Yv7MvAkyWrhBc1kxuA+cFZDNHAeeumHxvREs5BGsm 6qZ5C0hlc6A5SBvCxKNa+CeA5MBvdMZsDh6CcxXSsJD74LKLybjIQ88zQxo4B3KEksdu kKtBjnfkHoW6CtGgtOP+TLaIpACELvTE7s2uGNhfEs2b/7KfA56PvBIVOC51l42I6kxK NJtw== X-Gm-Message-State: AE9vXwPsth4zKH9WLm1rt1EANnFqcxVGj8NL6H9ApU0qYUdmN7y4Ob+Xi4OAkoyEHorG5cFHv9RQaDd7+6JwIA== X-Received: by 10.28.1.74 with SMTP id 71mr5852226wmb.4.1472367907610; Sun, 28 Aug 2016 00:05:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nemeth Sandor Date: Sun, 28 Aug 2016 07:04:56 +0000 Message-ID: Subject: Re: Spring To: niclas@hedhman.org, dev Content-Type: multipart/alternative; boundary=001a113d3eae1ca644053b1c5e30 archived-at: Sun, 28 Aug 2016 07:05:14 -0000 --001a113d3eae1ca644053b1c5e30 Content-Type: text/plain; charset=UTF-8 Hi Niclas, thanks for clarifying a bit how Configuration works. So if I understand right, Zest uses the same mechanism (EntityStore) to store both persistent data and configuration, right? As for the "auto-configuration" I think I stuck a bit with the Spring naming (too long exposure to Spring usage :) ). What I wanted to say that if Zest wants to offer the same convenience level, as Spring Boot, it would be nice to have an (in Zest-terms) AutoAssembler, which assembles the application based on the included components. For example when I include the "entitystore-mongodb" dependency into the application, the ApplicationAssembler could pick up the dependency using the "MongoDBAutoAssembler", and build it into the application as a new Module. It can happen that to achieve this, a new ApplicationAssembler is needed with some default layering. So the "auto-configuration" is much more of a convenience method to auto-assemble the application from the provided dependencies, without manually writing any assembly. Also for the "sensible defaults": I would say that's already implemented in e.g. the MongoMapEntityStoreMixin: int port = config.port().get() == null ? 27017 : config.port().get(); So that functionality is already there, which is very nice :) Best regards, Sandor On Tue, 23 Aug 2016 at 01:55 Niclas Hedhman wrote: > Nemeth, > Welcome to the world of Zest. > > There is a lot of goodies in your mail, and I agree with a lot of what you > said. > > As for Configuration, what Zest provides out if the box is; > > 1. Configuration is an Entity that can be stored, and modified in runtime. > > 2. If no Entity is found in the Entity Store (for config), it tries to > create one from a properties file (your sensible defaults). > > 3. Services are expected to do refresh() on the Configuration composite, > which will reload. > > 4. Since implementing an entity store is relatively easy, we are only > lacking particular implementations. > > Finally, there is no "chaining" of stores, which could be used for override > mechanism. So, relatively little effort is needed in your first item. :-) > > For auto-configure, I am not sure what you are trying to say. Perhaps you > are only expressing a need that is more or less already fulfilled with the > ConfigurationComposite functionality in Zest. > > But at "clouding tools" I think you are bringing up new functionality in > Core.... > > Currently, the @Service fulfilment is done inside the Zest Core, but > perhaps that should be broken out as an SPI (even for the current default). > If we follow the normal way to define an SPI, it would simply be a Service > that implements something like ServiceProvider interface, but then the > question is, how is that service being provided for, so a bit of > chicken-egg problem, but probably doable with a fallback implementation. > > The services abstraction already support another highly needed feature in > remote service scenarios, Availability. What we should add for that is > CAP-theorem declaration, which would match the need of the client with the > capability of the service. > > And finally, "asynchronous" is a big thing in modern systems, so perhaps a > new type of abstraction is needed for asynchronous request/response pattern > of services. That is probably a large new feature that should be discussed > separately... > > Cheers > Niclas > > On Aug 22, 2016 15:26, "Nemeth Sandor" > wrote: > > > Hello Niclas, > > > > I would say that Zest do not fit into the Spring world, I think the > > conceptual gap between the two worlds are way too big. I mean Zest > doesn't > > support e.g. POJOs, also provides a different dependency-injection > method. > > One could probably force a Spring+Zest combination to work, but it would > > never be a perfect match. > > > > However from my POV it should be possible for Zest to offer the same > > convenience-level, along with the tooling support. > > This would have 3 different aspects: > > > > 1) configuration management > > 2) auto-configuration support > > 3) Cloud tooling > > > > Below a description follows, although I am not _that_ familiar with the > > Zest internals at the moment, so please correct me if I am wrong at any > > point. > > > > The *configuration management* would include providing a concept of > > configuration override with an ordering, supporting external key-value > > stores for loading configuration (with reload support). I would propose > the > > following order: > > > > - External K/V store (etcd, Consul, Spring Cloud Config Server, etc) > > - Environment variables > > - External configuration files (outside of the application) > > - Internal configuration files (packaged with the application) > > > > The *auto-configuration* support is a bit tricky from my perspective, > > because usually one wants to provide default settings which make sense, > but > > provide an override capability. I could imagine having something like an > > _AutoConfiguringApplicationAssembler_ which auto-discovers and assembles > > an > > application (using Java SPI) but then the user could override it in the > > _assemble_ method. > > > > For the *cloud tooling* Zest could provide a unified service-discovery > > support for different service-discovery providers, and then provide > support > > for different service discovery and load-balancing methods (e.g > client-side > > load balancing or 3rd party API gateway). > > > > Best regards, > > Sandor > > > > On Wed, 17 Aug 2016 at 03:01 Niclas Hedhman wrote: > > > > > Those who know me well, are well-aware of my generally negative opinion > > > about Spring framework, as it has created more mess in software than > what > > > is reasonable for such a framework. > > > > > > BUT, I am not stuck about it, and I want to highlight something that > > looks > > > really, really cool.... http://start.spring.io > > > > > > Also take a look at a frantic presentation by Josh Long about it; > > > https://www.youtube.com/watch?v=sOP3x6ODQWQ > > > > > > With that in your minds, How does Zest fit into that world? > > > > > > Cheers > > > Niclas > > > > > > --001a113d3eae1ca644053b1c5e30--