NAME

OurNet::Cell - Interface-based RPC with relay & locating

SYNOPSIS

#!/usr/bin/perl -w

use OurNet::Cell;

$OurNet::Cell::Debug = 1;

my $daemon = OurNet::Cell->new('Daemon', 1);
$daemon->daemonize();

my $storage = OurNet::Cell->new('Storage', 1);

$storage->hook('READ.DATA', sub {$_[0]->unicast($_[1], 'WRITE.DATA',
                                 $_[2], $_[0]->{'var'}{$_[1]}{$_[2]})});
$storage->hook('WRITE.DATA', sub {$_[0]->{'var'}{$_[1]}{$_[2]} = $_[3]});
$storage->contact(undef, 'localhost') or die;

my $fetch = OurNet::Cell->new('Fetch', 1);
$fetch->hook('WRITE.DATA', sub {print "\n$_[2] is $_[3].\n"});
$fetch->contact(undef, 'localhost') or die;
$remote = 'Storage';
$fetch->contact($remote) or die;
$fetch->unicast($remote, 'WRITE.DATA', 'Test', 'successful');
RunCells 1;
$fetch->unicast($remote, 'READ.DATA', 'Test');
RunCells 1;

EndCells;

DESCRIPTION

OurNet::Cell provides a cross-platform, socket-based approach to built a real-time, state-based, free-form inter-net information-sharing object-model. (please-insert random-hype right-here).

Prior to v0.1, this is highly experimental and unstable. Comments are intentionally lacking -- you shouldn't bother with this module unless you're 1) interested in concurrent mobile agent development, 2) a perl guru, and 3) having a lot of time to spare.

TODO

Cross-protocol support

UDP and HTTP support (at least) should be in contact() and daemonize().

Multicast

A multicast routing algorithm is under testing.

Findhook and Installhook

These two are crucial to its emulation to true 'cell' behaviour.

Spawn

Spawning-on-demanded is expected to function well, but need closer inspection as to how it affects smart load-balancing.

AUTHORS

Autrijus Tang <autrijus@autrijus.org>

COPYRIGHT

Copyright 2001 by Autrijus Tang <autrijus@autrijus.org>.

All rights reserved. You can redistribute and/or modify this module under the same terms as Perl itself.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 529:

You forgot a '=back' before '=head1'