Changeset 4440 for trunk/Nebulous/lib
- Timestamp:
- Jun 29, 2005, 4:35:06 PM (21 years ago)
- Location:
- trunk/Nebulous/lib/Nebulous
- Files:
-
- 11 edited
-
Client.pm (modified) (4 diffs)
-
Client.pod (modified) (6 diffs)
-
Client/HTTP.pm (modified) (1 diff)
-
Client/Log.pm (modified) (3 diffs)
-
Server.pm (modified) (3 diffs)
-
Server.pod (modified) (2 diffs)
-
Server/Apache.pm (modified) (2 diffs)
-
Server/Log.pm (modified) (2 diffs)
-
Server/SOAP.pm (modified) (3 diffs)
-
Server/SQL.pm (modified) (1 diff)
-
Util.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous/lib/Nebulous/Client.pm
r2919 r4440 1 1 # Copyright (c) 2004 Joshua Hoblitt 2 2 # 3 # $Id: Client.pm,v 1.1 4 2005-01-06 04:11:02jhoblitt Exp $4 5 package PS::IPP::IData::Client;3 # $Id: Client.pm,v 1.15 2005-06-30 02:35:06 jhoblitt Exp $ 4 5 package Nebulous::Client; 6 6 7 7 use strict; … … 12 12 use File::Copy qw(); 13 13 use Log::Log4perl qw(get_logger :levels); 14 use PS::IPP::IData::Client::Log;15 use PS::IPP::IData::Util qw( :standard );14 use Nebulous::Client::Log; 15 use Nebulous::Util qw( :standard ); 16 16 use Params::Validate qw( validate validate_pos SCALAR ); 17 17 #use SOAP::Lite +trace => [qw( debug )]; … … 23 23 use constant LOCK_DEFAULT => 10; # default to a 10s lock timeout 24 24 25 my $log = get_logger( " PS::IPP::IData::Client" );25 my $log = get_logger( "Nebulous::Client" ); 26 26 $log->level( $WARN ); 27 27 … … 74 74 my $lite = SOAP::Lite->new( 75 75 proxy => $args{ 'proxy' }, 76 uri => $args{ 'uri' } || "urn: PS/IPP/IData/Server/SOAP",76 uri => $args{ 'uri' } || "urn:Nebulous/Server/SOAP", 77 77 ); 78 78 -
trunk/Nebulous/lib/Nebulous/Client.pod
r2912 r4440 3 3 =head1 NAME 4 4 5 PS::IPP::IData::Client - iDataclient component5 Nebulous::Client - Nebulous client component 6 6 7 7 =head1 SYNOPSIS 8 8 9 use PS::IPP::IData::Client;9 use Nebulous::Client; 10 10 11 my $ idata = PS::IPP::IData::Client->new(12 proxy => 'http://localhost:80/ idata'11 my $neb = Nebulous::Client->new( 12 proxy => 'http://localhost:80/nebulous' 13 13 ); 14 14 15 my $fh = $ idata->create( "key", 0, "node01", "example" );16 $ idata->replicate( "key", "node01" );17 $ idata->cull( "key" );18 $ idata->lock( "key", 'write' );19 $ idata->unlock( "key", 'write' );20 my $uris = $ idata->find_instances( "key", "node01" );21 my $path = $ idata->find( "key" );22 my $fh = $ idata->open( "key", 'read' );15 my $fh = $neb->create( "key", 0, "node01", "example" ); 16 $neb->replicate( "key", "node01" ); 17 $neb->cull( "key" ); 18 $neb->lock( "key", 'write' ); 19 $neb->unlock( "key", 'write' ); 20 my $uris = $neb->find_instances( "key", "node01" ); 21 my $path = $neb->find( "key" ); 22 my $fh = $neb->open( "key", 'read' ); 23 23 $data->delete( "key" ); 24 24 $data->copy( "key", "new_key" ); 25 25 $data->move( "key", "new_key" ); 26 26 $data->delete_instance( $uri ); 27 my $stats = $ idata->stat( "key" );27 my $stats = $neb->stat( "key" ); 28 28 29 29 =head1 DESCRIPTION 30 30 31 This component provides client access to the iData storage system. It provides 32 an interface for files to be added, managed, and removed from the system. 31 This component provides client access to the Nebulous storage system. It 32 provides an interface for files to be added, managed, and removed from the 33 system. 33 34 34 35 =head1 USAGE … … 39 40 I<symbols>. 40 41 41 use PS::IPP::IData::Client trace => qw( debug );42 use Nebulous::Client trace => qw( debug ); 42 43 43 44 The hash is allowed to have a single key, C<trace>. This controls the level of … … 57 58 Accepts a mandatory hash. 58 59 59 my $ idata = PS::IPP::IData::Client->new(60 proxy => 'http://localhost:80/ idata'61 uri => 'urn: PS/IPP/IData/Server',60 my $neb = Nebulous::Client->new( 61 proxy => 'http://localhost:80/nebulous' 62 uri => 'urn:Nebulous/Server', 62 63 ); 63 64 … … 66 67 =item * proxy 67 68 68 The URL of the iDataserver to connect to.69 The URL of the Nebulous server to connect to. 69 70 70 71 =item * uri … … 119 120 =item MogileFS 120 121 121 The iDatasystem is similar in function to MogileFS but very different in122 The Nebulous system is similar in function to MogileFS but very different in 122 123 implementation and operation. 123 124 … … 160 161 =head1 SEE ALSO 161 162 162 L< PS::IPP::IData::Server>163 L<Nebulous::Server> 163 164 164 165 =cut -
trunk/Nebulous/lib/Nebulous/Client/HTTP.pm
r2785 r4440 1 1 # Copyright (c) 2004 Joshua Hoblitt 2 2 # 3 # $Id: HTTP.pm,v 1. 1.1.1 2004-12-22 02:16:24jhoblitt Exp $3 # $Id: HTTP.pm,v 1.2 2005-06-30 02:35:06 jhoblitt Exp $ 4 4 5 package PS::IPP::IData::Client::HTTP;5 package Nebulous::Client::HTTP; 6 6 7 7 use strict; -
trunk/Nebulous/lib/Nebulous/Client/Log.pm
r2898 r4440 1 1 # Copyright (c) 2004 Joshua Hoblitt 2 2 # 3 # $Id: Log.pm,v 1. 2 2005-01-05 02:44:54jhoblitt Exp $3 # $Id: Log.pm,v 1.3 2005-06-30 02:35:06 jhoblitt Exp $ 4 4 5 package PS::IPP::IData::Client::Log;5 package Nebulous::Client::Log; 6 6 7 7 use strict; … … 13 13 14 14 my $conf = q( 15 log4perl.category. PS.IPP.IData.Client = DEBUG, Screen16 #log4perl.category. PS.IPP.IData.Client = DEBUG, CLIENTLOGFILE, Screen15 log4perl.category.Nebulous.Client = DEBUG, Screen 16 #log4perl.category.Nebulous.Client = DEBUG, CLIENTLOGFILE, Screen 17 17 18 18 log4perl.appender.Screen = Log::Log4perl::Appender::Screen … … 22 22 23 23 log4perl.appender.CLIENTLOGFILE = Log::Log4perl::Appender::File 24 log4perl.appender.CLIENTLOGFILE.filename = /tmp/ idata_client.log24 log4perl.appender.CLIENTLOGFILE.filename = /tmp/nebulous_client.log 25 25 log4perl.appender.CLIENTLOGFILE.mode = append 26 26 log4perl.appender.CLIENTLOGFILE.layout = Log::Log4perl::Layout::PatternLayout -
trunk/Nebulous/lib/Nebulous/Server.pm
r2905 r4440 1 1 # Copyright (c) 2004 Joshua Hoblitt 2 2 # 3 # $Id: Server.pm,v 1. 8 2005-01-05 04:31:59jhoblitt Exp $4 5 package PS::IPP::IData::Server;3 # $Id: Server.pm,v 1.9 2005-06-30 02:35:06 jhoblitt Exp $ 4 5 package Nebulous::Server; 6 6 7 7 use strict; … … 11 11 12 12 use DBI; 13 use PS::IPP::IData::Util qw( :standard );14 use PS::IPP::IData::Server::Log;15 use PS::IPP::IData::Server::SQL;13 use Nebulous::Util qw( :standard ); 14 use Nebulous::Server::Log; 15 use Nebulous::Server::SQL; 16 16 use Log::Log4perl; 17 17 use Params::Validate qw( validate_pos SCALAR ); … … 40 40 ); 41 41 42 $log = Log::Log4perl::get_logger( " PS::IPP::IData::Server" );43 $sql = PS::IPP::IData::Server::SQL->new;42 $log = Log::Log4perl::get_logger( "Nebulous::Server" ); 43 $sql = Nebulous::Server::SQL->new; 44 44 45 45 $log->debug( "entered - @_" ); -
trunk/Nebulous/lib/Nebulous/Server.pod
r2863 r4440 3 3 =head1 NAME 4 4 5 PS::IPP::IData::Server - iDataserver component5 Nebulous::Server - Nebulous server component 6 6 7 7 =head1 SYNOPSIS 8 8 9 use PS::IPP::IData::Server;9 use Nebulous::Server; 10 10 11 PS::IPP::IData::Server->setup( $dsn, $username, $passwd );12 PS::IPP::IData::Server->create_object( $key, $class, $volume, $comment );13 PS::IPP::IData::Server->replicate_object( $key, $volume );14 PS::IPP::IData::Server->lock_object( $key, $type );15 PS::IPP::IData::Server->unlock_object( $key, $type );16 PS::IPP::IData::Server->find_instance( $key, $volume );17 PS::IPP::IData::Server->delete_instance( $uri );18 PS::IPP::IData::Server->stat_object( $key );11 Nebulous::Server->setup( $dsn, $username, $passwd ); 12 Nebulous::Server->create_object( $key, $class, $volume, $comment ); 13 Nebulous::Server->replicate_object( $key, $volume ); 14 Nebulous::Server->lock_object( $key, $type ); 15 Nebulous::Server->unlock_object( $key, $type ); 16 Nebulous::Server->find_instance( $key, $volume ); 17 Nebulous::Server->delete_instance( $uri ); 18 Nebulous::Server->stat_object( $key ); 19 19 20 20 =head1 DESCRIPTION 21 21 22 This is the server side component of the iDatasystem. It is primarily a22 This is the server side component of the Nebulous system. It is primarily a 23 23 middle-ware abstraction of an SQL database. 24 24 … … 120 120 =head1 SEE ALSO 121 121 122 L< PS::IPP::IData::Client>122 L<Nebulous::Client> 123 123 124 124 =cut -
trunk/Nebulous/lib/Nebulous/Server/Apache.pm
r2918 r4440 3 3 # $Id 4 4 5 package PS::IPP::IData::Server::Apache;5 package Nebulous::Server::Apache; 6 6 7 7 use strict; … … 10 10 our $VERSION = 0.01; 11 11 12 use PS::IPP::IData::Server::SOAP;12 use Nebulous::Server::SOAP; 13 13 use SOAP::Transport::HTTP; 14 14 15 15 my $server = SOAP::Transport::HTTP::Apache 16 ->dispatch_to( ' PS::IPP::IData::Server::SOAP' )16 ->dispatch_to( 'Nebulous::Server::SOAP' ) 17 17 ->options({ compress_threshold => 10 * 1024 }); 18 18 -
trunk/Nebulous/lib/Nebulous/Server/Log.pm
r2898 r4440 1 1 # Copyright (c) 2004 Joshua Hoblitt 2 2 # 3 # $Id: Log.pm,v 1. 2 2005-01-05 02:44:54jhoblitt Exp $3 # $Id: Log.pm,v 1.3 2005-06-30 02:35:06 jhoblitt Exp $ 4 4 5 package PS::IPP::IData::Server::Log;5 package Nebulous::Server::Log; 6 6 7 7 use strict; … … 13 13 14 14 my $conf = q( 15 log4perl.category. PS.IPP.IData.Server = DEBUG, SERVERLOGFILE15 log4perl.category.Nebulous.Server = DEBUG, SERVERLOGFILE 16 16 17 17 log4perl.appender.SERVERLOGFILE = Log::Log4perl::Appender::File 18 log4perl.appender.SERVERLOGFILE.filename = /tmp/ idata_server.log18 log4perl.appender.SERVERLOGFILE.filename = /tmp/nebulous_server.log 19 19 log4perl.appender.SERVERLOGFILE.mode = append 20 20 log4perl.appender.SERVERLOGFILE.layout = Log::Log4perl::Layout::PatternLayout -
trunk/Nebulous/lib/Nebulous/Server/SOAP.pm
r2917 r4440 1 1 # Copyright (c) 2004 Joshua Hoblitt 2 2 # 3 # $Id: SOAP.pm,v 1. 1 2005-01-06 03:56:43jhoblitt Exp $3 # $Id: SOAP.pm,v 1.2 2005-06-30 02:35:06 jhoblitt Exp $ 4 4 5 package PS::IPP::IData::Server::SOAP;5 package Nebulous::Server::SOAP; 6 6 7 7 use strict; … … 10 10 our $VERSION = '0.01'; 11 11 12 use PS::IPP::IData::Server;12 use Nebulous::Server; 13 13 use SOAP::Lite; 14 14 import SOAP::Data 'name'; … … 22 22 return undef if $method eq 'DESTROY'; 23 23 24 return name( result => PS::IPP::IData::Server->$method( @_ ) );24 return name( result => Nebulous::Server->$method( @_ ) ); 25 25 } 26 26 -
trunk/Nebulous/lib/Nebulous/Server/SQL.pm
r3016 r4440 1 1 # Copyright (c) 2004 Joshua Hoblitt 2 2 # 3 # $Id: SQL.pm,v 1. 4 2005-01-15 04:02:12jhoblitt Exp $3 # $Id: SQL.pm,v 1.5 2005-06-30 02:35:06 jhoblitt Exp $ 4 4 5 package PS::IPP::IData::Server::SQL;5 package Nebulous::Server::SQL; 6 6 7 7 use strict; -
trunk/Nebulous/lib/Nebulous/Util.pm
r2898 r4440 1 1 # Copyright (c) 2004 Joshua Hoblitt 2 2 # 3 # $Id: Util.pm,v 1. 2 2005-01-05 02:44:54jhoblitt Exp $3 # $Id: Util.pm,v 1.3 2005-06-30 02:35:06 jhoblitt Exp $ 4 4 5 package PS::IPP::IData::Util;5 package Nebulous::Util; 6 6 7 7 use strict;
Note:
See TracChangeset
for help on using the changeset viewer.
