Network Considerations

 BBS: Inland Empire Archive
Date: 07-19-92 (15:08)             Number: 92
From: RICK PEDLEY                  Refer#: NONE
  To: MIKE TRINASTICH               Recvd: NO  
Subj: Network Considerations         Conf: (2) Quik_Bas
 On 07-16-92 Mike Trinastich wrote to All...

 MT>   Can anyone offer any information on developing programs that will
 MT> run
 MT> safely on both a network and non-network system without writing 2
 MT> different versions?  We haven't experienced any problems so we tell
 MT> our
 MT> customers that our programs run safely on a network.  Like any
 MT> programmer,
 MT> the more you program the more sophisticated your programs get and
 MT> network
 MT> compatibility is starting to worry me, especially since I have no
 MT> network
 MT> experience.  Until we take the time to network our machines at work
 MT> can
 MT> anyone offer some tips?

I recently added code to a program so that a single byte switch
determines whether it runs as a stand-alone or network version.
A couple of things I had to contend with that I hadn't thought too
much about until I tried to make a program network-compatible:

1. File access menus have to allow for drives lettered as high as Z:,
   not just up to F: or G: as you might expect on a stand-alone
   system.

2. A network administrator might have organized things so that all
   user data files are stored on a separate drive, or even
   on a different server, so if your program is hard-coded to create
   user directories just below the program directory on the same
   drive, you'll need to make it more flexible.

3. If you expect several users to use the program at once, you'll
   probably need a menu so a user can select his own data directory,
   and keep a separate program configuration file here for each
   user. For example, one user might want to run in 50-line mode,
   no mouse, a personalized color scheme, local Epson FX-85 printer;
   another user might have an entirely different setup.  If a single
   configuration file were kept in the program directory -- well, you
   can see the problem this would cause.


3. The remote printer might appear as LPT2: to a terminal, so your
   program needs to be able to direct output to LPT2: (this is
   something I'm currently having trouble with).

4. Network drivers can eat up an extra 30 - 70K of base memory on
   a terminal, so your program has to still be able to function in
   reduced RAM.

5. If you're converting a stand-alone program, probably you'll have
   the terminal load a copy of your program locally and send data
   files back and forth to the server. Things can really slow down
   if your program has overlays or chains a lot, but it works well
   for one-piece programs and small data files.

6. If several users can have access to a file simultaneously, then
   you have to build in code that restricts simultaneous access. If
   SHARE.EXE is loaded then you can use BASIC commands to LOCK
   records for read/write etc., but many programmers prefer to use
   `hard' record-locking, where a one or two byte field in each
   record is reserved for a locked/unlocked flag.

7. You need to be able to tell if SHARE is loaded, and possibly
   which network program, usually Lantastic, Novell Netware,
   or Banyan Vines.

This should get you started. The hardest thing I found was having to
adjust my thinking, having gotten locked into a single machine -
single user way of looking at everything. BTW, I recently bought a
book called PC Connectivity by John Dvorak that comes with 3 floppies,
one of which has Lantastic Z on it.  Lantastic Z allows you to connect
two computers by null modem or parallel cable and run a network between
them, either server-terminal or both machines can be servers =and=
terminals. The book was $60 Cdn (ouch, but there's lots of other
stuff in it), and about $50 for a 50' null modem cable.  I also got
a couple of serial switch boxes because I don't have a 3rd COM port.
If the machines are close to each other, an 8' parallel cable and
a couple of parallel cards is much better (and faster) and will cost
about $50 US. It's a great way for programmers to test out their
code without having to find some place that'll let you experiment on
their network.  As a side benefit, it also frees up tons of drive
space if you've been keeping copies of big applications on both drives
(depending on the license specs for each program, of course ;-) ).

... OFFLINE 1.40

--- Maximus 2.01wb
 * Origin: The BULLpen BBS * Intel 14.4EX (613)549-5168 (1:249/140)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET