Sample Applications

We have written a few sample applications for the BonAHA project in order to demostrate the strength as well as use of BonAHA. Some of the sample applications are simple applications, but some are research project applications that can be used in the real world.

Location Finder

A simple command-line application, this is the simplest of the BonAHA demos. The location finder application does only the following:

  1. Registers a service named _7ds_location._tcp
  2. Sets two properties for this service, called "Latitude" and "Longitude"
  3. Sets a listener to listen for network events corresponding to this service
  4. Handles node updates, entry and exit. Upon node entry/update, it updates its internal location, and upon node exit, it just displays an error message.

Tic Tac Toe

This is a simple implementation of the Tic Tac Toe game. This is not a "complete" implementation, in that, players can overwrite each other's locations and there is no check for win/loss.

However, it does demonstrate how easy it is to write a networked game using the BonAHA framework.

The Tic Tac Toe application works as follows:

  1. Registers a Tic Tac Toe game service
  2. Sets its properties, which is basically the moves the player makes
  3. As each player makes a move, the properties of the player's service is updated and an event is triggered on the network.
  4. All other players receive this event and update the locations and the GUI that the user interacts with.

Other applications

These are the other applications that we have developed for the BonAHA framework as part of our 7DS applications (which was the original motivation for the BonAHA project). More documentation about these projects will either come soon, or be put up on the 7DS website.

The code for these projects can be checked out from the BonAHA CVS repository.

  • 7DS BBS: A simple bulletin-board-like system, this enables users to write quick notes about events or other activities, which can then be shared with other users.
  • 7DS file synchronization: Allows automatic synchronization of shared files among all users in the network. The synchronization announcements and updates are done using BonAHA, and the synchronization uses a scheme called delta-compression (and the Java rsync library, which introduced this concept) to speed up synchronization.