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
Please enter at least three characters to search
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

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

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

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

  • SaaS in an Enterprise - An Implementation Roadmap
  • Go 1.24+ Native FIPS Support for Easier Compliance
  • ITBench, Part 1: Next-Gen Benchmarking for IT Automation Evaluation
  • The Perfection Trap: Rethinking Parkinson's Law for Modern Engineering Teams
  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
Oops! Something Went Wrong

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
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!