SlideShare uma empresa Scribd logo
1 de 38
Baixar para ler offline
Anatole Tresch & Werner Keil
Trivadis AG
@atsticks @wernerkeil
Apache Tamaya
Configuration Management
Anatole Tresch
●
Principal Consultant, Trivadis AG (Switzerland)
●
Star Spec Lead JSR 354
●
Technical Architect, Lead Engineer
●
PPMC Member Apache Tamaya
●
Twitter/Google+: @atsticks
●
anatole@apache.org
●
anatole.tresch@trivadis.com
●
JUG Switzerland, Zurich Java Community
3
Bio
Werner Keil
●
Consultant – Coach
●
Creative Cosmopolitan
●
Open Source Evangelist
●
Software Architect
●
JCP EC Member
●
Tamaya Committer
●
Java EE | DevOps Guy …
●
Twitter/Google+: @wernerkeil
●
wkeil@apache.org
4
Bio
Agenda
5
●
General Infos
●
What is Configuration?
●
Use Cases
●
Apache Tamaya
●
Core Concepts
●
Extensions
●
Outlook
6
General Infos
7
●
2012: Configuration was voted an important
aspect for Java EE 8
●
2013:
●
Setup of Java EE Configuration JSR failed
●
Standardization on SE Level did not have enough momentum
●
BUT:
●
Configuration is a crucial cross cutting concern
●
There is no (really NO!) defacto standard
●
Reinventing the wheel is daily business
History of Apache Tamaya
The People behind Tamaya
8
• John D. Ament (Mentor)
• David Blevins (Champion)
• Werner Keil
• Gerhard Petracek (Mentor)
• Mark Struberg (Mentor)
• Anatole Tresch
• Oliver B. Fischer
• ...
•
The Objectives of Apache Tamaya
9
●
Define a common API for accessing configuration
●
Minimalistic, also fits into ME
●
Flexible, pluggable and extendible design
●
support functional programming style
●
Be compatible with Java 7 and beyond
●
Provide a reference implementation
●
Provide Extension Modules for Additional Features
●
If possible, create a Standard!
•
•
What is Configuration?
What people think is configuration?
11
●
Many different interested stakeholders
●
Many things to configure
●
Divergent views
●
Setup for a server environment
●
Parameters of a runtime (staging, localization etc.)
●
Deployment descriptors
●
Technology-specific components (beans, wirings etc.)
●
Resource-specific settings (data sources, message queues etc.)
●
Dynamic scripting facility, Different scopes (global, ear, app, …)
●
Different granularities, varying levels of applicability, Different formats …
What we think is configuration
12
Component X
Component Y
<dependency>
Configuration
<dependency> Components:

Behaviour and state

Transitive Deps

Scopes

Code

Dynamic

Not serializalbe
Configuration:

Data, Value Types

Transitive Deps

Scopes

Key, value pairs

Static

Serializable
Use Cases
UC: Access Configuration Similarly
14
Configuration
API
API
MicroService
Container
IaaS
PaaS
Cache SaaS
Build-Tool
● Any Location
● Any Format
● Any Policy
SPI
UC: Reduce Redundancy
15
Service Foo
Cache
Foo Configuration:
Service.host.ip=192.168.1.10
Service.stage=test
Service.param=paramValue
Redundant!
File 1
File 2
Tamaya
Configuration
Foo Configuration:
Service.host.ip=${env:HOST_IP}
Service.stage=${env:STAGE}
Service.param=paramValue
Cache Configuration:
Cache.host.ip=192.168.1.10
Cache.stage=test
Cache.param=cacheValue
Tamaya
Configuration
Cache Configuration:
Cache.host.ip=${env:HOST_IP}
Cache.stage=${env:STAGE}
Cache.param=cacheValue
Tamaya
Configuration
Tamaya
Configuration
UC: Convention over Configuration
16
Foo Configuration:
Service.host.ip=${cfg:env.host.ip}
Service.stage=${cfg:env.stage}
Service.param=paramValue
Cache Configuration:
Cache.host.ip=${cfg:env.host.ip}
Cache.stage=${cfg:env.stage}
Cache.param=cacheValue
Defaults:
env.host.ip=${env:HOST_IP}
env.stage=${env:STAGE}
Service Foo
Cache
Tamaya
Configuration
Tamaya
Configuration
UC: Pluggable Config Backends
Classic:
Tamaya Configuration
17
Distributed:
ZooKeeper
Etcd
...
Classic Policy
(PropertySources)
Myproject/bin/...
Myproject/conf/server.xml
Myproject/conf/cluster.xml
Myproject/conf/security.xml
Myproject/lib/...
...
Unified Config API
Remote Policy
(PropertySources)
???
Unified API for
configuration access
Policies can be
provided as jar-
artifacts separately
Additional
benefits: config
documentation
Your Project
UC: Enterprise Integration
18
Company X:
Config SOAP
Myproject/bin/...
Myproject/conf/server.xml
Myproject/conf/cluster.xml
Myproject/conf/security.xml
Myproject/lib/...
...
Company Z:
Config Rest
Company Y:
etcd
Company A:
Legacy Config
Tamaya Configuration
Classic Policy
(PropertySources)
Unified Config API
Config Integration
(PropertySources)
Your Project
19
Service
Foo
Cache
Tamaya
Configuration
Tamaya
Configuration
Locations:

file:${filedir}

classpath:META-INF/defaults/
configuration.*

classpath:META-INF/${STAGE}/
configuration.*

url:http://myserver.int/cfg

System properties

Env. Properties
Formats:

properties

xml

json

yaml
Config Policy
<implements>
Define, implement and distribute Company
Wide Configuration Policy
Policy
Policy
<implements>
UC: Enforceable Policies
20
●
Reinventing the wheel is daily business, leading to
●
Higher Efforts in Enterprise Integration
●
Configuration Redundancies and Inconsistencies
●
Unclear or Complex Handling when remote Configuration should be
supported as well
●
Make Projects Integration Raedy with Company Infrastructure
●
Make your Configuration Backends Pluggable
Summary: Why we need Tamaya?
The API
21
Let's start simple!
22
●
Add dependency
org.apache.tamaya:core:1.0-incubating
●
Add Config to META-INF/javaconfiguration.properties
●
Use it!
Configuration config =
ConfigurationProvider.getConfiguration();
String name = config.getOrDefault("name", "John");
int ChildNum = config.get("childNum", int.class);
ConfigurationProvider
23
public class ConfigurationProvider{
public static Configuration getConfiguration();
public static ConfigurationContext getConfigurationContext();
public static ConfigurationContextBuilder
getConfigurationContextBuilder()
public static void setConfigurationContext(
ConfigurationContext context);
}
24
public interface Configuration{
String get(String key);
String getOrDefault(String key, String defaultValue);
<T> T get(String key, Class<T> type);
<T> T get(String key, TypeLiteral<T> type);
<T> T getOrDefault(String key, Class<T> type, T defaultValue);
<T> T getOrDefault(String key, TypeLiteral<T> type, T defaultValue);
Map<String,String> getProperties();
// Functional Extension Points
Configuration with(ConfigOperator operator):
<T> T query(ConfigQuery<T> query);
}
Configuration
Core Concepts
25
●
Configuration provides properties
●
built up by an ordered list of
PropertySources
●
SPI
●
PropertyConverter
●
CombinationPolicy
●
PropertyFilter
●
Extensions (discussed later)
ConfigurationContext
PropertyFilters
PropertySource
PropertySource
PropertySource
PropertySource
Configuration
CombinationPolicy
PropertyProviders
<provides>
PropertyConverter
Overriding Basics
26
#default ordinal = 0
name=Benjamin
childNum=0
family=Tresch
#override ordinal
tamaya.ordinal=10
name=Anatole
childNum=3
tamaya.ordinal=10
name=Anatole
childNum=3
family=Tresch
CombinationPolicy
27
list=a,b,c
list{collection-type}=List
tamaya.ordinal=10
list=aa,bb
tamaya.ordinal=10
list=aa,bb,a,b,c
list{collection-type}=List
SPI: PropertySource
PropertySourceProvider
public interface PropertySource {
static final String TAMAYA_ORDINAL = "tamaya.ordinal";
String getName();
int getOrdinal();
String get(String key);
Map<String, String> getProperties();
}
public interface PropertySourceProvider {
Collection<PropertySource> getPropertySources();
}
Extension Modules
29
Available Plugins
30
•Tamaya-inject: Configuration Injection and Templates
•Tamaya-resolver: Expression resolution, placeholders, dynamic values
•Tamaya-resources: Ant styled resource resolution
•Tamaya-format: Abstraction of a format, separating parsing from semantic mapping to
configuration
•Format Extensions: yaml*, json, ini, ...
•Tamaya-spring: Integration with Spring
•Tamaya-classloader-support: Managing Tamaya Services within Classloading Hierarchies
•Tamaya-cdi: Integration with CDI
•Tamaya-server: REST/JSON Configuration Server
•Tamaya-remote: Client PropertySource matching server component
•Tamaya-docs*: Configuration Documentation
* work in progress
Planned Features
31
●
Java EE: Configuring EE, where possible
●
Karaf Integration
●
Source Integrations:
●
Commons-config
●
Etcd
●
Zookeeper
●
...
●
Runtime Integrations:
●
???
Configuration Injection
32
@ConfiguredType(defaultSections=”com.mycomp.tenantAdress”)
public final class MyTenant{
private String name;
@ConfiguredProperty
@DefaultValue(”2000”)
private long customerId;
@ConfiguredProperty(keys={
”privateAddress”,”businessAdress”,”[my.qualified.adress]”
})
private String address;
...
}
MyTenant t = new MyTenant();
ConfigurationInjection
.getConfigurationInjector()
.configure(t);
MyTenant t = new MyTenant();
ConfigurationInjection
.getConfigurationInjector()
.configure(t);
@RequestScoped
public class MyClass{
@Inject
private MyTenant t;
…
}
@RequestScoped
public class MyClass{
@Inject
private MyTenant t;
…
}
Configuration Template
33
@ConfiguredType(defaultSections=”com.mycomp.tenantAdress”)
public interface MyTenant{
public String getName();
@ConfiguredProperty
@DefaultValue(”2000”)
public long getCustomerId();
@ConfiguredProperty(keys={
”privateAddress”,”businessAdress”,”[my.qualified.adress]”
})
public String getAddress();
}
MyTenant t =
ConfigurationInjection
.getConfigurationInjector()
.createTemplate(MyTenant.class);
MyTenant t =
ConfigurationInjection
.getConfigurationInjector()
.createTemplate(MyTenant.class);
Demo
DEMO
34
Summary
35
Apache Tamaya Provides
• A Complete API based on Java SE 7, compatible with SE 6
• String key/value based thread-safe Configuration Model
• Support for Type-Safe Configuration Value Conversion
• Functional extension points
• Simple Filtering and Overrides
• Small footprint
• Extendible with plugins
We need help
36
Apache Tamaya is great, but we need you...
• … using it!
• … asking for features!
• … envangelizing it!
• … loving it!
• … extending it!
• ...
Links
●
Twitter: @tamayaconfig
●
Blog: http://javaeeconfig.blogspot.com
●
Presentation by Mike Keith on JavaOne 2013:
https://oracleus.activeevents.com/2013/connect/sessionDetail.ww?SESSION_ID=7755
●
Apache Deltaspike: http://deltaspike.apache.org
●
Java Config Builder: https://github.com/TNG/config-builder
●
Apache Commons Configuration: http://commons.apache.org/proper/commons-configuration/
●
Jfig: http://jfig.sourceforge.net/
●
Carbon Configuration: http://carbon.sourceforge.net/modules/core/docs/config/Usage.html
●
Comparison on Carbon and Others:
http://www.mail-archive.com/commons-dev@jakarta.apache.org/msg37597.html
●
Spring Framework: http://projects.spring.io/spring-framework/
●
Owner: http://owner.aeonbits.org/
37
Q&A
38
Thank you!
Anatole Tresch
Trivadis AG
Principal Consultant
Twitter/Google+: @atsticks
anatole@apache.org
anatole.tresch@trivadis.com

Mais conteúdo relacionado

Mais procurados

Native REST Web Services with Oracle 11g
Native REST Web Services with Oracle 11gNative REST Web Services with Oracle 11g
Native REST Web Services with Oracle 11gMarcelo Ochoa
 
What’s New in Oracle Database 12c for PHP
What’s New in Oracle Database 12c for PHPWhat’s New in Oracle Database 12c for PHP
What’s New in Oracle Database 12c for PHPChristopher Jones
 
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011Alexander Klimetschek
 
Demystifying Oak Search
Demystifying Oak SearchDemystifying Oak Search
Demystifying Oak SearchJustin Edelson
 
Hibernate Developer Reference
Hibernate Developer ReferenceHibernate Developer Reference
Hibernate Developer ReferenceMuthuselvam RS
 
Lazy vs. Eager Loading Strategies in JPA 2.1
Lazy vs. Eager Loading Strategies in JPA 2.1Lazy vs. Eager Loading Strategies in JPA 2.1
Lazy vs. Eager Loading Strategies in JPA 2.1Patrycja Wegrzynowicz
 
Java EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersJava EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersBruno Borges
 
Integration patterns in AEM 6
Integration patterns in AEM 6Integration patterns in AEM 6
Integration patterns in AEM 6Yuval Ararat
 
Java: Create The Future Keynote
Java: Create The Future KeynoteJava: Create The Future Keynote
Java: Create The Future KeynoteSimon Ritter
 
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX LondonJAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX LondonArun Gupta
 
Php Applications with Oracle by Kuassi Mensah
Php Applications with Oracle by Kuassi MensahPhp Applications with Oracle by Kuassi Mensah
Php Applications with Oracle by Kuassi MensahPHP Barcelona Conference
 
RestFull Webservices with JAX-RS
RestFull Webservices with JAX-RSRestFull Webservices with JAX-RS
RestFull Webservices with JAX-RSNeil Ghosh
 
Changes in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowChanges in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowBruno Borges
 
Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014Simon Ritter
 
Node.js und die Oracle-Datenbank
Node.js und die Oracle-DatenbankNode.js und die Oracle-Datenbank
Node.js und die Oracle-DatenbankCarsten Czarski
 

Mais procurados (20)

Java EE for the Cloud
Java EE for the CloudJava EE for the Cloud
Java EE for the Cloud
 
Native REST Web Services with Oracle 11g
Native REST Web Services with Oracle 11gNative REST Web Services with Oracle 11g
Native REST Web Services with Oracle 11g
 
RESTing with JAX-RS
RESTing with JAX-RSRESTing with JAX-RS
RESTing with JAX-RS
 
What’s New in Oracle Database 12c for PHP
What’s New in Oracle Database 12c for PHPWhat’s New in Oracle Database 12c for PHP
What’s New in Oracle Database 12c for PHP
 
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
 
PHP Oracle
PHP OraclePHP Oracle
PHP Oracle
 
Demystifying Oak Search
Demystifying Oak SearchDemystifying Oak Search
Demystifying Oak Search
 
Hibernate Developer Reference
Hibernate Developer ReferenceHibernate Developer Reference
Hibernate Developer Reference
 
Lazy vs. Eager Loading Strategies in JPA 2.1
Lazy vs. Eager Loading Strategies in JPA 2.1Lazy vs. Eager Loading Strategies in JPA 2.1
Lazy vs. Eager Loading Strategies in JPA 2.1
 
Java EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersJava EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c Developers
 
Integration patterns in AEM 6
Integration patterns in AEM 6Integration patterns in AEM 6
Integration patterns in AEM 6
 
Java: Create The Future Keynote
Java: Create The Future KeynoteJava: Create The Future Keynote
Java: Create The Future Keynote
 
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX LondonJAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
 
JSON-B for CZJUG
JSON-B for CZJUGJSON-B for CZJUG
JSON-B for CZJUG
 
Php Applications with Oracle by Kuassi Mensah
Php Applications with Oracle by Kuassi MensahPhp Applications with Oracle by Kuassi Mensah
Php Applications with Oracle by Kuassi Mensah
 
RestFull Webservices with JAX-RS
RestFull Webservices with JAX-RSRestFull Webservices with JAX-RS
RestFull Webservices with JAX-RS
 
Changes in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowChanges in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must Know
 
Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014
 
Oracle Essentials Oracle Database 11g
Oracle Essentials   Oracle Database 11gOracle Essentials   Oracle Database 11g
Oracle Essentials Oracle Database 11g
 
Node.js und die Oracle-Datenbank
Node.js und die Oracle-DatenbankNode.js und die Oracle-Datenbank
Node.js und die Oracle-Datenbank
 

Semelhante a Configure Your Projects with Apache Tamaya

Slice: OpenJPA for Distributed Persistence
Slice: OpenJPA for Distributed PersistenceSlice: OpenJPA for Distributed Persistence
Slice: OpenJPA for Distributed PersistencePinaki Poddar
 
Tuning SQL Server for Sharepoint 2013- What every sharepoint consultant need...
Tuning SQL Server for Sharepoint 2013-  What every sharepoint consultant need...Tuning SQL Server for Sharepoint 2013-  What every sharepoint consultant need...
Tuning SQL Server for Sharepoint 2013- What every sharepoint consultant need...serge luca
 
InterConnect2016: WebApp Architectures with Java and Node.js
InterConnect2016: WebApp Architectures with Java and Node.jsInterConnect2016: WebApp Architectures with Java and Node.js
InterConnect2016: WebApp Architectures with Java and Node.jsChris Bailey
 
Yaetos_Meetup_SparkBCN_v1.pdf
Yaetos_Meetup_SparkBCN_v1.pdfYaetos_Meetup_SparkBCN_v1.pdf
Yaetos_Meetup_SparkBCN_v1.pdfprevota
 
Tuning SQL Server for Sharepoint-Sharepoint Summit Toronto 2014
Tuning SQL Server for Sharepoint-Sharepoint Summit Toronto 2014Tuning SQL Server for Sharepoint-Sharepoint Summit Toronto 2014
Tuning SQL Server for Sharepoint-Sharepoint Summit Toronto 2014serge luca
 
SQL Server 2000 Research Series - Transact SQL
SQL Server 2000 Research Series - Transact SQLSQL Server 2000 Research Series - Transact SQL
SQL Server 2000 Research Series - Transact SQLJerry Yang
 
Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21Stamatis Zampetakis
 
Yaetos Tech Overview
Yaetos Tech OverviewYaetos Tech Overview
Yaetos Tech Overviewprevota
 
Creating PostgreSQL-as-a-Service at Scale
Creating PostgreSQL-as-a-Service at ScaleCreating PostgreSQL-as-a-Service at Scale
Creating PostgreSQL-as-a-Service at ScaleSean Chittenden
 
Optimize SQL server performance for SharePoint
Optimize SQL server performance for SharePointOptimize SQL server performance for SharePoint
Optimize SQL server performance for SharePointserge luca
 
Instrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaInstrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaMark Leith
 
Preparing for Upgrade to SharePoint 2010 with Joel Oleson Quest Software Webcast
Preparing for Upgrade to SharePoint 2010 with Joel Oleson Quest Software WebcastPreparing for Upgrade to SharePoint 2010 with Joel Oleson Quest Software Webcast
Preparing for Upgrade to SharePoint 2010 with Joel Oleson Quest Software WebcastJoel Oleson
 
Getting data into Rudder
Getting data into RudderGetting data into Rudder
Getting data into RudderRUDDER
 
Sql Server Tuning for SharePoint : what every consultant must know (Office 36...
Sql Server Tuning for SharePoint : what every consultant must know (Office 36...Sql Server Tuning for SharePoint : what every consultant must know (Office 36...
Sql Server Tuning for SharePoint : what every consultant must know (Office 36...serge luca
 
Apache Pinot Meetup Sept02, 2020
Apache Pinot Meetup Sept02, 2020Apache Pinot Meetup Sept02, 2020
Apache Pinot Meetup Sept02, 2020Mayank Shrivastava
 
Ducksboard - A real-time data oriented webservice architecture
Ducksboard - A real-time data oriented webservice architectureDucksboard - A real-time data oriented webservice architecture
Ducksboard - A real-time data oriented webservice architectureDucksboard
 
Enhancements that will make your sql database roar sp1 edition sql bits 2017
Enhancements that will make your sql database roar sp1 edition sql bits 2017Enhancements that will make your sql database roar sp1 edition sql bits 2017
Enhancements that will make your sql database roar sp1 edition sql bits 2017Bob Ward
 

Semelhante a Configure Your Projects with Apache Tamaya (20)

Slice: OpenJPA for Distributed Persistence
Slice: OpenJPA for Distributed PersistenceSlice: OpenJPA for Distributed Persistence
Slice: OpenJPA for Distributed Persistence
 
Ci for all
Ci for allCi for all
Ci for all
 
Tuning SQL Server for Sharepoint 2013- What every sharepoint consultant need...
Tuning SQL Server for Sharepoint 2013-  What every sharepoint consultant need...Tuning SQL Server for Sharepoint 2013-  What every sharepoint consultant need...
Tuning SQL Server for Sharepoint 2013- What every sharepoint consultant need...
 
InterConnect2016: WebApp Architectures with Java and Node.js
InterConnect2016: WebApp Architectures with Java and Node.jsInterConnect2016: WebApp Architectures with Java and Node.js
InterConnect2016: WebApp Architectures with Java and Node.js
 
Yaetos_Meetup_SparkBCN_v1.pdf
Yaetos_Meetup_SparkBCN_v1.pdfYaetos_Meetup_SparkBCN_v1.pdf
Yaetos_Meetup_SparkBCN_v1.pdf
 
Tuning SQL Server for Sharepoint-Sharepoint Summit Toronto 2014
Tuning SQL Server for Sharepoint-Sharepoint Summit Toronto 2014Tuning SQL Server for Sharepoint-Sharepoint Summit Toronto 2014
Tuning SQL Server for Sharepoint-Sharepoint Summit Toronto 2014
 
SQL Server 2000 Research Series - Transact SQL
SQL Server 2000 Research Series - Transact SQLSQL Server 2000 Research Series - Transact SQL
SQL Server 2000 Research Series - Transact SQL
 
Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21
 
Yaetos Tech Overview
Yaetos Tech OverviewYaetos Tech Overview
Yaetos Tech Overview
 
Creating PostgreSQL-as-a-Service at Scale
Creating PostgreSQL-as-a-Service at ScaleCreating PostgreSQL-as-a-Service at Scale
Creating PostgreSQL-as-a-Service at Scale
 
Optimize SQL server performance for SharePoint
Optimize SQL server performance for SharePointOptimize SQL server performance for SharePoint
Optimize SQL server performance for SharePoint
 
Instrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaInstrumenting plugins for Performance Schema
Instrumenting plugins for Performance Schema
 
Scale By The Bay | 2020 | Gimel
Scale By The Bay | 2020 | GimelScale By The Bay | 2020 | Gimel
Scale By The Bay | 2020 | Gimel
 
Preparing for Upgrade to SharePoint 2010 with Joel Oleson Quest Software Webcast
Preparing for Upgrade to SharePoint 2010 with Joel Oleson Quest Software WebcastPreparing for Upgrade to SharePoint 2010 with Joel Oleson Quest Software Webcast
Preparing for Upgrade to SharePoint 2010 with Joel Oleson Quest Software Webcast
 
Getting data into Rudder
Getting data into RudderGetting data into Rudder
Getting data into Rudder
 
Sql Server Tuning for SharePoint : what every consultant must know (Office 36...
Sql Server Tuning for SharePoint : what every consultant must know (Office 36...Sql Server Tuning for SharePoint : what every consultant must know (Office 36...
Sql Server Tuning for SharePoint : what every consultant must know (Office 36...
 
Apache Pinot Meetup Sept02, 2020
Apache Pinot Meetup Sept02, 2020Apache Pinot Meetup Sept02, 2020
Apache Pinot Meetup Sept02, 2020
 
My Profile
My ProfileMy Profile
My Profile
 
Ducksboard - A real-time data oriented webservice architecture
Ducksboard - A real-time data oriented webservice architectureDucksboard - A real-time data oriented webservice architecture
Ducksboard - A real-time data oriented webservice architecture
 
Enhancements that will make your sql database roar sp1 edition sql bits 2017
Enhancements that will make your sql database roar sp1 edition sql bits 2017Enhancements that will make your sql database roar sp1 edition sql bits 2017
Enhancements that will make your sql database roar sp1 edition sql bits 2017
 

Mais de Anatole Tresch

Jsr382: Konfiguration in Java
Jsr382: Konfiguration in JavaJsr382: Konfiguration in Java
Jsr382: Konfiguration in JavaAnatole 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
 
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
 
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
 
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
 
Go for the Money - JSR 354
Go for the Money - JSR 354Go for the Money - JSR 354
Go for the Money - JSR 354Anatole Tresch
 

Mais de Anatole Tresch (15)

Jsr382: Konfiguration in Java
Jsr382: Konfiguration in JavaJsr382: Konfiguration in Java
Jsr382: Konfiguration in Java
 
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
 
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
 
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
 
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...
 
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
 

Último

Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 

Configure Your Projects with Apache Tamaya

  • 1. Anatole Tresch & Werner Keil Trivadis AG @atsticks @wernerkeil
  • 3. Anatole Tresch ● Principal Consultant, Trivadis AG (Switzerland) ● Star Spec Lead JSR 354 ● Technical Architect, Lead Engineer ● PPMC Member Apache Tamaya ● Twitter/Google+: @atsticks ● anatole@apache.org ● anatole.tresch@trivadis.com ● JUG Switzerland, Zurich Java Community 3 Bio
  • 4. Werner Keil ● Consultant – Coach ● Creative Cosmopolitan ● Open Source Evangelist ● Software Architect ● JCP EC Member ● Tamaya Committer ● Java EE | DevOps Guy … ● Twitter/Google+: @wernerkeil ● wkeil@apache.org 4 Bio
  • 5. Agenda 5 ● General Infos ● What is Configuration? ● Use Cases ● Apache Tamaya ● Core Concepts ● Extensions ● Outlook
  • 7. 7 ● 2012: Configuration was voted an important aspect for Java EE 8 ● 2013: ● Setup of Java EE Configuration JSR failed ● Standardization on SE Level did not have enough momentum ● BUT: ● Configuration is a crucial cross cutting concern ● There is no (really NO!) defacto standard ● Reinventing the wheel is daily business History of Apache Tamaya
  • 8. The People behind Tamaya 8 • John D. Ament (Mentor) • David Blevins (Champion) • Werner Keil • Gerhard Petracek (Mentor) • Mark Struberg (Mentor) • Anatole Tresch • Oliver B. Fischer • ... •
  • 9. The Objectives of Apache Tamaya 9 ● Define a common API for accessing configuration ● Minimalistic, also fits into ME ● Flexible, pluggable and extendible design ● support functional programming style ● Be compatible with Java 7 and beyond ● Provide a reference implementation ● Provide Extension Modules for Additional Features ● If possible, create a Standard! • •
  • 11. What people think is configuration? 11 ● Many different interested stakeholders ● Many things to configure ● Divergent views ● Setup for a server environment ● Parameters of a runtime (staging, localization etc.) ● Deployment descriptors ● Technology-specific components (beans, wirings etc.) ● Resource-specific settings (data sources, message queues etc.) ● Dynamic scripting facility, Different scopes (global, ear, app, …) ● Different granularities, varying levels of applicability, Different formats …
  • 12. What we think is configuration 12 Component X Component Y <dependency> Configuration <dependency> Components:  Behaviour and state  Transitive Deps  Scopes  Code  Dynamic  Not serializalbe Configuration:  Data, Value Types  Transitive Deps  Scopes  Key, value pairs  Static  Serializable
  • 14. UC: Access Configuration Similarly 14 Configuration API API MicroService Container IaaS PaaS Cache SaaS Build-Tool ● Any Location ● Any Format ● Any Policy SPI
  • 15. UC: Reduce Redundancy 15 Service Foo Cache Foo Configuration: Service.host.ip=192.168.1.10 Service.stage=test Service.param=paramValue Redundant! File 1 File 2 Tamaya Configuration Foo Configuration: Service.host.ip=${env:HOST_IP} Service.stage=${env:STAGE} Service.param=paramValue Cache Configuration: Cache.host.ip=192.168.1.10 Cache.stage=test Cache.param=cacheValue Tamaya Configuration Cache Configuration: Cache.host.ip=${env:HOST_IP} Cache.stage=${env:STAGE} Cache.param=cacheValue Tamaya Configuration Tamaya Configuration
  • 16. UC: Convention over Configuration 16 Foo Configuration: Service.host.ip=${cfg:env.host.ip} Service.stage=${cfg:env.stage} Service.param=paramValue Cache Configuration: Cache.host.ip=${cfg:env.host.ip} Cache.stage=${cfg:env.stage} Cache.param=cacheValue Defaults: env.host.ip=${env:HOST_IP} env.stage=${env:STAGE} Service Foo Cache Tamaya Configuration Tamaya Configuration
  • 17. UC: Pluggable Config Backends Classic: Tamaya Configuration 17 Distributed: ZooKeeper Etcd ... Classic Policy (PropertySources) Myproject/bin/... Myproject/conf/server.xml Myproject/conf/cluster.xml Myproject/conf/security.xml Myproject/lib/... ... Unified Config API Remote Policy (PropertySources) ??? Unified API for configuration access Policies can be provided as jar- artifacts separately Additional benefits: config documentation Your Project
  • 18. UC: Enterprise Integration 18 Company X: Config SOAP Myproject/bin/... Myproject/conf/server.xml Myproject/conf/cluster.xml Myproject/conf/security.xml Myproject/lib/... ... Company Z: Config Rest Company Y: etcd Company A: Legacy Config Tamaya Configuration Classic Policy (PropertySources) Unified Config API Config Integration (PropertySources) Your Project
  • 20. 20 ● Reinventing the wheel is daily business, leading to ● Higher Efforts in Enterprise Integration ● Configuration Redundancies and Inconsistencies ● Unclear or Complex Handling when remote Configuration should be supported as well ● Make Projects Integration Raedy with Company Infrastructure ● Make your Configuration Backends Pluggable Summary: Why we need Tamaya?
  • 22. Let's start simple! 22 ● Add dependency org.apache.tamaya:core:1.0-incubating ● Add Config to META-INF/javaconfiguration.properties ● Use it! Configuration config = ConfigurationProvider.getConfiguration(); String name = config.getOrDefault("name", "John"); int ChildNum = config.get("childNum", int.class);
  • 23. ConfigurationProvider 23 public class ConfigurationProvider{ public static Configuration getConfiguration(); public static ConfigurationContext getConfigurationContext(); public static ConfigurationContextBuilder getConfigurationContextBuilder() public static void setConfigurationContext( ConfigurationContext context); }
  • 24. 24 public interface Configuration{ String get(String key); String getOrDefault(String key, String defaultValue); <T> T get(String key, Class<T> type); <T> T get(String key, TypeLiteral<T> type); <T> T getOrDefault(String key, Class<T> type, T defaultValue); <T> T getOrDefault(String key, TypeLiteral<T> type, T defaultValue); Map<String,String> getProperties(); // Functional Extension Points Configuration with(ConfigOperator operator): <T> T query(ConfigQuery<T> query); } Configuration
  • 25. Core Concepts 25 ● Configuration provides properties ● built up by an ordered list of PropertySources ● SPI ● PropertyConverter ● CombinationPolicy ● PropertyFilter ● Extensions (discussed later) ConfigurationContext PropertyFilters PropertySource PropertySource PropertySource PropertySource Configuration CombinationPolicy PropertyProviders <provides> PropertyConverter
  • 26. Overriding Basics 26 #default ordinal = 0 name=Benjamin childNum=0 family=Tresch #override ordinal tamaya.ordinal=10 name=Anatole childNum=3 tamaya.ordinal=10 name=Anatole childNum=3 family=Tresch
  • 28. SPI: PropertySource PropertySourceProvider public interface PropertySource { static final String TAMAYA_ORDINAL = "tamaya.ordinal"; String getName(); int getOrdinal(); String get(String key); Map<String, String> getProperties(); } public interface PropertySourceProvider { Collection<PropertySource> getPropertySources(); }
  • 30. Available Plugins 30 •Tamaya-inject: Configuration Injection and Templates •Tamaya-resolver: Expression resolution, placeholders, dynamic values •Tamaya-resources: Ant styled resource resolution •Tamaya-format: Abstraction of a format, separating parsing from semantic mapping to configuration •Format Extensions: yaml*, json, ini, ... •Tamaya-spring: Integration with Spring •Tamaya-classloader-support: Managing Tamaya Services within Classloading Hierarchies •Tamaya-cdi: Integration with CDI •Tamaya-server: REST/JSON Configuration Server •Tamaya-remote: Client PropertySource matching server component •Tamaya-docs*: Configuration Documentation * work in progress
  • 31. Planned Features 31 ● Java EE: Configuring EE, where possible ● Karaf Integration ● Source Integrations: ● Commons-config ● Etcd ● Zookeeper ● ... ● Runtime Integrations: ● ???
  • 32. Configuration Injection 32 @ConfiguredType(defaultSections=”com.mycomp.tenantAdress”) public final class MyTenant{ private String name; @ConfiguredProperty @DefaultValue(”2000”) private long customerId; @ConfiguredProperty(keys={ ”privateAddress”,”businessAdress”,”[my.qualified.adress]” }) private String address; ... } MyTenant t = new MyTenant(); ConfigurationInjection .getConfigurationInjector() .configure(t); MyTenant t = new MyTenant(); ConfigurationInjection .getConfigurationInjector() .configure(t); @RequestScoped public class MyClass{ @Inject private MyTenant t; … } @RequestScoped public class MyClass{ @Inject private MyTenant t; … }
  • 33. Configuration Template 33 @ConfiguredType(defaultSections=”com.mycomp.tenantAdress”) public interface MyTenant{ public String getName(); @ConfiguredProperty @DefaultValue(”2000”) public long getCustomerId(); @ConfiguredProperty(keys={ ”privateAddress”,”businessAdress”,”[my.qualified.adress]” }) public String getAddress(); } MyTenant t = ConfigurationInjection .getConfigurationInjector() .createTemplate(MyTenant.class); MyTenant t = ConfigurationInjection .getConfigurationInjector() .createTemplate(MyTenant.class);
  • 35. Summary 35 Apache Tamaya Provides • A Complete API based on Java SE 7, compatible with SE 6 • String key/value based thread-safe Configuration Model • Support for Type-Safe Configuration Value Conversion • Functional extension points • Simple Filtering and Overrides • Small footprint • Extendible with plugins
  • 36. We need help 36 Apache Tamaya is great, but we need you... • … using it! • … asking for features! • … envangelizing it! • … loving it! • … extending it! • ...
  • 37. Links ● Twitter: @tamayaconfig ● Blog: http://javaeeconfig.blogspot.com ● Presentation by Mike Keith on JavaOne 2013: https://oracleus.activeevents.com/2013/connect/sessionDetail.ww?SESSION_ID=7755 ● Apache Deltaspike: http://deltaspike.apache.org ● Java Config Builder: https://github.com/TNG/config-builder ● Apache Commons Configuration: http://commons.apache.org/proper/commons-configuration/ ● Jfig: http://jfig.sourceforge.net/ ● Carbon Configuration: http://carbon.sourceforge.net/modules/core/docs/config/Usage.html ● Comparison on Carbon and Others: http://www.mail-archive.com/commons-dev@jakarta.apache.org/msg37597.html ● Spring Framework: http://projects.spring.io/spring-framework/ ● Owner: http://owner.aeonbits.org/ 37
  • 38. Q&A 38 Thank you! Anatole Tresch Trivadis AG Principal Consultant Twitter/Google+: @atsticks anatole@apache.org anatole.tresch@trivadis.com