
                       Installing the new NVP system...
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


NOTICE:
~~~~~~~
     This software has not been officially released and is probably crawling 
     with bugs. Use at your own risk. Et cetera.
     PS: If you find an unknown bug in the code, please tell me. If you find 
         an unknown bug anywhere else, please tell David Attenborough.

     CHRIS JACKSON SUGGESTS WE STANDARDISE USING POINT .19 FOR CASTAWOTE/NVP.



ACT 0001 - SETTING UP CastAWote:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1.   Make sure CastAWote has been 'seen' by the filer.

     2.   Run the 'VoteConv' application. If you've already done this, you
          can skip this step. It doesn't really matter as long as it has
          been done at least once.

     3.   If you don't have CastAWote version 3 - go get an upgrade. CastAWote
          3 is identified by the [H]elp options. Use ALT-D to find the full
          version.

     4.   Open "<CastAWoteA$Dir>.Configure".

     5.   If not already done, set the BBSNAME option to something sensible.

     6.   If not already done, set the NVP option to "Yes".

     7.   If not already done, set the OURFIDOADDR option to the fidonet 
          address of the BBS system (NOT CastAWote), in the form xx:xx/xx.xx
          (eg: 2:254/86.1).

     8.   If not already done, set the MASTERADDR option to the fidonet 
          address of the MASTER BBS system (NOT CastAWote), in the same 
          format.

          These last two options may seem odd, pointing to the host BBS and 
          not the CastAWote point. This is because this is what the USER sees,
          not what NVP routes to. :-)

     9.   Save Configure...



ACT 0010 - SETTING UP NVP:
~~~~~~~~~~~~~~~~~~~~~~~~~~
     1.   Open up "<NVP$Dir>.Resources.Configure".

     2.   Set OUTBOUND to either 4D or 5D. This will be selected for 
          importing, but currently NVP can only EXPORT 4D.

     3.   Set the NVP option to either "Slave" or "Master" (see below).

     4.   You should have allocated a point for CastAWote. Find out also the 
          point address of the MASTER CastAWote.

     5.   Set the OURFIDOADDR option to your CastAWote's fido address, in the
          usual format. This must NOT be the same as your BBS.

     6.   Set the MASTERFIDO option to the MASTER CastAWote's fido address, in
          the usual format - even if the same as OURFIDOADDR.

     7.   Set the ROUTEDADDR option to the fidonet node you wish to route the
          mail packets through. This will probably be the address of your BBS
          server, so it will toss packets from NVP.

     8.   Set the IMPORT option to where you wish for NVP to look for packets 
          to itself. As you should have the BBS server exporting netmail for
          NVP from your main packet - NVP will usually be set to 
          "<Binkley$Dir>.Outbound".

     9.   Set the IMPORT option to where you wish for NVP to place its created
          packets. As you should have the BBS server tossing NVP packets, this
          will usually be set to "<Binkley$Dir>.Inbound".

     10.  Set the LOGTYPE option to one of SHORT, NORMAL or FULL (detailled 
          later).

     The 'usual' format - '2:254/86.1@Fidonet', or whatever applies to you. If 
     no network is specified, Fidonet is assumed.

     NOTE IMPORTANT!!!
     
          CastAWote's 'fido' address and NVP's 'fido' address ARE DIFFERENT.

          CastAWote's address is normally the same as your BBS. It is shown to 
          the user to identify who/where.

          NVP, on the other hand, REQUIRES its own point address, and this is
          what is specified for NVP.

          Case study:    Digital Databank
                         BBS system sited at 2:257/509.0
                         DigiBank NVP sited at 2:257/509.19
                         CastAWote told it is 2:257/509.0
                         NVP told it is 2:257/509.19


ACT 0011 - MASTER OR SLAVE???:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     I think first, I should try to explain how NVP works. If this looks like 
     a pile of crud to you, have a little of your favourite tipple and read 
     this again. :-)


     NVP operates in one of two modes, MASTER or SLAVE. This analogy is 
     ruthlessly nicked from IDE hardware. But compare to a typical Econet 
     setup. You have a filestore that controls the network. Connected to the 
     filestore are a heap of computers that act as clients to the network.

     This is similar to how NVP operates. There is a MASTER in control, and 
     everybody else is a SLAVE. Instead of communicating by wire, we all 
     communicate by netmails sent over existing fidonet technology.

     Unlike Econet, NVP is async in operation. If a message from one NVP gets 
     'held up', the whole system won't grind to a halt. There are no hard and 
     fixed rules as to timing. Digital Databank may wish to run NVP daily as 
     CastAWote there is used heavily. A less used CastAWote (say, Renegade) 
     need only run NVP every few days.

     Unlike National Voter - NVP is totally flexible. Take for example the
     case of MASTER Q who is a bit of a tyrant and censors votes whilst 
     creating loads of unsuitable votes. Everybody else loathes MASTER Q. 
     Well, with NVP you can do something about this. Decide who is to be the 
     new MASTER and reconfigure the setup - hereby cutting the old MASTER (Q) 
     from the picture. This is a transition between a centralised way of
     operating, and a decentralised way. There MUST be a MASTER, however the
     the SLAVES are free to nominate who that MASTER is and to change as
     they wish. There may be some sync errors regarding what votes are from
     the 'previous' system and the 'new' one; a clearing of votes if changing
     MASTER is recommended; however given this flexibility, there is now
     absolutely nothing to be gained by having a MASTER abuse their
     arbitration powers. Oh, and I should point out, an NVP SLAVE can become
     an NVP MASTER and operate as such...

     NVP MASTER will fail to accept commands from another MASTER. Likewise a 
     SLAVE won't accept commands from another SLAVE.



ACT 0100 - SO HOW DOES THIS WORK IN PRACTICE?:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     SLAVE mode is simple:

          * Load datafiles. Directory is loaded, but ignored.
          * Scan ALL valid packets in the IMPORT directory for packets 
            addressed to itself.
          * When a packet is found, toss it - updating as needed.
          * When no more packets, look for the NVP_Log file in CastAWote. If
            this is found, create a packet containing this, and send it to
            the MASTER.
          * Save datafiles.


     MASTER mode is similar, but more complex...

          * Load datafiles and directory.
          * Scan ALL valid packets in the IMPORT directory for packets 
            addressed to itself.
          * When a packet is found, toss it - updating as needed. All valid
            data (ie: filtering control commands) is written to NVP_MLog as
            encountered.
          * When no more packets, look for the NVP_Log file in CastAWote. If
            this is found, append to MVP_MLog.
          * Step through each directory entry, sending NVP_MLog to each.
          * Save datafiles.

     See below for details of valid packets.



ACT 0101 - HOW TO USE NVP:
~~~~~~~~~~~~~~~~~~~~~~~~~~
     NVP is designed to be run as a task from ArcBBS cron. However, I don't 
     advise you do this until NVP has had some 'real-life' testing.

     You will need to set up your BBS to export mail from your main packet to 
     a point. This I'm not sure of, but most of the current beta testers 
     support points (like myself). Simply set up another, as CastAWote.

     The session runs like this:

          You force your BBS server to toss your main packet, if not done so
          already. If mail for CastAWote, this should be exported.

          You then run NVP. It will look through valid packets (see below) and
          toss any it finds for itself.

          If CastAWote has completed, there should be a new packet in the
          EXPORT directory. See below for naming conventions.

          You force your BBS server to toss again. It should, in theory, pick 
          up the NVP packet and deal with it (append it to a standard 
          outbound).


     The techie-fodder way to use NVP:

          WARNING : TECHIE AREA, and probably how POINTS will have to do 
                    things.

          This has NOT been tried, but should work something like this:

          * Host BBS creates a netmail-only packet to CastAWote directly. You
            set up another AKA in Binkley and poll.

          * NVP tosses this packet (addressed to itself) directly from 
            Binkley.

          * NVP creates packets. Binkley will then poll.

          Sounds simple. I doubt it is. :-)



ACT 0110 - WHAT IS A VALID PACKET:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     A packet is 'valid' if it is named in one of the following forms:

       ########PT.####CT

     This type of packet is created by the tosser program. NVP will no longer 
     deal with ########PT (or /P, _P & OH) packets.


ACT 0111 - PACKET NAMES:
~~~~~~~~~~~~~~~~~~~~~~~~
     If the mail is routed locally (ie: to 2:257/501.0 from 2:257/501.19) then 
     the packet will always be called "16F00000PT". Otherwise, the packet will
     be given a 'valid' name that Binkley can use. 
     For example:
          To 2:254/86    - 00FE0056OT
          To 2:257/501   - 010101F5OT



ACT 1000 - THAT LITTLE PROGRAM YOU WROTE:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     As I'm feeling in a generous mood, I'll explain:

     Here is a simple BASIC program:

          10 SYS "XOS_CLI",""

     Simple huh? Notice the end of that has a blank string (the "" bit). This 
     is not correct. What it is looking for is a *command. It will pass this 
     to the system - ignoring all errors.

     To demonstrate, call up BASIC either via TaskWindow or bash F12 etc...

     Type in:

          SYS "OS_CLI","Rayanne"

     You'll see "File 'Rayanne' not found".

     Now type in:

          SYS "XOS_CLI","Angela Chase"

     The call will return with no error.

     To see this in action, type in:

          SYS "XOS_CLI","Show *FFF"

     You should see something like:

          Alias$@RunType_FFF : %If |"desktop|"=|"commands|" Then Type %*0[...]
          File$Type_FFF : Text
          Filer$Type_FFF : Text
          FirstWordPlus$DefaultRunType_FFF : Run ADFS::Stephanie.$.DTP.!1[...]


ACT 1010 - LOG TYPES:
~~~~~~~~~~~~~~~~~~~~~
     SHORT     This lists the least it can get away with... Something like:

                    # : NVP utility initialised on Sun,26 Nov 1995.00:56:04
                    * : Loaded 108 questions from votes data file.
                    * : Saved 108 questions to votes data file.
                    # : NVP normal termination on Sun,26 Nov 1995.00:56:09

     NORMAL    This is the recommended option. It lists in a little more
               detail without being over the top about it:

                    # : NVP utility initialised on Sun,26 Nov 1995.00:56:28
                    * : Configuration for '2:254/86.16' (UK) completed.
                    * : We are the NVP MASTER.
                    * : Loaded 108 questions from votes data file.
                    * : No 'NVP_Log' to copy at our side.
                    * : Saved 108 questions to votes data file.
                    # : NVP normal termination on Sun,26 Nov 1995.00:56:33

     FULL      This is mainly for debugging and nosey people. It lists
               practically EVERYTHING and is quite OTT. This example shows why
               you should keep an eye on your logs:

                    # : NVP utility initialised on Sun,26 Nov 1995.01:10:16
                    * : Configuration for '2:254/86.16' (UK) completed.
                    * : We are the NVP MASTER.
                    * : Loaded 109 questions from votes data file.
                    * : Entered doaction loop as MASTER.
                    * : Switching in IMPORT mode.
                    * : Searching for packets named '########PT' (pkt, s[...]
                    * : Found '16F00000PT'.
                    > : Examining packet '16F00000PT'.
                    * : This packet is addressed to us...
                    > : Opening '16F00000PT'.
                    * : Skipping routing data, going to first message.
                    > : Reading new message header.
                    * : This message is from 'CastAWote [slave]' to 'Cas[...]
                    * : Its subject is 'NVP update' (and was created on [...]
                    * : It originated from '2:254/86.1', unique ID '531C6C03'.
                    > : Read 'Which is your favourite DTP pa::1' from th[...]
                    * : Updated result 1 for question 3.
                    * : Can't update user's votedon flag - not implement[...]
                    > : Read 'Let's upset a few people.... W::1' from th[...]
                    * : Updated result 1 for question 4.
                    * : Can't update user's votedon flag - not implement[...]
                    > : Read 'Which is the best Acorn mag?  ::1' from th[...]
                    * : Updated result 1 for question 5.
                    * : Can't update user's votedon flag - not implement[...]
                    > : Read '%%VERSIONS' from the message.
                    > : Read 'NEW VOTE:' from the message.
                    * : Question found already exists, junking...
                    ! : Errors in question, question junked.
                    * : Packet '16F00000PT' finished with and deleted.
                    * : Searching for packets named '########_P' (pkt, v[...]
                    * : Searching for packets named '########/P' (pkt, v[...]
                    * : Searching for packets named '########OH' (On Hold).
                    * : Found '00fe0056OH'.
                    > : Examining packet '00fe0056OH'.
                    * : This packet is not ours (it is for 2:254/86.1).
                    * : No 'NVP_Log' to copy at our side.
                    * : Switching in EXPORT mode as a MASTER.
                    * : Beginning distribution...
                    * : Packet to: '2:254/86.1'.
                    @ : 257|501
                    @ : FNsetuppacketaddress; IN [2:254/86.16,2:254/86.1[...]
                    < : Building blank packet '<NVP$Dir>.Resources.Packe[...]
                    @ : Angela Chase at 2:254/86.1
                    < : Written message header.
                    < : Written file '<NVP$Dir>.Resources.NVP_MLog' as p[...]
                    * : 'NVP_MLog' packet sent, original obliterated int[...]
                    * : Saved 109 questions to votes data file.
                    # : NVP normal termination on Sun,26 Nov 1995.01:10:42

               (wow!)



ACT 1011 - KNOWN LIMITATIONS OF THE SYSTEM:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * The system does NOT automatically update the 'hasvoted' pointer for the
       user. The data structure supports this, the code doesn't - yet.
     * NVP does NOT support CAW Wimp_Messages. The end idea is you run this
       program late at night.
     * The program isn't exactly quick. Again, it's supposed to be a late-
       night load-it-and-leave-it.
     * NVP doesn't support the concept of holidays yet.


ACT 1100 - AND FINALLY...?
~~~~~~~~~~~~~~~~~~~~~~~~~~
     As you can see, this is early development software.

     No doubt you'll find 100 bugs tonight. Well, you have the full source so 
     you can patch up stupid bugs (like "file not found" etc). PLEASE PLEASE 
     inform me of all bugs (with a snippet of logfile) so I can do something
     about the bugs here.


Well guys, you wanted NVP so I sat down and coded this. It is extemely early 
software and will probably fail in heavy use :-). Being a point with a 
small harddisc, there is a severe limit to how much of fidonet I can fake.

I wish to publically thank Chris Jackson. It it wasn't for his extensive help 
and a few of his routines, this wouldn't work over fidonet. It'd be so much 
simpler to follow my original plan of using the ArcBBS message redirection. 
However that'd kinda stuff ArmBBS/NewsFlash users. So with lots of coaxing 
from Chris - I made my first packet (and crashed Binkley). I've progressed and
continued and hopefully the groundwork is secure.

I can only pray. Thanks everybody.
[later: actually, blow me, the thing is working quite well!]


ACT 1101 - CREDITS:
~~~~~~~~~~~~~~~~~~~
     The usual thanks go out to John Stonier and Steve Pursey for being 
     willing to test this software... And for prodding me until I got this 
     coded.

     Thanks to DaviD Dade and Robin Abecasis for suggestions and hints.

     Now a very special thank-you. Two months ago I knew sweet nothing about 
     Fidonet packets. So please please call Chris Jackson's BBS (Northern ARM
     BBS in Yorkshire - +44 01274 530831) to say thanks. If it wasn't for his
     extensive help, this addition to CastAWote would never have begun.

     Finally, it goes without saying that I thank everybody that has supported 
     CastAWote and BudgieSoft over the last year and a bit. Thanks.

