browser icon
You are using an insecure version of your web browser. Please update your browser!
Using an outdated browser makes your computer unsafe. For a safer, faster, more enjoyable user experience, please update your browser today or try a newer browser.

Software layers in dsbox and building a maintainable system

Posted by on December 3, 2016

Introduction

The easy bit with software is writing it. Maintaining and upgrading software is hard but also the most important part .  One trick used in software design is to use layers where each layer focuses on specific functionality. Each layer has a well defined set of dependency and assumptions on the layer above/below. Well designed layers allow independent maintenance and upgrades. Different software languages and threading models suit different layers.

The Software Layers

The layers I have plan to use in dsbox are

  1. Base operating system layer. DsBox currently runs on Raspberian Jessie.
  2. The management layer is a java process called dsboxcore which
    • Uses Upnp to discover other instances and to be visible from local desktops
    • Exposes a http (jetty) web interfaces for management
    • Coordinates with its peer dsbox units to maintain a replicated file space.
    • Provide a  distributed reliable micro-goal scheduler. Think of this as a cross between lambda functions and a cron daemon.
  3. The utility layer
    • c++ io modules to wrap hardware interactions into utility scripts
  4. The logic layer
    1. Initially simple python scripts with “if this then that” logic
    2. In the distant future smarter “learning” systems to predict what i want and respond to voice requests

The natural world

In a sense this models natural world. The base layer is the physical body. The second layer is the nervous system. Complex but atomic actions like breathing and seeing are the third layer. The final layer is the brain and reasoning.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.