Git Product home page Git Product logo

timmattison / aws-greengrass-nucleus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-greengrass/aws-greengrass-nucleus

0.0 2.0 0.0 7.1 MB

The Greengrass nucleus component provides functionality for device side orchestration of deployments and lifecycle management for execution of Greengrass components and applications. This includes features such as starting, stopping, and monitoring execution of components and apps, interprocess communication server for communication between components, component installation and configuration management.

License: Apache License 2.0

Java 99.77% Shell 0.08% Batchfile 0.12% Gherkin 0.03%

aws-greengrass-nucleus's Introduction

Greengrass Nucleus

Java CI

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

The Greengrass nucleus component provides functionality for device side orchestration of deployments and lifecycle management for execution of Greengrass components and applications. This includes features such as starting, stopping, and monitoring execution of components and apps, interprocess communication server for communication between components, component installation and configuration management. It manages the model that describes the software running on the device. The model is a dependency graph of services. Services have three primary aspects:

  • Configuration
  • Dependencies on other services
  • A set of lifecycle phases in the form of a finite state machine.

A service may have processes, threads, code, network connections, ... But not necessarily. Some have all of these, some have only one.

You can think of the nucleus as a mash-up of make, a super-lightweight publish/subscribe system, and a small hierarchic key-value data store. The various services have continuously varying states that the nucleus monitors and manages. A dependent service is not started until it's dependencies are started, and if they become unstable, the dependent service is notified. The internal interconnections are handled via dependency injection. Restarts are managed automatically.

When configuration changes, all users of them are notified. Everything adapts continuously.

A quick tour through com.aws.greengrass

  1. config Manages the system configuration (model). It's fundamentally a hierarchic key-value store with timestamps. It can be serialized to/from yaml, json, or a transaction log. The transaction log can be replayed to reconstruct the config, or streamed live to another process to maintain a mirror. The terminology is borrowed from the world of publish/subscribe systems. Config values can have validators and watcher.
  2. dependency The dependency injection framework. The meat is in context.java which contains a Map of known objects, and the ability to get (and magically create) objects from the Context. When an object is created by the framework, it does dependency injection. If the created object participates in the Lifecycle framework, its lifecycle is initiated. This feeds the Lifecycle dependency graph.
  3. lifecyclemanager Ties the model to Lifecycle objects in the dependency graph. The primary class is GreengrassService, which contains most of the state transition logic. GenericExternalService is a subclass that implements a service whose behavior is defined by commands and scripts. Either of these classes may be subclassed to provide services whose behavior is defined by code running within Greengrass.
  4. util A grab-bag of useful utilities.

Learn more

  1. Greengrass Nucleus Configuration Schema
  2. Data Model - Component Recipe
  3. Configure a component

aws-greengrass-nucleus's People

Contributors

abanthiy avatar avipinku avatar awszztt avatar chaurah avatar fahadmohammed01 avatar fengwang666 avatar fufranci avatar hui-yang avatar j-c-l avatar jamesgosling avatar jamiehunter avatar jbutler avatar jpeddicord avatar junfuchen99 avatar k-khatri avatar leaf94 avatar mikedombo avatar nikkhilmuthye avatar nikorin avatar popanmol avatar prateek-y avatar rbattle avatar saranyailla avatar scb01 avatar shaguptashaikh avatar shirleyzheng92 avatar tilo-chen avatar tomnagy-aws avatar wikimonkey avatar youtuyy avatar

Watchers

 avatar  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.