Code Examples
A repository of 155 code examples for BeepBeep
Package network

Send events from one processor to another over a network. More...

Packages

package  httppush
 Use HTTP gateways in push mode.
 

Classes

class  CompoundObject
 A dummy object used to show serialization. More...
 

Detailed Description

Send events from one processor to another over a network.

Thus, a chain of processors can be setup on a first machine, whose output is then relayed to a chain of processors on another machine. This has for effect of distributing the computation of a processor chain across multiple hosts.

There are multiple reasons why one would like to distribute computation.

  • One machine is made of sensors and has little computing power by itself; it performs basic processing on its events, and relays the rest to another machine to continue the bulk of the computation.
  • Since the communication between the machines is asynchronous, they essentially perform their parts of the computation at the same time. Distributing a processor chain across machines is a cheap way to achieve parallelism.
  • If many parts of a processor chain are memory-intensive, separating them on different machines gives each of them more memory.

In BeepBeep, splitting a processor chain across machines is generally done by combining two palettes:

  • The Serialization palette takes care of transforming arbitrary Java objects (i.e. events) into character strings (for transmission over a network) and back
  • The Http palette is responsible for sending and listening to HTTP requests at specific URLs; its processors take care of actually transmitting character strings between two processors over a network

What's in this package

The examples in this section show a simple form of distribution where two machines (called A and B) communicate across a network. Machine A is the upstream machine, and executes the first part of a processor chain; Machine B is the downstream machine, and receives events from Machine A to continue the computation with further processors.

Author
Sylvain Hallé