KnoRBA

For The Future of IoT and Cloud Computing

Hello World

This program is available in ARE distribution at demo/Hello.kap.

Chat

This program is available in ARE distribution at demo/Chat.kap.

PingPong

In the following demo, agents are distributed between 4 nodes. Each agent selects another one in random and sends a number to it. The number will be incremented by one and sent to the next random agent. This program is available in ARE distribution at demo/PingPong.kap

Slow:

Fast:

Phased (Barrier Synchronization)

Phaser protocol is used in the following demo to synchronize 4 agents distributed across 4 nodes. Each agent sleeps for a random amount of time before calling the Phaser protocol for synchronization:

      System::sleep(WAIT/2 + rand()%WAIT/2);
      _pPhaser.synchronize();
      _pConsole.print(_lyrics->at(i, rec)->getString());
    

This demo is available in ARE distribution as demo/Phased.kap.

In the following, the SingInSyncAgent which is producing the text output above is connected to TextUiAgent rather than Kernel's ConsoleAgent. TextUiAgent also comforms to ConsoleProtocol, therefore no change in the code for SingInSyncAgent was necessary.