File Coverage

blib/lib/OurNet.pm
Criterion Covered Total %
statement 11 19 57.8
branch 1 6 16.6
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 15 30 50.0


line stmt bran cond sub pod time code
1             # $File: //depot/libOurNet/OurNet.pm $ $Author: autrijus $
2             # $Revision: #10 $ $Change: 2112 $ $DateTime: 2001/10/17 05:42:55 $
3              
4             package OurNet;
5 1     1   833 use 5.005;
  1         5  
  1         52  
6              
7             $OurNet::VERSION = '1.60';
8              
9 1     1   6 use strict;
  1         2  
  1         284  
10              
11             =head1 NAME
12              
13             OurNet - Interface to BBS-based groupware platforms
14              
15             =head1 SYNOPSIS
16              
17             # import modules automatically
18             use OurNet qw/FuzzyIndex BBS BBSApp/;
19              
20             # the rest of code...
21             my $BBS = OurNet::BBS->new(@ARGV); # etc
22              
23             =head1 MODULES
24              
25             The B line is currently split into two distinct projects:
26             the I and I suites, represented by the B
27             and B on CPAN, respectively.
28              
29             Note that the old B interface is I as
30             of OurNet v1.6. We'll work on a set of equivalent module that
31             could work on the 1.6 series.
32              
33             Here are a run-down of distributions offered by these two bundles:
34              
35             In I distribution:
36              
37             BBS RmpO Component Object Model for BBS systems
38              
39             In I distribution:
40              
41             Sync RmpO Sync between BBS article groups
42              
43             In I distribution:
44              
45             BBSAgent RmpO Scriptable telnet-based virtual users
46              
47             In I distribution:
48              
49             FuzzyIndex RmcO Inverted index for double-byte charsets
50             ChatBot RmpO Context-free interactive Q&A engine
51              
52             In I distribution:
53              
54             Query RmpO Perform scriptable queries via LWP
55             Site RmpO Extract web pages via templates
56             Template ampO Template extraction and generation
57             WebBuilder bmpO HTML rendering for BBS-based services
58              
59             =head1 SCRIPTS
60              
61             bbsboard Internet to BBS email-post handler # BBS
62             bbsboard Internet to BBS email-gateway handler # BBS
63             bbscomd OurNet BBS remote access daemon # BBS
64             ebx Elixir BBS Exchange Suite # BBSApp::Sync
65              
66             fianjmo Chat with a virtual personality # FuzzyIndex
67             fzindex FuzzyIndex index utility # FuzzyIndex
68             fzquery FuzzyIndex query utility # FuzzyIndex
69             sitequery Metaseach multiple sites # Query
70              
71             =head1 DESCRIPTION
72              
73             The OurNet:* modules are interfaces to I-based groupware
74             projects, whose platform was used in Hong Kong, China and Taiwan by
75             est. 1 million users. Used collaboratively, they glue BBSes together
76             to form a distributed service network, called B.
77              
78             This module is merely a bundle over the seperated distributions on
79             CPAN, so please refer to each individual modules and scripts'
80             documentation for detailed information.
81              
82             Please see L for further references, and
83             binary releases for Win32 and other platforms.
84              
85             =head1 WHAT IS THIS TELNET-BBS THING?
86              
87             Below is an excerpt from Autrijus Tang's lightning talk session in
88             TPC5, which gives a context of the OurNet development.
89              
90             =head2 The BBS Culture of Zh-* region
91              
92             I
93              
94             OurNet is a cross-protocol distributed network built on top of
95             telnet-based BBS systems, which is used exclusively in the Chinese
96             speaking world, as they never got translated back. The server code
97             is 'the' major GPL project in these regions, and was under heavy
98             hacking for 8+ years.
99              
100             I
101              
102             There are est. 2-3 million regular users on thousands of sites,
103             and many of them doesn't use browser as often; some doesn't use
104             web at all. Lots of university departments, dorms, organizations
105             are running their own BBS sites.
106              
107             I
108            
109             So for the users, the BBS is "the Unix shell for the rest of us". It
110             provides public access to services resembling mutt, pine, irsii, talk,
111             write, finger, lynx (and MUD), but organized in a consistent text-based
112             interface.
113              
114             People love it because it's real-time, and it perserved the 'community'
115             flavor of the dial-up BBS era where you feel you're interacting with
116             real people, instead of abstracted URLs and e-mails. You'll probably
117             understand it better if you came from a dial-up BBS culture.
118              
119             =head2 Challanges of The Current Model
120              
121             I
122              
123             The BBS daemon code in C is comparable in size with the perl5 core,
124             and has no clean plug-in interfaces, so things like Tamaguchi gets
125             implemented like 20 times across 10 different forked versions. Also,
126             there's no offline browsing, so you only gets to access your mail
127             and usenet news when you're online.
128              
129             I
130              
131             The lack of Jabber-like presence and federated authentication presents
132             another problem -- people have to remember twenty sets of passwords
133             for different BBS sites, and instant message between these sites are all
134             but impossible. Also, the only communication between BBS sites are
135             limited to NNTP and Gopher; there's no frames, RSS, or hyperlinks at
136             all.
137              
138             I
139              
140             Of course, sending your password over through a telnet connection
141             is terrible, as is storing all your private mail and profiles
142             unencrypted on server. but the real shock is because of this,
143             governments actualy get to pass laws to say all BBS servers
144             have to obtain real name, social security id and phone numbers
145             for all users, and keep logs of their activities.
146              
147             =head2 Perl Comes to Rescue
148              
149             I
150              
151             So, about one year ago I gathered the Taipei.pm people working on
152             gluing these isolated nodes together. One thing we tackled is
153             the authentication model, in which your identity is just the
154             GPG or PGP key ID, so we can get all mails one-way encrypted,
155             etc.
156            
157             It couldn't rely on any keyservers since the government could
158             monitor them, so I'm going to implement "transient mini CA" objects
159             that basically get store-and-forwarded in FreeNet and OurNet nodes,
160             and each server could alias those keyID into their local usernames.
161              
162             I
163              
164             So the new model is that every user installs a transient BBS server
165             at home, which comes with a unified rendering and object model that
166             renders queries from freenet, napster, mailbox, usenet, rss or
167             even livejournal. We've also done a locale-enabled full-text
168             inverted index engine that could work on all those services.
169              
170             I
171              
172             There's a couple CPAN modules I've developed over the past year
173             that helped making wrappers around existing services. There's
174             OurNet::Template, which is a subclass of the Template Toolkit,
175             but instead of calling process() with a template file and a
176             hash reference of parameters to produce a HTML, you can call
177             extract() with a HTML file and template and get the parameter
178             hash back!
179              
180             We're working on the much more magical generate() function,
181             which should take a HTML file and hashref to produce the
182             appropriate template. There are also wrappers around telnet
183             sessions (OurNet::BBSAgent), slashcode (Slash::OurNet) and
184             other plugins that could render syndicated data back and
185             forth in an improved, more secure PlRPC protocol that works
186             with tied variables.
187              
188             =head2 What We're Doing Next
189              
190             I
191              
192             Since it is now possible to develop bbs components in perl,
193             we're working on a system that lets the author sign it and
194             distribute it across OurNet, so each node could look at the
195             source code, run it in a Safe compartment, and if they like
196             it, they could sign it to vouch for its integrity.
197              
198             There should also be ircbot-like agents which could deserialize
199             and walk through nodes, and do things like translating requests
200             across heterogenous services.
201              
202             I
203              
204             We're contemplating about how people could use it to form
205             trust-ring-based economy system like Mojo Nations and Advocado.
206             Also, we have a reasonable chance to solve the Slash => NNTP
207             problem now.
208              
209             I
210              
211             Currently we're doing i18n support and translating messages to
212             English, and our company is sponsoring people to write related
213             OSS packages, and users seem to like it, too.
214              
215             At the very least, this OurNet thing got my mom started advocating
216             on strong crypto and online privacy, so I think it's kind of cool.
217              
218             =head1 CAVEATS
219              
220             The HOWTO documentation and BBSCOM API is still lacking; we'll be
221             very grateful if anybody from the telnet BBS circle could contribute
222             to it.
223              
224             =cut
225              
226             sub import {
227 1     1   8 my $self = shift;
228 1         2 my $package = (caller())[0];
229              
230 1         3 my @failed;
231              
232 1         2 foreach my $module (@_) {
233 0         0 eval("package $package; use OurNet::$module;");
234              
235 0 0       0 if ($@) {
236 0         0 warn $@;
237 0         0 push(@failed, $module);
238             }
239             }
240              
241 1 50       11 die "could not import qw(" . join(' ', @failed) . ")" if @failed;
242             }
243              
244             sub new {
245 0     0 0   my $package = join('::', splice(@_, 0, 2));
246              
247 0           eval "use $package";
248 0 0         die $@ if $@;
249              
250 0           return $package->new(@_);
251             }
252              
253             =head1 AUTHORS
254              
255             Autrijus Tang Eautrijus@autrijus.org>,
256             Chia-Liang Kao Eclkao@clkao.org>.
257              
258             =head1 COPYRIGHT
259              
260             Copyright 2001 by Autrijus Tang Eautrijus@autrijus.org>,
261             Chia-Liang Kao Eclkao@clkao.org>.
262              
263             This program is free software; you can redistribute it and/or
264             modify it under the same terms as Perl itself.
265              
266             See L
267              
268             =cut