DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

SBOMs are essential to circumventing software supply chain attacks, and they provide visibility into various software components.

Related

  • Comprehensive Guide to Property-Based Testing in Go: Principles and Implementation
  • While Performing Dependency Selection, I Avoid the Loss Of Sleep From Node.js Libraries' Dangers
  • Understanding ldd: The Linux Dynamic Dependency Explorer
  • Practical Use of Weak Symbols

Trending

  • Modernizing Apache Spark Applications With GenAI: Migrating From Java to Scala
  • Load Testing Essentials for High-Traffic Applications
  • Advancing DSLs in the Age of GenAI
  • Top 5 Trends in Big Data Quality and Governance in 2025
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. Library for Configuration Management From Netflix

Library for Configuration Management From Netflix

Archaius is the library that is used by all of the Netflix OSS components for configuration, and it is an extension of the Apache Commons Configuration project.

By 
Rafael Salerno user avatar
Rafael Salerno
·
Oct. 15, 16 · Opinion
Likes (3)
Comment
Save
Tweet
Share
5.2K Views

Join the DZone community and get the full member experience.

Join For Free

Archaius is the Netflix client side configuration library. It is the library that is used by all of the Netflix OSS components for configuration, and it is an extension of the Apache Commons Configuration project. It also allows updates to configure by either polling a source for changes or allowing for a source to push changes to the client. Additionally, Archaius uses Dynamic Property classes as handles to properties.

Some Archaius features include the following: 

  • Dynamic, typed properties.
  • High throughput and threadsafe configuration operations.
  • A polling framework that allows for the obtainment property changes of a configuration source.
  • A callback mechanism that gets invoked on effective.
  • A JMX MBean that can be accessed via JConsole to inspect and invoke operations on properties.
  • Out of the box, composite configurations for applications.
  • Implementations of dynamic configuration sources for URLs, JDBC and Amazon DynamoDB.
  • Scala dynamic property wrappers.

In my sample, I will be showing you how to use the Dynamic Properties and how it is able to be used Archaius with configuration with many environments.

About ArchaiusSandBox class:

  • Set default configuration with property archaius.properties.
  • InstallConfig is a method that apply the config, with polling to each one second.
  • In a set environment, we will get value from "environment" variable, we expected in this case DEV or TEST
  • In the main method, we call the configuration to get "myprop".
    • It is possible to put default configuration to property. I defined "NOT FOUND", but it is possible put any value.
    • Wait 10 seconds to put the new configuration and call again.

Resources folder. There are three properties:

  1. archaius.properties is the default configuration with  reference to configuration available per environment.

  2. archaius-dev.properties configuration specific to DEV.
  3. archaius-test configuration specific to TEST.

In runtime, it is possible to change property. Work in this sample should be added on archaius.properties (within 10 seconds) to the property myprop=TEST-VALUE. After 10 seconds, put in the main method. It should print the new value.

In this post, I used some Archaius functionalities. There are many others also available, but with these few codes, it is possible to create a configuration to many environments with the possibility to change in the runtime.

Here is my sample.

Configuration management Library Property (programming)

Opinions expressed by DZone contributors are their own.

Related

  • Comprehensive Guide to Property-Based Testing in Go: Principles and Implementation
  • While Performing Dependency Selection, I Avoid the Loss Of Sleep From Node.js Libraries' Dangers
  • Understanding ldd: The Linux Dynamic Dependency Explorer
  • Practical Use of Weak Symbols

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • [email protected]

Let's be friends: