SlideShare a Scribd company logo
1 of 57
Download to read offline
https://maketechsimple.wordpress.com@atsticks
JSR 382: Configuration in Java
Standards and More…
Anatole Tresch, Principal Consultant ZH AD
2
Agenda
• What is Configuration?
• Lifecycle and Runtimes
• Backends
• Configuration Services
• How to use it in your projects?
26.06.2019 Configuration in Java2
Anatole Tresch
Principal Consultant, Trivadis AG (Switzerland)
Spec Lead JSR 352 (Money and Currency)
JSR 382 EG Member
PPMC Member Apache Tamaya
@atsticks
anatole@apache.org
anatole.tresch@trivadis.com
3
About me
26.06.2019 Configuration in Java3
4
Configuration ?
5
Wikipedia: Configuration
“In computing, configuration defines parameters and settings that control behavior
of some computer programs. They are used for user applications, server processes
and operating system settings and may change during runtime.”
System
Input Output
Config
26.06.2019 Configuration in Java5
6
Wikipedia: Configuration Files
“In computing, configuration files (or config files) are files used to configure the
parameters and initial settings for some computer programs. They are used for user
applications, server processes and operating system settings.”
26.06.2019 Configuration in Java6
Ohne Worte…
26.06.2019 Configuration in Java7
8
Hmm…
9
Configuration Files: xml
• Very verbose
26.06.2019 Configuration in Java9
10
Configuration Files: properties
• No explicit support for
hierarchies, lists etc.
• Pure i18n support
• Pure Multiline support
26.06.2019 Configuration in Java10
11
Configuration Files: json
• It’s for machines not humans!
• Strictly: no comments
26.06.2019 Configuration in Java11
12
• Portability Issues
• Multiline values
Configuration Files: yaml
26.06.2019 Configuration in Java12
13
• https://hjson.org/
• Advantages of JSON
• Easy for humans
Configuration Files: hjson
26.06.2019 Configuration in Java13
14
Like HJSON, but even simpler
https://github.com/lightbend/config
Configuration Files: hocon
{
a : A
b : B
c : C
d {
o: O
p: P
}
}
26.06.2019 Configuration in Java14
15
Configuration Lifecycle
and
Configuration Runtimes
16
Configuration Lifecycle
• Development
• Build time
• Deployment time
• Runtime A Configuration Runtime System must
support all of them!
26.06.2019 Configuration in Java16
Configuration Runtime
• A programmatic model of Configuration Data
• A programmatic API to access Configuration Data
• An SPI for extending and customizing
• Optional:
• A predefined lifecycle of configuration data
• Integration with other frameworks, e.g.
Spring, JakartaEE, OSGI, plain Java, …
26.06.2019 Configuration in Java17
18
Some Configuration Runtime Solutions…
• Apache Commons Config
• Apache Tamaya
• Apache Deltaspike
• Netflix Archaius Config
• Typesafe Config
• Microprofile.io
• Spring
• JSR 382
• Jakarta EEConfig ?
• ...
RIP JSR 382
19
https://www.jcp.org/en/jsr/detail?id=382
26.06.2019 Configuration in Java19
Microprofile
• Part of MicroProfile.io project
• JSR 382 Code has been moved here
• Minimum viable solution:
• Configuration can live outside of an application.
• Ready for Microservice and container environments.
• Different Locations and Formats
• Dynamic change is possible.
• A @ConfigProperty annotation for CDI (incl. default values).
• String/String key/value, types through Converters
• A Config API to function without CDI.
• Current Release 1.3 (part of MP 2.2)
20
https://github.com/eclipse/microprofile-config
26.06.2019 Configuration in Java20
21
Apache Tamaya
• Result of first Standardization Attempt in 2013
• Minimum viable solution:
• Basically similar to JSR 382/Microprofile
• Full SE API
• Mature
• Tree value model for more powerful type, conversion & filtering mechanisms
• With modular extensions:
• A @Config annotation for injection (works with Spring, CDI and more)
• Multiple formats (props, xml, json, hjson, yaml, hocon, ini)
• Integration with Spring, OSGI, Camel, Vertx and more
• Metaconfig, Documentation (sandbox)
http://tamaya.apache.org
26.06.2019 Configuration in Java21
Accessing Configuration
Apache Tamaya
• Version 0.3-incubating, ALv2-Licence
• http://tamaya.incubator.apache.org
• Latest Release: org.apache.tamaya:tamaya-core:0.3-incubating
Examples here: 0.4-incubating-SNAPSHOT
• API & Core: https://github.com/apache/incubator-tamaya
• Extensions: https://github.com/apache/incubator-tamaya-extensions
• Sandbox: https://github.com/apache/incubator-tamaya-sandbox
Apache Snapshot Repo:
https://repository.apache.org/content/repositories/snapshots
26.06.2019 Configuration in Java22
23
Helidon
• Part of Oracle’s Microservice Framework
• Authors are the same as in JSR discussion of 2016
<dependency>
<groupId>io.helidon.config</groupId>
<artifactId>helidon-config</artifactId>
<version>version-of-config-you-are-using</version>
</dependency>
https://helidon.io/
Let’s dive deeper…
…into Code
…to the APIs…
Apache Tamaya
Microprofile
• Simple Text Key/Value Pairs
• Optional Conversion
Configuration Data – Accessing Properties
26.06.2019 Configuration in Java25
Configuration Data – Optional Values
Apache Tamaya
Microprofile
26.06.2019 Configuration in Java26
Configuration Data - Defaults
In Apache Tamaya additionally possible:
Microprofile
26.06.2019 Configuration in Java27
Configuration Data – Multikey Lookup
Apache Tamaya
26.06.2019 Configuration in Java28
29
Configuration Data – Configuration Injection
Apache Tamaya
Microprofile
• Tamaya also supports
multikey-lookup with injection
30
Configuration Data – Snapshots
Microprofile
Update: ConfigAccessor -> ConfigAccessorBuilder
26.06.2019 Configuration in Java30
31
Configuration Data – Snapshots
Apache Tamaya
26.06.2019 Configuration in Java31
Configuration Data - Builders
Microprofile
26.06.2019 Configuration in Java32
Configuration Data - Builders
Apache Tamaya
• Tamaya has also functonality for removing/reordering of existing SPI artifacts.
• Filters are not supported by the JSR as of now.
26.06.2019 Configuration in Java33
34
Configuration Backends
35
Configuration Backends (SPI) – Basic Idea
Config Runtime
Backends
Configuration Data
(Files, Servers etc.)
«Backends are are the
adapters between the
config system and your
Configuration Data»
26.06.2019 Configuration in Java35
Config Backend SPI – Config-/PropertySources
Apache TamayaMicroprofile
26.06.2019 Configuration in Java36
38
Configuration Services
Config Runtime
Backends
Config Services
«Services (extensions)
provide additional
funtionality or runtime
integrations»
26.06.2019 Configuration in Java38
39
Example Services
• Placeholders and calculated values: ${host.name}
• ANT styled file and resource patterns: classpath:**/*.yml
• Functional operators and queries (extract subsections, printing)
• Change events and mutability
• Additional configuration formats
• Integration with Spring, CDI, OSGI, Vertx, ….
• PropertySources for Consul, etcd etc
• …
Microprofile does not define any
services.
26.06.2019 Configuration in Java39
Example Service: Templates
26.06.2019 Configuration in Java40
Example Service: Placeholder resolution
Apache Tamaya
• When the tamaya-resolver
extension is installed, resolution
is transparent.
26.06.2019 Configuration in Java41
Example Service: Functional Operators
• Filtering and Printing with
the tamaya-functions extension.
26.06.2019 Configuration in Java42
Laufzeit
Architektur
Design Helidon.io
26.06.2019 Configuration in Java44
Design in 120 Seconds...
• Tamaya
ConfigurationContext
PropertyFilters
ConfigSources
Microprofile
ServiceContextManager
PropertySources
String Value
Typed Value
ConfigProvider
ServiceContext
PropertyValue
Tamaya
Typed Value
PropertyValue:
- Simple
- Array
- Map
+ Metadata
PropertyValue
PropertySourceProvider
ConfigSourceProvider
<create>
<create>
ConfigurationProviderSpi
ConfigProviderResolver
+ ConversionContext
+ FilterContext
ConfigAccessor
26.06.2019 Configuration in Java45
Configuration SPI – Tamaya Value Tree
• Matches structures as defined by yaml, json, xml configuration files.
• Allows complex mappings, e.g. multi-value based collections and complex
custom types
• Mapping to properties still possible (and OOTB supported).
PropertyValue
+ value: String
+ metadata: Map<String,String>
ObjectValue
+ fields: Map<String,PropertyValue>
ListValue
+ children: List<PropertyValue>
26.06.2019 Configuration in Java46
Configuration SPI – Type Converters
Microprofile
26.06.2019 Configuration in Java47
Configuration SPI – Type Converters
Apache Tamaya
• Tamaya’s PropertyConverters have additional access to a ConversionContext
26.06.2019 Configuration in Java48
49
Example: Tamaya and Spring?
50
1. Add Dependencies to your Project
<dependency>
<groupId>org.apache.tamaya</groupId>
<artifactId>tamaya-core</artifactId>
<version>…</version>
</dependency>
Core API & Implementation
<dependency>
<groupId>org.apache.tamaya.ext</groupId>
<artifactId>tamaya-spring</artifactId>
<version>…</version>
</dependency>
Basic Extensions Needed for Spring Support
<dependency>
<groupId>org.apache.tamaya.ext</groupId>
<artifactId>tamaya-functions</artifactId>
<version>…</version>
</dependency>
• Current version: 0.4-incubating-SNAPSHOT
• Tamaya only, for Microprofile also add Tamaya‘s
microprofile extension module
• Dont forget to use the Apache Snapshot Repo:
https://repository.apache.org/content/repositor
ies/snapshots
26.06.2019 Configuration in Java50
51
2. Integrate with your target runtime
26.06.2019 Configuration in Java51
52
3. Read/inject Configuration
26.06.2019 Configuration in Java52
53
4. Add/write Configuration Backends (optional)
JSR 382/Microprofile Apache Tamaya
System Properties System Properties
Environment Properties Environment Properties
Classpath Resources Classpath Resources
CLI Args
Files, Resources, URLs
Etcd, consul
Hazelcast
OOTB Supported Configuration Backends:
26.06.2019 Configuration in Java53
54
Recap!
26.06.2019 Configuration in Java54
55
Recap: Configuration in Java
⚫ Configuration is a «hot» topic
⚫ JSR 382 stopped
⚫ Work will continue at Microprofile.io
⚫ Microprofile API is very puristic.
⚫ Apache Tamaya provides all features you will need and supports all major runtimes.
⚫ Apache Tamaya is ready to use!
26.06.2019 Configuration in Java55
56
Links
• Tamaya Project Page: http://tamaya.incubator.apache.org
• Microprofile Project http://microprofile.io
• JSR 382 Infos: https://github.com/eclipse/configjsr
• Twitter: @microprofile, @ConfigJSR, @tamayaconfig
• Apache Deltaspike: http://deltaspike.apache.org
• Apache Commons Configuration: http://commons.apache.org/proper/commons-
configuration/
• Oracle Helidon: http://helidon.io
26.06.2019 Configuration in Java56
57
Thank you!
Q&A
@atsticks
Anatole.tresch@trivadis.com
26.06.2019 Configuration in Java57

More Related Content

What's hot

20100604 unyoug apex40_bauser
20100604 unyoug apex40_bauser20100604 unyoug apex40_bauser
20100604 unyoug apex40_bauserahmed farouk
 
Tutorial: SharePoint 2013 Admin in the Hybrid World by Jason Himmelstein - SP...
Tutorial: SharePoint 2013 Admin in the Hybrid World by Jason Himmelstein - SP...Tutorial: SharePoint 2013 Admin in the Hybrid World by Jason Himmelstein - SP...
Tutorial: SharePoint 2013 Admin in the Hybrid World by Jason Himmelstein - SP...SPTechCon
 
Best Practice SharePoint Architecture
Best Practice SharePoint ArchitectureBest Practice SharePoint Architecture
Best Practice SharePoint ArchitectureMichael Noel
 
Introduction to j2 ee frameworks
Introduction to j2 ee frameworksIntroduction to j2 ee frameworks
Introduction to j2 ee frameworksMukesh Kumar
 
Spring 3.1 in a Nutshell - JAX London 2011
Spring 3.1 in a Nutshell - JAX London 2011Spring 3.1 in a Nutshell - JAX London 2011
Spring 3.1 in a Nutshell - JAX London 2011Sam Brannen
 
Spark HBase Connector: Feature Rich and Efficient Access to HBase Through Spa...
Spark HBase Connector: Feature Rich and Efficient Access to HBase Through Spa...Spark HBase Connector: Feature Rich and Efficient Access to HBase Through Spa...
Spark HBase Connector: Feature Rich and Efficient Access to HBase Through Spa...Databricks
 
Moving your Oracle Databases to the Oracle Cloud
Moving your Oracle Databases to the Oracle CloudMoving your Oracle Databases to the Oracle Cloud
Moving your Oracle Databases to the Oracle CloudAlex Zaballa
 
Cloudera Cares + DataKind | 7 May 2015 | London, UK
Cloudera Cares + DataKind | 7 May 2015 | London, UKCloudera Cares + DataKind | 7 May 2015 | London, UK
Cloudera Cares + DataKind | 7 May 2015 | London, UKCloudera, Inc.
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesAlfredo Abate
 
Design a share point 2013 architecture – the basics
Design a share point 2013 architecture – the basicsDesign a share point 2013 architecture – the basics
Design a share point 2013 architecture – the basicsAlexander Meijers
 
SharePoint Meets Database
SharePoint Meets DatabaseSharePoint Meets Database
SharePoint Meets DatabaseIron Speed
 
Oracle’s Advanced Analytics & Machine Learning 12.2c New Features & Road Map;...
Oracle’s Advanced Analytics & Machine Learning 12.2c New Features & Road Map;...Oracle’s Advanced Analytics & Machine Learning 12.2c New Features & Road Map;...
Oracle’s Advanced Analytics & Machine Learning 12.2c New Features & Road Map;...Charlie Berger
 
SharePoint 2010 best practices for infrastructure deployments SharePoint Sat...
SharePoint 2010 best practices for infrastructure deployments  SharePoint Sat...SharePoint 2010 best practices for infrastructure deployments  SharePoint Sat...
SharePoint 2010 best practices for infrastructure deployments SharePoint Sat...Knowledge Cue
 
MOUG17: SQLT Utility for Tuning - Practical Examples
MOUG17: SQLT Utility for Tuning - Practical ExamplesMOUG17: SQLT Utility for Tuning - Practical Examples
MOUG17: SQLT Utility for Tuning - Practical ExamplesMonica Li
 
Under the Hood of the Smartest Availability Features in Oracle's Autonomous D...
Under the Hood of the Smartest Availability Features in Oracle's Autonomous D...Under the Hood of the Smartest Availability Features in Oracle's Autonomous D...
Under the Hood of the Smartest Availability Features in Oracle's Autonomous D...Markus Michalewicz
 
Oracle & sql server comparison 2
Oracle & sql server comparison 2Oracle & sql server comparison 2
Oracle & sql server comparison 2Mohsen B
 
MySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document StoreMySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document StoreAbel Flórez
 

What's hot (18)

20100604 unyoug apex40_bauser
20100604 unyoug apex40_bauser20100604 unyoug apex40_bauser
20100604 unyoug apex40_bauser
 
Tutorial: SharePoint 2013 Admin in the Hybrid World by Jason Himmelstein - SP...
Tutorial: SharePoint 2013 Admin in the Hybrid World by Jason Himmelstein - SP...Tutorial: SharePoint 2013 Admin in the Hybrid World by Jason Himmelstein - SP...
Tutorial: SharePoint 2013 Admin in the Hybrid World by Jason Himmelstein - SP...
 
Best Practice SharePoint Architecture
Best Practice SharePoint ArchitectureBest Practice SharePoint Architecture
Best Practice SharePoint Architecture
 
Introduction to j2 ee frameworks
Introduction to j2 ee frameworksIntroduction to j2 ee frameworks
Introduction to j2 ee frameworks
 
Spring 3.1 in a Nutshell - JAX London 2011
Spring 3.1 in a Nutshell - JAX London 2011Spring 3.1 in a Nutshell - JAX London 2011
Spring 3.1 in a Nutshell - JAX London 2011
 
Spark HBase Connector: Feature Rich and Efficient Access to HBase Through Spa...
Spark HBase Connector: Feature Rich and Efficient Access to HBase Through Spa...Spark HBase Connector: Feature Rich and Efficient Access to HBase Through Spa...
Spark HBase Connector: Feature Rich and Efficient Access to HBase Through Spa...
 
Moving your Oracle Databases to the Oracle Cloud
Moving your Oracle Databases to the Oracle CloudMoving your Oracle Databases to the Oracle Cloud
Moving your Oracle Databases to the Oracle Cloud
 
Cloudera Cares + DataKind | 7 May 2015 | London, UK
Cloudera Cares + DataKind | 7 May 2015 | London, UKCloudera Cares + DataKind | 7 May 2015 | London, UK
Cloudera Cares + DataKind | 7 May 2015 | London, UK
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_Features
 
Design a share point 2013 architecture – the basics
Design a share point 2013 architecture – the basicsDesign a share point 2013 architecture – the basics
Design a share point 2013 architecture – the basics
 
SharePoint Meets Database
SharePoint Meets DatabaseSharePoint Meets Database
SharePoint Meets Database
 
Oracle’s Advanced Analytics & Machine Learning 12.2c New Features & Road Map;...
Oracle’s Advanced Analytics & Machine Learning 12.2c New Features & Road Map;...Oracle’s Advanced Analytics & Machine Learning 12.2c New Features & Road Map;...
Oracle’s Advanced Analytics & Machine Learning 12.2c New Features & Road Map;...
 
SharePoint 2010 best practices for infrastructure deployments SharePoint Sat...
SharePoint 2010 best practices for infrastructure deployments  SharePoint Sat...SharePoint 2010 best practices for infrastructure deployments  SharePoint Sat...
SharePoint 2010 best practices for infrastructure deployments SharePoint Sat...
 
MOUG17: SQLT Utility for Tuning - Practical Examples
MOUG17: SQLT Utility for Tuning - Practical ExamplesMOUG17: SQLT Utility for Tuning - Practical Examples
MOUG17: SQLT Utility for Tuning - Practical Examples
 
Under the Hood of the Smartest Availability Features in Oracle's Autonomous D...
Under the Hood of the Smartest Availability Features in Oracle's Autonomous D...Under the Hood of the Smartest Availability Features in Oracle's Autonomous D...
Under the Hood of the Smartest Availability Features in Oracle's Autonomous D...
 
Oracle & sql server comparison 2
Oracle & sql server comparison 2Oracle & sql server comparison 2
Oracle & sql server comparison 2
 
MySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document StoreMySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document Store
 
SharePoint Topology
SharePoint Topology SharePoint Topology
SharePoint Topology
 

Similar to JSR 382 Configuration in Java Standards and More

MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.Cloud Native Day Tel Aviv
 
Web Scale Reasoning and the LarKC Project
Web Scale Reasoning and the LarKC ProjectWeb Scale Reasoning and the LarKC Project
Web Scale Reasoning and the LarKC ProjectSaltlux Inc.
 
Configuration for Java EE and the Cloud
Configuration for Java EE and the CloudConfiguration for Java EE and the Cloud
Configuration for Java EE and the CloudDmitry Kornilov
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and ActivatorKevin Webber
 
Configuration for Java EE: Config JSR and Tamaya
Configuration for Java EE: Config JSR and TamayaConfiguration for Java EE: Config JSR and Tamaya
Configuration for Java EE: Config JSR and TamayaDmitry Kornilov
 
Architectures, Frameworks and Infrastructure
Architectures, Frameworks and InfrastructureArchitectures, Frameworks and Infrastructure
Architectures, Frameworks and Infrastructureharendra_pathak
 
Java 8 in Anger (QCon London)
Java 8 in Anger (QCon London)Java 8 in Anger (QCon London)
Java 8 in Anger (QCon London)Trisha Gee
 
Java 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx FranceJava 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx FranceTrisha Gee
 
Scala at Treasure Data
Scala at Treasure DataScala at Treasure Data
Scala at Treasure DataTaro L. Saito
 
Spark Saturday: Spark SQL & DataFrame Workshop with Apache Spark 2.3
Spark Saturday: Spark SQL & DataFrame Workshop with Apache Spark 2.3Spark Saturday: Spark SQL & DataFrame Workshop with Apache Spark 2.3
Spark Saturday: Spark SQL & DataFrame Workshop with Apache Spark 2.3Databricks
 
Java dev mar_2021_keynote
Java dev mar_2021_keynoteJava dev mar_2021_keynote
Java dev mar_2021_keynoteSuyash Joshi
 
JavaOne 2014 Java EE 8 Booth Slides
JavaOne 2014 Java EE 8 Booth SlidesJavaOne 2014 Java EE 8 Booth Slides
JavaOne 2014 Java EE 8 Booth SlidesEdward Burns
 
3 rad extensibility-srilakshmi_s_rajesh_k
3 rad extensibility-srilakshmi_s_rajesh_k3 rad extensibility-srilakshmi_s_rajesh_k
3 rad extensibility-srilakshmi_s_rajesh_kIBM
 
Rad Extensibility - Srilakshmi S Rajesh K
Rad Extensibility - Srilakshmi S Rajesh KRad Extensibility - Srilakshmi S Rajesh K
Rad Extensibility - Srilakshmi S Rajesh KRoopa Nadkarni
 
제3회난공불락 오픈소스 인프라세미나 - MySQL
제3회난공불락 오픈소스 인프라세미나 - MySQL제3회난공불락 오픈소스 인프라세미나 - MySQL
제3회난공불락 오픈소스 인프라세미나 - MySQLTommy Lee
 
Webinar: What's new in CDAP 3.5?
Webinar: What's new in CDAP 3.5?Webinar: What's new in CDAP 3.5?
Webinar: What's new in CDAP 3.5?Cask Data
 
Code igniter - A brief introduction
Code igniter - A brief introductionCode igniter - A brief introduction
Code igniter - A brief introductionCommit University
 
Simplifying Hadoop with RecordService, A Secure and Unified Data Access Path ...
Simplifying Hadoop with RecordService, A Secure and Unified Data Access Path ...Simplifying Hadoop with RecordService, A Secure and Unified Data Access Path ...
Simplifying Hadoop with RecordService, A Secure and Unified Data Access Path ...Cloudera, Inc.
 

Similar to JSR 382 Configuration in Java Standards and More (20)

MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
 
Web Scale Reasoning and the LarKC Project
Web Scale Reasoning and the LarKC ProjectWeb Scale Reasoning and the LarKC Project
Web Scale Reasoning and the LarKC Project
 
Configuration for Java EE and the Cloud
Configuration for Java EE and the CloudConfiguration for Java EE and the Cloud
Configuration for Java EE and the Cloud
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
 
Novinky v Oracle Database 18c
Novinky v Oracle Database 18cNovinky v Oracle Database 18c
Novinky v Oracle Database 18c
 
Configuration for Java EE: Config JSR and Tamaya
Configuration for Java EE: Config JSR and TamayaConfiguration for Java EE: Config JSR and Tamaya
Configuration for Java EE: Config JSR and Tamaya
 
Architectures, Frameworks and Infrastructure
Architectures, Frameworks and InfrastructureArchitectures, Frameworks and Infrastructure
Architectures, Frameworks and Infrastructure
 
Java 8 in Anger (QCon London)
Java 8 in Anger (QCon London)Java 8 in Anger (QCon London)
Java 8 in Anger (QCon London)
 
Java 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx FranceJava 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx France
 
Scala at Treasure Data
Scala at Treasure DataScala at Treasure Data
Scala at Treasure Data
 
Spark Saturday: Spark SQL & DataFrame Workshop with Apache Spark 2.3
Spark Saturday: Spark SQL & DataFrame Workshop with Apache Spark 2.3Spark Saturday: Spark SQL & DataFrame Workshop with Apache Spark 2.3
Spark Saturday: Spark SQL & DataFrame Workshop with Apache Spark 2.3
 
Java dev mar_2021_keynote
Java dev mar_2021_keynoteJava dev mar_2021_keynote
Java dev mar_2021_keynote
 
JavaOne 2014 Java EE 8 Booth Slides
JavaOne 2014 Java EE 8 Booth SlidesJavaOne 2014 Java EE 8 Booth Slides
JavaOne 2014 Java EE 8 Booth Slides
 
Catalyst optimizer
Catalyst optimizerCatalyst optimizer
Catalyst optimizer
 
3 rad extensibility-srilakshmi_s_rajesh_k
3 rad extensibility-srilakshmi_s_rajesh_k3 rad extensibility-srilakshmi_s_rajesh_k
3 rad extensibility-srilakshmi_s_rajesh_k
 
Rad Extensibility - Srilakshmi S Rajesh K
Rad Extensibility - Srilakshmi S Rajesh KRad Extensibility - Srilakshmi S Rajesh K
Rad Extensibility - Srilakshmi S Rajesh K
 
제3회난공불락 오픈소스 인프라세미나 - MySQL
제3회난공불락 오픈소스 인프라세미나 - MySQL제3회난공불락 오픈소스 인프라세미나 - MySQL
제3회난공불락 오픈소스 인프라세미나 - MySQL
 
Webinar: What's new in CDAP 3.5?
Webinar: What's new in CDAP 3.5?Webinar: What's new in CDAP 3.5?
Webinar: What's new in CDAP 3.5?
 
Code igniter - A brief introduction
Code igniter - A brief introductionCode igniter - A brief introduction
Code igniter - A brief introduction
 
Simplifying Hadoop with RecordService, A Secure and Unified Data Access Path ...
Simplifying Hadoop with RecordService, A Secure and Unified Data Access Path ...Simplifying Hadoop with RecordService, A Secure and Unified Data Access Path ...
Simplifying Hadoop with RecordService, A Secure and Unified Data Access Path ...
 

More from Anatole Tresch

Wie man Applikationen nicht bauen sollte...
Wie man Applikationen nicht bauen sollte...Wie man Applikationen nicht bauen sollte...
Wie man Applikationen nicht bauen sollte...Anatole Tresch
 
The Gib Five - Modern IT Architecture
The Gib Five - Modern IT ArchitectureThe Gib Five - Modern IT Architecture
The Gib Five - Modern IT ArchitectureAnatole Tresch
 
The Big Five - IT Architektur Heute
The Big Five - IT Architektur HeuteThe Big Five - IT Architektur Heute
The Big Five - IT Architektur HeuteAnatole Tresch
 
Disruption is Change is Future
Disruption is Change is FutureDisruption is Change is Future
Disruption is Change is FutureAnatole Tresch
 
Configuration with Microprofile and Apache Tamaya
Configuration with Microprofile and Apache TamayaConfiguration with Microprofile and Apache Tamaya
Configuration with Microprofile and Apache TamayaAnatole Tresch
 
Configuration beyond Java EE 8
Configuration beyond Java EE 8Configuration beyond Java EE 8
Configuration beyond Java EE 8Anatole Tresch
 
Alles Docker oder Was ?
Alles Docker oder Was ?Alles Docker oder Was ?
Alles Docker oder Was ?Anatole Tresch
 
Configure once, run everywhere 2016
Configure once, run everywhere 2016Configure once, run everywhere 2016
Configure once, run everywhere 2016Anatole Tresch
 
Configuration with Apache Tamaya
Configuration with Apache TamayaConfiguration with Apache Tamaya
Configuration with Apache TamayaAnatole Tresch
 
Wie Monolithen für die Zukuft trimmen
Wie Monolithen für die Zukuft trimmenWie Monolithen für die Zukuft trimmen
Wie Monolithen für die Zukuft trimmenAnatole Tresch
 
Configure Your Projects with Apache Tamaya
Configure Your Projects with Apache TamayaConfigure Your Projects with Apache Tamaya
Configure Your Projects with Apache TamayaAnatole Tresch
 
JSR 354 Hackday - What you can do...
JSR 354 Hackday - What you can do...JSR 354 Hackday - What you can do...
JSR 354 Hackday - What you can do...Anatole Tresch
 
Legacy Renewal of Central Framework in the Enterprise
Legacy Renewal of Central Framework in the EnterpriseLegacy Renewal of Central Framework in the Enterprise
Legacy Renewal of Central Framework in the EnterpriseAnatole Tresch
 
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...Anatole Tresch
 
A first Draft to Java Configuration
A first Draft to Java ConfigurationA first Draft to Java Configuration
A first Draft to Java ConfigurationAnatole Tresch
 
Go for the Money - JSR 354
Go for the Money - JSR 354Go for the Money - JSR 354
Go for the Money - JSR 354Anatole Tresch
 

More from Anatole Tresch (20)

Wie man Applikationen nicht bauen sollte...
Wie man Applikationen nicht bauen sollte...Wie man Applikationen nicht bauen sollte...
Wie man Applikationen nicht bauen sollte...
 
The Gib Five - Modern IT Architecture
The Gib Five - Modern IT ArchitectureThe Gib Five - Modern IT Architecture
The Gib Five - Modern IT Architecture
 
The Big Five - IT Architektur Heute
The Big Five - IT Architektur HeuteThe Big Five - IT Architektur Heute
The Big Five - IT Architektur Heute
 
Microservices in Java
Microservices in JavaMicroservices in Java
Microservices in Java
 
Disruption is Change is Future
Disruption is Change is FutureDisruption is Change is Future
Disruption is Change is Future
 
Configuration with Microprofile and Apache Tamaya
Configuration with Microprofile and Apache TamayaConfiguration with Microprofile and Apache Tamaya
Configuration with Microprofile and Apache Tamaya
 
Configuration beyond Java EE 8
Configuration beyond Java EE 8Configuration beyond Java EE 8
Configuration beyond Java EE 8
 
Alles Docker oder Was ?
Alles Docker oder Was ?Alles Docker oder Was ?
Alles Docker oder Was ?
 
Going Resilient...
Going Resilient...Going Resilient...
Going Resilient...
 
Configure once, run everywhere 2016
Configure once, run everywhere 2016Configure once, run everywhere 2016
Configure once, run everywhere 2016
 
Configuration with Apache Tamaya
Configuration with Apache TamayaConfiguration with Apache Tamaya
Configuration with Apache Tamaya
 
Wie Monolithen für die Zukuft trimmen
Wie Monolithen für die Zukuft trimmenWie Monolithen für die Zukuft trimmen
Wie Monolithen für die Zukuft trimmen
 
Configure Your Projects with Apache Tamaya
Configure Your Projects with Apache TamayaConfigure Your Projects with Apache Tamaya
Configure Your Projects with Apache Tamaya
 
JSR 354 Hackday - What you can do...
JSR 354 Hackday - What you can do...JSR 354 Hackday - What you can do...
JSR 354 Hackday - What you can do...
 
Legacy Renewal of Central Framework in the Enterprise
Legacy Renewal of Central Framework in the EnterpriseLegacy Renewal of Central Framework in the Enterprise
Legacy Renewal of Central Framework in the Enterprise
 
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...
Go for the Money: eine Einführung in JSR 354 - Java aktuell 2014 - Anatole Tr...
 
A first Draft to Java Configuration
A first Draft to Java ConfigurationA first Draft to Java Configuration
A first Draft to Java Configuration
 
JSR 354 LJC-Hackday
JSR 354 LJC-HackdayJSR 354 LJC-Hackday
JSR 354 LJC-Hackday
 
Adopt JSR 354
Adopt JSR 354Adopt JSR 354
Adopt JSR 354
 
Go for the Money - JSR 354
Go for the Money - JSR 354Go for the Money - JSR 354
Go for the Money - JSR 354
 

Recently uploaded

Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 

Recently uploaded (20)

Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 

JSR 382 Configuration in Java Standards and More

  • 1. https://maketechsimple.wordpress.com@atsticks JSR 382: Configuration in Java Standards and More… Anatole Tresch, Principal Consultant ZH AD
  • 2. 2 Agenda • What is Configuration? • Lifecycle and Runtimes • Backends • Configuration Services • How to use it in your projects? 26.06.2019 Configuration in Java2
  • 3. Anatole Tresch Principal Consultant, Trivadis AG (Switzerland) Spec Lead JSR 352 (Money and Currency) JSR 382 EG Member PPMC Member Apache Tamaya @atsticks anatole@apache.org anatole.tresch@trivadis.com 3 About me 26.06.2019 Configuration in Java3
  • 5. 5 Wikipedia: Configuration “In computing, configuration defines parameters and settings that control behavior of some computer programs. They are used for user applications, server processes and operating system settings and may change during runtime.” System Input Output Config 26.06.2019 Configuration in Java5
  • 6. 6 Wikipedia: Configuration Files “In computing, configuration files (or config files) are files used to configure the parameters and initial settings for some computer programs. They are used for user applications, server processes and operating system settings.” 26.06.2019 Configuration in Java6
  • 9. 9 Configuration Files: xml • Very verbose 26.06.2019 Configuration in Java9
  • 10. 10 Configuration Files: properties • No explicit support for hierarchies, lists etc. • Pure i18n support • Pure Multiline support 26.06.2019 Configuration in Java10
  • 11. 11 Configuration Files: json • It’s for machines not humans! • Strictly: no comments 26.06.2019 Configuration in Java11
  • 12. 12 • Portability Issues • Multiline values Configuration Files: yaml 26.06.2019 Configuration in Java12
  • 13. 13 • https://hjson.org/ • Advantages of JSON • Easy for humans Configuration Files: hjson 26.06.2019 Configuration in Java13
  • 14. 14 Like HJSON, but even simpler https://github.com/lightbend/config Configuration Files: hocon { a : A b : B c : C d { o: O p: P } } 26.06.2019 Configuration in Java14
  • 16. 16 Configuration Lifecycle • Development • Build time • Deployment time • Runtime A Configuration Runtime System must support all of them! 26.06.2019 Configuration in Java16
  • 17. Configuration Runtime • A programmatic model of Configuration Data • A programmatic API to access Configuration Data • An SPI for extending and customizing • Optional: • A predefined lifecycle of configuration data • Integration with other frameworks, e.g. Spring, JakartaEE, OSGI, plain Java, … 26.06.2019 Configuration in Java17
  • 18. 18 Some Configuration Runtime Solutions… • Apache Commons Config • Apache Tamaya • Apache Deltaspike • Netflix Archaius Config • Typesafe Config • Microprofile.io • Spring • JSR 382 • Jakarta EEConfig ? • ...
  • 20. Microprofile • Part of MicroProfile.io project • JSR 382 Code has been moved here • Minimum viable solution: • Configuration can live outside of an application. • Ready for Microservice and container environments. • Different Locations and Formats • Dynamic change is possible. • A @ConfigProperty annotation for CDI (incl. default values). • String/String key/value, types through Converters • A Config API to function without CDI. • Current Release 1.3 (part of MP 2.2) 20 https://github.com/eclipse/microprofile-config 26.06.2019 Configuration in Java20
  • 21. 21 Apache Tamaya • Result of first Standardization Attempt in 2013 • Minimum viable solution: • Basically similar to JSR 382/Microprofile • Full SE API • Mature • Tree value model for more powerful type, conversion & filtering mechanisms • With modular extensions: • A @Config annotation for injection (works with Spring, CDI and more) • Multiple formats (props, xml, json, hjson, yaml, hocon, ini) • Integration with Spring, OSGI, Camel, Vertx and more • Metaconfig, Documentation (sandbox) http://tamaya.apache.org 26.06.2019 Configuration in Java21
  • 22. Accessing Configuration Apache Tamaya • Version 0.3-incubating, ALv2-Licence • http://tamaya.incubator.apache.org • Latest Release: org.apache.tamaya:tamaya-core:0.3-incubating Examples here: 0.4-incubating-SNAPSHOT • API & Core: https://github.com/apache/incubator-tamaya • Extensions: https://github.com/apache/incubator-tamaya-extensions • Sandbox: https://github.com/apache/incubator-tamaya-sandbox Apache Snapshot Repo: https://repository.apache.org/content/repositories/snapshots 26.06.2019 Configuration in Java22
  • 23. 23 Helidon • Part of Oracle’s Microservice Framework • Authors are the same as in JSR discussion of 2016 <dependency> <groupId>io.helidon.config</groupId> <artifactId>helidon-config</artifactId> <version>version-of-config-you-are-using</version> </dependency> https://helidon.io/
  • 24. Let’s dive deeper… …into Code …to the APIs…
  • 25. Apache Tamaya Microprofile • Simple Text Key/Value Pairs • Optional Conversion Configuration Data – Accessing Properties 26.06.2019 Configuration in Java25
  • 26. Configuration Data – Optional Values Apache Tamaya Microprofile 26.06.2019 Configuration in Java26
  • 27. Configuration Data - Defaults In Apache Tamaya additionally possible: Microprofile 26.06.2019 Configuration in Java27
  • 28. Configuration Data – Multikey Lookup Apache Tamaya 26.06.2019 Configuration in Java28
  • 29. 29 Configuration Data – Configuration Injection Apache Tamaya Microprofile • Tamaya also supports multikey-lookup with injection
  • 30. 30 Configuration Data – Snapshots Microprofile Update: ConfigAccessor -> ConfigAccessorBuilder 26.06.2019 Configuration in Java30
  • 31. 31 Configuration Data – Snapshots Apache Tamaya 26.06.2019 Configuration in Java31
  • 32. Configuration Data - Builders Microprofile 26.06.2019 Configuration in Java32
  • 33. Configuration Data - Builders Apache Tamaya • Tamaya has also functonality for removing/reordering of existing SPI artifacts. • Filters are not supported by the JSR as of now. 26.06.2019 Configuration in Java33
  • 35. 35 Configuration Backends (SPI) – Basic Idea Config Runtime Backends Configuration Data (Files, Servers etc.) «Backends are are the adapters between the config system and your Configuration Data» 26.06.2019 Configuration in Java35
  • 36. Config Backend SPI – Config-/PropertySources Apache TamayaMicroprofile 26.06.2019 Configuration in Java36
  • 37.
  • 38. 38 Configuration Services Config Runtime Backends Config Services «Services (extensions) provide additional funtionality or runtime integrations» 26.06.2019 Configuration in Java38
  • 39. 39 Example Services • Placeholders and calculated values: ${host.name} • ANT styled file and resource patterns: classpath:**/*.yml • Functional operators and queries (extract subsections, printing) • Change events and mutability • Additional configuration formats • Integration with Spring, CDI, OSGI, Vertx, …. • PropertySources for Consul, etcd etc • … Microprofile does not define any services. 26.06.2019 Configuration in Java39
  • 40. Example Service: Templates 26.06.2019 Configuration in Java40
  • 41. Example Service: Placeholder resolution Apache Tamaya • When the tamaya-resolver extension is installed, resolution is transparent. 26.06.2019 Configuration in Java41
  • 42. Example Service: Functional Operators • Filtering and Printing with the tamaya-functions extension. 26.06.2019 Configuration in Java42
  • 45. Design in 120 Seconds... • Tamaya ConfigurationContext PropertyFilters ConfigSources Microprofile ServiceContextManager PropertySources String Value Typed Value ConfigProvider ServiceContext PropertyValue Tamaya Typed Value PropertyValue: - Simple - Array - Map + Metadata PropertyValue PropertySourceProvider ConfigSourceProvider <create> <create> ConfigurationProviderSpi ConfigProviderResolver + ConversionContext + FilterContext ConfigAccessor 26.06.2019 Configuration in Java45
  • 46. Configuration SPI – Tamaya Value Tree • Matches structures as defined by yaml, json, xml configuration files. • Allows complex mappings, e.g. multi-value based collections and complex custom types • Mapping to properties still possible (and OOTB supported). PropertyValue + value: String + metadata: Map<String,String> ObjectValue + fields: Map<String,PropertyValue> ListValue + children: List<PropertyValue> 26.06.2019 Configuration in Java46
  • 47. Configuration SPI – Type Converters Microprofile 26.06.2019 Configuration in Java47
  • 48. Configuration SPI – Type Converters Apache Tamaya • Tamaya’s PropertyConverters have additional access to a ConversionContext 26.06.2019 Configuration in Java48
  • 50. 50 1. Add Dependencies to your Project <dependency> <groupId>org.apache.tamaya</groupId> <artifactId>tamaya-core</artifactId> <version>…</version> </dependency> Core API & Implementation <dependency> <groupId>org.apache.tamaya.ext</groupId> <artifactId>tamaya-spring</artifactId> <version>…</version> </dependency> Basic Extensions Needed for Spring Support <dependency> <groupId>org.apache.tamaya.ext</groupId> <artifactId>tamaya-functions</artifactId> <version>…</version> </dependency> • Current version: 0.4-incubating-SNAPSHOT • Tamaya only, for Microprofile also add Tamaya‘s microprofile extension module • Dont forget to use the Apache Snapshot Repo: https://repository.apache.org/content/repositor ies/snapshots 26.06.2019 Configuration in Java50
  • 51. 51 2. Integrate with your target runtime 26.06.2019 Configuration in Java51
  • 53. 53 4. Add/write Configuration Backends (optional) JSR 382/Microprofile Apache Tamaya System Properties System Properties Environment Properties Environment Properties Classpath Resources Classpath Resources CLI Args Files, Resources, URLs Etcd, consul Hazelcast OOTB Supported Configuration Backends: 26.06.2019 Configuration in Java53
  • 55. 55 Recap: Configuration in Java ⚫ Configuration is a «hot» topic ⚫ JSR 382 stopped ⚫ Work will continue at Microprofile.io ⚫ Microprofile API is very puristic. ⚫ Apache Tamaya provides all features you will need and supports all major runtimes. ⚫ Apache Tamaya is ready to use! 26.06.2019 Configuration in Java55
  • 56. 56 Links • Tamaya Project Page: http://tamaya.incubator.apache.org • Microprofile Project http://microprofile.io • JSR 382 Infos: https://github.com/eclipse/configjsr • Twitter: @microprofile, @ConfigJSR, @tamayaconfig • Apache Deltaspike: http://deltaspike.apache.org • Apache Commons Configuration: http://commons.apache.org/proper/commons- configuration/ • Oracle Helidon: http://helidon.io 26.06.2019 Configuration in Java56