From: pieter@ford.ee.up.ac.za
Newsgroups: rec.sport.cricket
Subject: SA vs India, 5th ODI, live scoreboard
Date: 14 Dec 1992 23:50:30 -0600
Organization: UTexas Mail-to-News Gateway
NNTP-Posting-Host: cs.utexas.edu

Thanks to one of our graduate students Jacques De Villiers there will
be an experimental 'live scorecast' of the 5th ODI played at
Springbokpark in Bloemfontein.  To take part in this you'll need a
program called 'dougie' that is obtainable via anonymous ftp from
ford.ee.up.ac.za. Assuming you have succeded in compiling this
program, you first need to find out the tcp/ip port number being used.
This can be obtained from my .plan file with 'finger
pieter@ford.ee.up.ac.za' that will contain a line specifying the port
number, say 12345. You then start the program with the command 
	dougie ford.ee.up.ac.za 12345
Each running dougie acts as a server for 4 other clients and the tree is
automatically build and rebuild in order to optimize communication
delays. I.e. The first 4 people connect to ford, after which the next
ones are referred to the 4 already connected. Every once in a while
all connections are broken and clients are instructed to reconnect.
Theoretically the closest ones (bandwidth wise) will connect first and
thus the whole tree should speed up.

I'll be sitting in front of a terminal and a TV and update the
scoreboard and these changes will be reflected on all the screens of
participants. Please comment on the usebality of the program and
suggest improvements.

The game starts at 14:15 local time which is 2 hours ahead of GMT. A
test screen of dougie is allready up, but the game will be on a
different port. Please finger after 14:00 to get the game port.

Pieter

Below is the accompanying README file of dougie v0.0:

Dougie version 0.0 alpha
~~~~~~~~~~~~~~~~~~~~~~~~


Dougie is a (distributed) one day cricket scorer.

Share and Enjoy!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Installation:
~~~~~~~~~~~~~
Use something like zcat dougie-0.0.tar.Z |tar -xmvf -
to extract the source into directory ./dougie-0.0

Take a look at the Makefile.  Use yacc if you don't have bison installed.
If you have flex, rm crklex.c; if not touch crklex.c

We've tested dougie on:

IBM RS/6000     AIX3.2        make rs6000
HP  9000/730    HP-UX 8.05    make hpux
DG  AViiON      DG/UX 4.3     make dgux
386BSD          0.1           make 386bsd
Sun4c		SunOS 4.1     make sunos (used gcc version 1.39)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Usage:
~~~~~~
dougie [hostname portname] [clientport] [-plan]

hostname - internet name of controlling dougie host
portname - port to use on this host

clientport - port to use for clients to this host

-plan    - update the $HOME/.plan file with the latest score

Dougie has two modes of operation, master and slave.

0. The slave mode
 Selected if a hostname and host port are given on the command line.
 In this mode dougie receives all the scoring information from the given host.
 e.g.  dougie ford.ee.up.ac.za 30000
 will receive scores from port 30000 on host ford.ee.up.ac.za


1. The master mode
 Selected if no host name given.  In this mode, dougie acts as the source
 of scoring information for the rest of the network.  Commands are read from
 the terminal.
 e.g. dougie 20000 -plan
 will initialize dougie in the master mode and update the .plan file.
 Clients must connect to port 20000 on this host.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Quick session example:
~~~~~~~~~~~~~~~~~~~~~~
To start a master Dougie on port 12345 of (say) ford.ee.up.ac.za
	dougie 12345 -plan
	enter dougie commands (e.g): source example2
	                             4
				     wi hud jad c

Clients:
	dougie ford.ee.up.ac.za 12345
	and that's it.

Client connection scheme:
 Every dougie client is also a dougie server.
 Clients connect to the server specified on the command line.  If this	
 server has no more free connections (default 4 for each dougie), it
 redirects the connection to one of its clients (selected intelligently
 (we hope!)).  This process continues until the client finds a willing
 server.
 A refresh command disconnects the whole dougie network. Every client will
 again try to connect to the root server.  Those closest (bandwidthwise)
 will hopefully connect first.  Such a dynamic reorganisation should optimise
 the dougie network for packet distribution & chain length (depth)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dougie command set
~~~~~~~~~~~~~~~~~~
Commands are either read from the keyboard (master) or from a TCP socket
(slave).  Commands are passed (verbatim) to all clients before any parsing
is done (to reduce propagation delays).  Take a look at the crklex.l and
crkparse.y files for a complete specification.


Miscellaneous commands
	(capitals indicate abbreviations)

definitions:


	string	- any ASCII string sequence, enclose in double quotes if
		it includes whitespace characters
		e.g.  India  or "South Africa"	

	number	- any decimal (or octal) number
		e.g. 10  or 012


	player	- a player index 0..11, or
		- a player name e.g. hudson or a unique abbreviation: hud,
		  not case sensitive
		  enclose in double quotes if player name includes whitespace

	wickettype - the type of wicket:
		  BOwled, Caught, LBW, RunOut, STumped, HitWicket,
		  ReTire, HURT, NotOut


 help
	- Very cryptic help on selected topics


 quit
	- Stops dougie and all its clients, use with care


 refresh
	- All clients are restarted.  Optimises the dougie network
	bandwidthwise.


 CONnections
	- Display server statistics on the master terminal:
	[<hostport> M:<max. no of connections> U:<used> F:<free>] \
	[<best client>.<port> M:<max con> U:<used> F:<free>]
	where <best client> is the host where incoming connections
	will be sent if the master has no more free connections available.


 noupdate
	- stops screen update until the next update command, useful if
	reading commands from a file


 update
	- enables screen updating & refresh screen on all clients


 source filename
	- read dougie commands from filename, use with dump


 dump filename
	- save the current dougie state to filename, use with source


 dig
	- display client statistics:
	Dig: (depth N) c1 c2 c3 ... cN = <total number of clients>
	where cx is the number of clients x levels away from the master.
	If we have the following setup:
                             Master
                       ________|_______
                      |                |
                  Slave 0          Slave 1
                ______|_____           |
               |            |      Slave 2
           Slave 3      Slave 4
                            |
                        Slave 5

	dig will give:
	Dig: (3) 2 3 1 = 6



Match setup commands

 venue string
	- set the venue, displayed at the top of the screen
	e.g. venue "South Africa vs India, 3nd D/N, Centurion Park"


 match string0 string1
	- set the names of team 0 (first) and team 1
	e.g. match "South Africa" "India"


 team number0 number1 string
	- set the name of player number1 in team number0
	players are numbered from 0 to 11
	e.g. team 0 1 "Wessels"


 totals byes legbyes
	- set the number of byes and legbyes.
	e.g. totals 3 5


 comment string
 `whatever
	- set the one line comment, displayed in the last line on screen


 new [bat|bowl] player [player]
	- set the current batsman / bowler
	To set both:
	   new bat kirsten hudson
	will set Hudson and Kirsten as the two batsmen, with Kirsten now
	receiving.


 FACing [player]
	- player now faces the bowler
	swaps batsmen if the optional argument is left out
	e.g. face kirsten


 swap player0 player1
	- swaps players in the batting team, useful if batting order changes
	e.g. swap hudson donald


 batting number
	- team number is now batting. This setting is used throughout to
	distinguish between players etc.
	e.g. now batting 0


 bat player score balls fielder bowler wickettype
	- setup of player in the current batting team:
	player, fielder and bowler are of type player
	score and balls are numbers
	e.g. bat Hudson 30 45 Amre shastri caught


 bowl player balls maidens runs wickets wides noballs
	- setup of player in the current bowling team:
	balls, maidens, runs, wickets, wides and noballs are numbers.
	e.g. bowl Donald 45 2 7 5 0 0



Match play commands

 WIcket player fielder wickettype
	- player out by bowler and fielder.
	e.g. wicket amre cronje caught
	or   wicket amre 0 bowled


 ball events:
	- simple commands that take no arugments. Ball-by-ball update
 dot | .	- a dot ball, 0 runs
 one | 1	- one run
 two | 2	- two runs
 three | 3	- three runs
 four | 4	- boundary
 fourrun | 4r 	- four runs
 five | 5	- five runs
 six | 6	- boundary
 sixrun | 6r	- six runs
	e.g. 6


 exception:
	- an exception is one of the following:
	Wide Bye LegBye
	followed by a ball event.
	e.g. bye two    or   b 2
	(bye - 2 runs)


 NoBall:
	- a no ball thing happened:
	nb exception ballevent or
	nb ballevent
	e.g.  noball bye 2
	or    nb 1

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Updates:
# $Log: README,v $
# Revision 1.2  1992/12/14  22:51:30  jacques
# SunOs Support mentioned...
#
# Revision 1.1  1992/12/14  11:56:53  jacques
# Initial revision
#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Newsgroups: rec.sport.cricket