Rigel for Developers

Remiges Rigel is an open source product which runs on servers and maintains a central repository of configuration variables and their values. Rigel runs only on Linux, and uses the Linux etcd system to maintain a replicated database of these values. The full source code can be downloaded from Github: see here, here and here.

This blog carries technical articles to help developers learn about the nitty-gritty and integrate Rigel into their applications.


What is Remiges Rigel?

Remiges Rigel is an open source product which is very useful for large enterprise business applications. Any large business application has some semi-constant configuration parameters, and which are expected to change without requiring any code change or build-test-deploy cycle. In the 20th century, such parameters were kept in configuration files, like Java property files. Rigel is very valuable for maintaining such configuration parameters. For instance, the number of days of gap after which pending transactions are to be expired, the number of bank accounts each investor can register for investment processing, the name of the directory in which video files and image files are to be stored, etc, are such configurable parameters. Changing the value of such a parameter must not force the application team to execute a fresh release of the application code.

Rigel is written in Go and uses the Linux etcd system for its data store. Etcd is an excellent, light distributed data store for storing a few hundred data items across multiple servers. It has features which no relational database can deliver easily, like watchers which wake up when a value is changed.

The Rigel client library, available in Java and Go, runs in the address space of the business application, and connects directly to the etcd data store. There is no separate Rigel server which intermediates between the client library and the etcd data store.

This client library can register watchers which will wake up as soon as a data value is changed, and pull out the latest values and cache them locally. This is useful for application stacks which run 24×7 for months without restarting. This is vitally important to switch on debugging of a production system without restarting anything. If the debug log level is a Rigel configuration parameter, then an administrator can change the log level using the Rigel UI, and all instances of the application which are active on the cluster will all immediately switch on or switch off debug logging. No application restart is needed; the delay too is of the order of a few seconds.

The client library pulls out all parameter names and values from the data store with one operation and caches them in its memory, thus reducing accesses to etcd. Rigel has a UI which can be used to edit values of configuration parameters at runtime. This UI applies its knowledge of the data schema on the values entered, and enforces type safety on the values. A parameter which is supposed to hold an integer will not be permitted to store a boolean, for instance.

Rigel gains from the power of etcd, which can handle network partitioning or the loss of a leader. It automatically elects a new leader to keep the show going.

Any Java Springboot programmer who is building a business application can integrate Rigel into his application.