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 82DDC200B6C for ; Sun, 28 Aug 2016 14:05:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 79B70160AB4; Sun, 28 Aug 2016 12:05: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 986AD160AAF for ; Sun, 28 Aug 2016 14:05:05 +0200 (CEST) Received: (qmail 81115 invoked by uid 500); 28 Aug 2016 12:05:04 -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 81103 invoked by uid 99); 28 Aug 2016 12:05:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Aug 2016 12:05:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id EFD80C2818 for ; Sun, 28 Aug 2016 12:05:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.28 X-Spam-Level: * X-Spam-Status: No, score=1.28 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, 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: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id KpbAIjWn-a8N for ; Sun, 28 Aug 2016 12:05:01 +0000 (UTC) Received: from mail-oi0-f51.google.com (mail-oi0-f51.google.com [209.85.218.51]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 6EE945F1EC for ; Sun, 28 Aug 2016 12:05:01 +0000 (UTC) Received: by mail-oi0-f51.google.com with SMTP id c15so164696409oig.0 for ; Sun, 28 Aug 2016 05:05:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=VIkXkRfWIbw3L0VROQq2qswNBIvOVTNMnsetIHUNyBA=; b=x+JveRQgcFHpw39QB2Yfn+isODvImVMXBWmCFDHsdF93CyA3QMk4nku1RZXx9QBQnC XoCO1qHfP2rjX0yDB3s1LKJHhMFemrL+5xoLCVFLOXbCsjdEfMM0ag8TcWXtA2xpDl91 GOFmBK85QzjzaMwsEP2+mbTbCo123WPNnVYYqcD3a4HSDY9MpNKdMVcTkl+I7fPcKZuy Oi4UNSJ/IY9YQ6ub5fiJ1Oj9vdDM2NDOZPFFeeZZzaFqTweEFU8vY1aHFzjfopW4HAiz rt3QkeMmb+trM9Y2/fBb+d6H/7nESbm89po/1T+yhTpTO5xUWpVlyob2eRLu3EPkZIJN A2pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=VIkXkRfWIbw3L0VROQq2qswNBIvOVTNMnsetIHUNyBA=; b=YLux63bGSThrLjOwzZ9WhZXcdW300EF5cMsmLIGs6/q9Q1c06y+W4wUlL8MAcf0voJ NHPXHtMIFGLrqyEG+CeST1CqytFReQ52PP2Tosxdwlq6DunPL5wfpBiGPMmAuykBEF3J F88Y85h8Sm9nIrxmY3n5/SxsCbzZVOIxeQlt0lTa6LEnT0EPHp8bNQHcfSwdRGGfOF0G LxbBe9l+b3+GwCPdqtqewGCqVgt1Ctf5RHNkQxUf60q7mPEv8T5GI4wgNU3Hi55BBDr7 9UjJoWV2cI13fnFjyBJRd0cVof1XRJoqP3xi/YnAjzvfRMJ/bOoWDPXBF4VH5DdPFv5t 8x4A== X-Gm-Message-State: AE9vXwODPUAMn9FKMyFWW5FCaA2fV2wJSkHrgPc5szcigVl+T1KDpnDyCiSuTVfNCob/1fldn5/4/1JscZBRvA== X-Received: by 10.157.49.3 with SMTP id e3mr8291100otc.127.1472385900795; Sun, 28 Aug 2016 05:05:00 -0700 (PDT) MIME-Version: 1.0 Sender: hedhman@gmail.com Received: by 10.202.51.136 with HTTP; Sun, 28 Aug 2016 05:04:40 -0700 (PDT) In-Reply-To: References: From: Niclas Hedhman Date: Sun, 28 Aug 2016 20:04:40 +0800 X-Google-Sender-Auth: povcUa6OC7En6unzCOnJWRMEFu8 Message-ID: Subject: Re: Spring To: Nemeth Sandor Cc: dev Content-Type: multipart/alternative; boundary=001a1141c9f896ddcc053b208eb2 archived-at: Sun, 28 Aug 2016 12:05:06 -0000 --001a1141c9f896ddcc053b208eb2 Content-Type: text/plain; charset=UTF-8 I think you are asking for what is already being worked on... https://www.youtube.com/watch?v=PmgF7X6ZgIU Or? Niclas On Sun, Aug 28, 2016 at 3:04 PM, Nemeth Sandor wrote: > 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 >> > > >> > >> > -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java --001a1141c9f896ddcc053b208eb2--