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
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • When Configuration Management Becomes an Operational Liability
  • 6 Techniques To Reduce LLM API Costs With the Python Library
  • Security Is a Platform Property, Not a Pipeline Step
  • An XGBoost Property Valuation Postmortem: Leakage, Overfitting, and SHAP Surprises

Trending

  • How to Migrate From C/C++ to Rust: A Practical Guide for Embedded IoT Systems
  • Why AI Agents Need a Shared Enterprise Ontology
  • Running a Self-Hosted WAF in Production: Practical Lessons From SafeLine
  • Adding Graph Retrieval to a RAG Pipeline With Python

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  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
·
Oct. 15, 16 · Opinion
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
5.6K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

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

  • When Configuration Management Becomes an Operational Liability
  • 6 Techniques To Reduce LLM API Costs With the Python Library
  • Security Is a Platform Property, Not a Pipeline Step
  • An XGBoost Property Valuation Postmortem: Leakage, Overfitting, and SHAP Surprises

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

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 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook