AC::Yenta - eventually-consistent distributed key/value data store. et al.
use AC::Yenta::D; use strict; my $y = AC::Yenta::D->new( ); $y->daemon( $configfile, { argv => \@ARGV, foreground => $OPT{f}, debugall => $OPT{d}, port => $OPT{p}, } ); exit;
Copy + Paste from the example code into your own code. Copy + Paste from the example config into your own config. Send in bug report.
Kibitz - Gossip. Casual information exchange with ones peers. Yenta - 1. An old woman who kibitzes with other yentas. 2. Software which kibitzes with other yentas.
All of the running yentas are peers. There is no master server. New nodes can be added or removed on the fly with no configuration.
Each yenta kibitzes (gossips) with the other yentas in the network to exchange status information, distribute key-value data, and detect and correct inconsistent data.
Key-value data is versioned with timestamps. By default, newest wins. Maps can be configured to keep and return multiple versions and client code can use other conflict resolution mechanisms.
Lost, missing or otherwise inconsistent data is detected by kibitzing merkle tree hash values.
Yentas can take network topology into account when tranferring data around to minimize long-distance transfers. You will need to write a custom MySelf class with a my_datacenter function.
MySelf
my_datacenter
Yentas can take advantage of multiple network interfaces with different IP addresses (eg. a private internal network + a public network), or multiple addresses (eg. a private addresses and a public address) and various NAT configurations.
You will need to write a custom MySelf class and my_network_info function.
my_network_info
By default, yentas obtain their primary IP address by calling gethostbyname( hostname() ). If this either does not work on your systems, or isn't the value you want to use, you will need to write a custom MySelf class and my_network_info function.
gethostbyname( hostname() )
various parameters need to be specified in a config file. if you modify the file, it will be reloaded automagically.
specify the TCP port to use
port 3503
specify the environment or realm to run in, so you can run multiple independent yenta networks, such as production, staging, and dev.
environment prod
specify networks allowed to connect.
allow 127.0.0.1 allow 192.168.10.0/24
specify initial peers to contact when starting. the author generally specifies 2 on the east coast, and 2 on the west coast.
seedpeer 192.168.10.11:3503 seedpeer 192.168.10.12:3503
specify a secret key used to encrypt data transfered between yentas in different datacenters.
secret squeamish-ossifrage
specify a syslog facility for log messages.
syslog local5
enable debugging for a particular section
debug map
configure a map (a collection of key-value data). you do not need to configure the same set of maps on all servers. maps should be configured similarly on all servers that they are on.
map users { backend bdb dbfile /home/acdata/users.ydb history 4 }
Too many to list here.
AC::Yenta::Client Amazon Dynamo - http://www.allthingsdistributed.com/2007/10/amazons_dynamo.html
Jeff Weisberg - http://www.solvemedia.com/
To install AC::Yenta, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AC::Yenta
CPAN shell
perl -MCPAN -e shell install AC::Yenta
For more information on module installation, please visit the detailed CPAN module installation guide.