Child pages
  • Zookeeper lock server for the autonomous components

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


batch lock = "/"+runnable.getComponentName() + "/B" + batch.getBatchID() + "-RT" + batch.getRoundTripNumber();


An autonomous components will be able to "poll" the Summa Batch Object Index for events that have happened. The component will know which events should have occurred for a batch before I can start processing the batch. Also which events should have occurred and failed, and which events should not have occurred. The component also needs to know which batches it is currently working on itself. This is what the zookeeper tracks the locks for.

Autonomous component locking procedure 1


If the robot finds that a batch is ready to work on, it starts working on this batch. The robot will not poll for more work while working.

Some of the robots will be able to multitask, and others will not. Multitasking is done in a slightly different way for robots than for humans. The multitasking robot will build a new little non-multitasking robot child, give him the batch to work on, and then go back to sleep. Next time it polls for work, it will have to remember not the start work on batches that already have been assigned to any of the robots children. This also means that there must only ever be one instance of each type of multitasking robot running.

When a robot have finished work on a batch, it must record this, so the assembly line can move forward. It records the event Batch Object, stored in the Digital Object Management System, DOMS, system, in the form of an event somewhat like "I, <ROBOT>, did this <THIS WORK> on batch <ID> with <THIS RESULT>". The SBOI will then periodically (often) query DOMS for updates to the Batch objects. When the SBOI discover a batch object update, it updates the index, so that robots further along the assembly line can work on the batch.

An autonomous component here needs the logic for multitasking. If we assume there is only one component A running on one server, this is straight forward (and re-usable). This assumption still allows a component to send internal jobs to different servers (e.g.. Hadoop jobs)...