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.

Tagged With: MicroGoals

Micro-goals – Small scripts I want to run

Introduction

While developing my dsbox idea i’ve considered building on existing technologies but none of them provided exactly what i wanted. In considering what those technologies lacked, it helped shape something i hope to build, which i am calling Micro-goals

Technologies that didn’t offer what I wanted

  • Linux cronjobs
  • Yarn map reduce jobs
  • Microservices

What I intend for DsBox Micro-goals

Micro-goals will consist of the following criteria

  • when to run – the time window ( which may recur )
  • where to run – based on hw & resources
  • how many instances to run where  1 <= n

dsbox instances will be stopped and started, there will be no permanent leader/master, nodes will use consensus like protocols to agree what runs where. I hope to make this a hive setup with a shared set of goals that are small micro sized.

Categories: HomeAutomation | Tags: , , | Leave a comment

Software layers in dsbox and building a maintainable system

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.

Categories: HomeAutomation | Tags: , , | Leave a comment