Giter VIP home page Giter VIP logo

calvin-constrained's Introduction

calvin-constrained

calvin-constrained is a C based implementation of Calvin, https://github.com/EricssonResearch/calvin-base, targeting devices with constraints on memory, processing power and power consumption.

All functionality included in the standard Calvin implementation is not feasible to include on a constrained device and a standard Calvin runtime is used to offload functionality to:

  • Route data to and from the constrained runtime
  • Access the shared key/value store
  • Deploy and redeploy applications

The constrained runtime finds a Calvin runtime to offload functionality by using a discovery mechanism or a predefined list of runtime URIs.

The state of the implementation is experimental and it goes without saying that it should not be used in production in its current state, but it does provide an excellent starting point for further experimentation.

Setup

Clone the constrained runtime repository with the recursive flag to include used third party modules:

git clone --recursive https://github.com/EricssonResearch/calvin-constrained.git

And follow the platform specific instructions in the runtime/south/platform/X/README.md to build and start the runtime.

Runtime ports

Calvin-constrained is designed to be portable across different architectures and can execute on anything from bare metal to on top of an operating system.

The platform specific parts, such as initializing the platform and accessing hardware resources, are isolated from the core functionality. Runtime ports and instructions on how to create a new port are placed in the runtime/south/platform folder.

Transport clients

Transport clients handles the communication with the Calvin runtime acting as a proxy to offload functionality. The constrained runtime can support and use multiple transport clients but only one is active handling the link to the runtime acting as a proxy for the constrained runtime.

Implementations and instructions on how to create new transport clients are available in the runtime/south/transport folder.

Security

TLS can be enabled for all transport clients, the runtime/south/crypto folder contains instructions to enable it.

Actors

The calvin-constrained runtime supports actors written:

  • C, the actors folder holds existing actors and instructions on how to write and add new actors
  • Python, the libmpy folder holds existing actors and instructions on how to add new actors

Build flags

  • CC_TRANSPORT_X, enables transport X.
  • CC_DEBUG, enables debug logs.
  • CC_DEEPSLEEP_ENABLED, enables and enters platform deep sleep for CC_SLEEP_TIME seconds after CC_INACTIVITY_TIMEOUT seconds of inactivity.
  • CC_STORAGE_ENABLED, enables serialization and deserialization of the runtime state to and from nonvolatile memory.
  • CC_RUNTIME_STATE_BUFFER_SIZE, size of the buffer used to read and write serialized runtime state.
  • CC_STATE_CHECKPOINTING, enables serialization of the runtime state to nonvolatile memory on every state change.
  • CC_TLS_ENABLED, enables TLS for all transport clients.
  • CC_PYTHON_ENABLED, enables support for Python actors.
  • CC_PYTHON_HEAP_SIZE, set heap size used by MicroPython.
  • CC_GETOPT_ENABLED, enables runtime command line options when started using main.c.

calvin-constrained's People

Contributors

fswensson avatar alexandernajafi avatar

Watchers

Ola Angelsmark 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.