Code Examples
A repository of 155 code examples for BeepBeep
Main Page
+
Packages
Packages
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
e
g
h
i
m
n
r
t
v
w
+
Functions
a
g
m
r
t
v
Variables
+
Files
File List
package-info.java
1
/*
2
BeepBeep, an event stream processor
3
Copyright (C) 2008-2017 Sylvain Hallé
4
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU Lesser General Public License as published
7
by the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU Lesser General Public License for more details.
14
15
You should have received a copy of the GNU Lesser General Public License
16
along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
/**
20
* Send events from one processor to another over a network.
21
* <p>
22
* Thus, a chain of processors can be setup on a first machine, whose output
23
* is then relayed to a chain of processors on another machine. This has for
24
* effect of <em>distributing</em> the computation of a processor chain
25
* across multiple hosts.
26
* <p>
27
* There are multiple reasons why one would like to distribute computation.
28
* <ul>
29
* <li>One machine is made of sensors and has little computing power by
30
* itself; it performs basic processing on its events, and relays the rest
31
* to another machine to continue the bulk of the computation.</li>
32
* <li>Since the communication between the machines is asynchronous, they
33
* essentially perform their parts of the computation at the same time.
34
* Distributing a processor chain across machines is a cheap way to achieve
35
* parallelism.</li>
36
* <li>If many parts of a processor chain are memory-intensive, separating
37
* them on different machines gives each of them more memory.</li>
38
* </ul>
39
* <p>
40
* In BeepBeep, splitting a processor chain across machines is generally done
41
* by combining two palettes:
42
* <ul>
43
* <li>The <strong>Serialization</strong> palette takes care of transforming
44
* arbitrary Java objects (i.e. events) into character strings (for transmission
45
* over a network) and back</li>
46
* <li>The <strong>Http</strong> palette is responsible for sending and
47
* listening to HTTP requests at specific URLs; its processors take care of
48
* actually transmitting character strings between two processors over a
49
* network</li>
50
* </ul>
51
* <h3>What's in this package</h3>
52
* <p>
53
* The examples in this section show a simple form of distribution where two
54
* machines (called A and B) communicate across a network. Machine A is the
55
* <em>upstream</em> machine, and executes the first part of a processor
56
* chain; Machine B is the <em>downstream</em> machine, and receives events
57
* from Machine A to continue the computation with further processors.
58
*
59
* @author Sylvain Hallé
60
*
61
*/
62
package
network;
Source
src
network
package-info.java
Generated by
1.8.13