Giter VIP home page Giter VIP logo

runtime's Introduction

runtime

COSI Runtime contains core resource (state) and controller (operator) engine to build operating systems.

Design

Resources

A resource is a metadata plus opaque spec. Metadata structure is strictly defined, while a spec is transparent to the runtime. Metadata defines an address of the resource: (namespace, type, id, version) and additional fields (finalizers, owner, etc.)

Controllers

A controller is a task that runs as a single thread of execution. A controller has defined input and outputs. Outputs are static and should be defined at the registration time, while inputs are dynamic and might change during controller execution.

A controller is supposed to implement a reconcile loop: for each reconcile event (coming from the runtime) the controller wakes up, checks the inputs, performs any actions and modifies the outputs.

Controller inputs are resources which controller can read (it can't read resources that are not declared as inputs), and inputs are the resources controller gets notified about changes:

  • strong inputs are the inputs controller depends on in a strong way: it has to be notified when inputs are going to be destroyed via finalizer mechanism;
  • weak inputs are the inputs controller watches, but it doesn't have to do any cleanup when weak inputs are being destroyed.

A controller can modify finalizers of strong controller inputs; any other modifications to the inputs are not permitted.

Controller outputs are resources which controller can write (create, destroy, update):

  • exclusive outputs are managed by only a single controller; no other controller can modify exclusive resources
  • shared outputs are resources that are created by multiple controllers, but each specific resource can only be modified by a controller which created that resource

Runtime verifies that only one controller has exclusive access to the resource.

Principles

  • simple and structured: impose structure to make things simple.
  • avoid conflicts by design: resources don't have multiple entities which can modify them.
  • use controller structure as documentation: graph of dependencies between controllers and resources documents system design and current state.

runtime's People

Contributors

smira avatar dependabot[bot] avatar unix4ever avatar dmitriymv avatar andrewrynhard avatar aleksi avatar

Watchers

 avatar

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.