Code Monkey home page Code Monkey logo

configurationmanager's Introduction

LabVIEW Open Source Project

ConfigurationManager

The ConfigurationManager project is aimed at providing the backbone for framework-agnostic configuration management. Developers can override data source, provide their own serialization/deserialization algorithms, encoding or encryption. It is meant to be used as an injectable configuration management tool where the developer chooses at runtime what is the configuration supported, thus allowing unit testing with dependency-injected configuration states, while accessing configuration from remote locations or local file in a production context.

This library proposes an abstract ConfigManager class and supplements it with a Cache ConfigManager (provides in-memory support) and a Collection ConfigManager (which aggregates an array of ConfigManagers). The CacheManager is a singleton in any given application instance (context). When merging managers into a Collection (or merging collections into a single one), the Cache managers are kept as a singleton. The Cache manager cannot be distributed over a network or shared in multiple application instances on the same machine. A distributed cache manager would be a specific type of manager that the developer can instantiate (it would act as a normal Config Manager).

Examples of Configuration Managers could be CfgManager.INI, CfgManager.mySQL, CfgManager.XML, etc.

During "Read" operations, the Collection of ConfigManagers is scanned until all elements have been found. If all elements are found in the first manager, it will not continue searching the other managers. Cache manager is always the last, unless the node specifies that it should be used preferably. On a successful read, the Cache manager is updated (Write) with the latest value.

During "Write" operations, the elements will be written in the first manager of the Collection, and Cache will be updated.

Serialization

Encoding

Encryption

Source

Use LabVIEW 2013 SP1 to contribute to this repository. Configuration Manager will be maintained for LV 2013 and later versions for as long as features permit. If you are developing in more recent versions of LabVIEW, your contributions will not make it to master branch.

Package Build Steps

To release packages in this project, please follow the convention below:

Package Build Specs

Always include dependencies in the package configuration (vipc file) so that the package can be installed without further downloads. If the package dependencies become too voluminous over time, we can review this requirement. This requirement can be relaxed provided that the package dependencies are available on the LabVIEW Tool Network or a universally-accessible repository such as the JKI Package Network.

configurationmanager's People

Contributors

francois-normandin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

configurationmanager's Issues

"All Found" and "Any Found" is always true

The Read and Read (Variant) methods always return Found All = true, which is wrong.
The inner method for KVP incorrectly assumes that the list of inputs have all been found even when populated with default values.

CfgManager.Text Process

  • Process will terminate if caller goes idle.
  • Process will be message-based to ensure atomic operations are not prone to race conditions.
  • Process will manage Write-to-disk operations based on configured "write delay"

CfgManager.Text to support Read-Only option

  • If RO = true, disallow modification of values.
  • During object creation, validate the file permissions.
  • If file is Read-Only and Write Access is requested, should throw warning and set the object to Read-Only.
  • If Read permission is denied, throw an error.

Add Public Events to CfgManager.Text

Public Events for:

  • error (return error cluster)
  • values modified (return list of modified keys)
  • modifications made persistent (return list of keys persistent)
  • process stopped (return boolean)

Create UI Utility Class to visualize the CfgManager data.

  • Simplest implementation is to display the list of Key Value Pairs.
  • More intelligent implementation is to investigate the file or database on-demand when a "section" is requested for display (do not make calls without user needing to see the actual data.)

Read and Write from Variant

Extend the public API to write from Variant which automatically generate Key Value Pairs, or read from Variant which automatically format Key Value Pairs into the input datatype

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.