Liberty-IoT-OS

Liberty-IoT-OS is the operating system designed for Internet of Things (IoT). Liberty-IoT-OS runs on Liberty IoT Hub.

Our patented technology Liberty App Engine is a Virtual Machine running on Liberty-IoT-OS.

We currently use a LuaJIT virtual machine as App Engine.

Event Model

Unlike the “asynchronous callback” model used in node.js, where the code registers callback functions for certain event, Liberty-IoT-OS uses pure event-driven model.

  • Code subscribe to events on difference objects (Device, I/O etc)
  • The the code wait for events (with optional timeout)
  • If any subscribed event happened
    • The wait call (Libre_Wait) will return
    • Code get event object and process the event

“asynchronous callback” can be easily emulated with out event model, but the reverse is not true.

Concurrency Model

Liberty App Engine employs cooperative multi-tasking model, in which multiple “threads” can run concurrently, but at any given time only one thread is running (taking CPU).

Thread has to voluntarily give up CPU to other threads, by calling Libre_Wait() API.

So if a thread is working on some time concuming calculation, it shall put “Libre_Wait(0)” in some loop to give up CPU periodically in order to play nice with other tasks.

If a thread is running for longer than 5 seconds with calling Libre_Wait, the App Engine will terminate the task and flag it as “defective”.

For details please chapter “Event and Concurrency Model”.

Programming Model

Liberty-IoT-OS is a functionally complete OS for developing IoT applications on Liberty IoT Hub.

Liberty App Engine offers a list of API developer can use.

  • Device Access API, device read (get state) and write (control).
  • Network I/O API
    • TCP/UDP
    • HTTP and HTTPS
    • SSL/TLS
  • Data API
    • Time series data access model
    • Standalone data access model
    • Data schema
  • Event API
    • Device and Virtual Device events
    • Network I/O events
  • Auxiliary API

For more information, please read following chapters.