Re: NadaNet file server coming soon...



Michael J. Mahon wrote:
Michael J. Mahon wrote:

I'm getting close to releasing this, so I thought I'd provide
a few updates...

<brazen preannouncement>

I'm finishing up a file server for NadaNet that is written in
Applesoft BASIC running under ProDOS, in less than 300 lines,
with Applesoft client-side code of about 15 lines. ;-)

It handles all the BASIC.SYSTEM commands that make sense from a
remote machine (BSAVE, BLOAD, BRUN, SAVE, RUN, CREATE, DELETE,
LOCK, UNLOCK, RENAME, and VERIFY), with all the legal parameters.
After each command is completed by the server, it posts to the
client the result code (with error code, if any), the AUX TYPE,
and the EOF of the file if data was transferred.

This allows any machine on a NadaNet to use the filesystem on the
server using an invoking interface like:

RQ$ = "bload myprog,a$2000":gosub 10000

Of course, the request string can be formed by concatenating
any variable parameter values, etc., as desired.

Errors can be handled in-line by setting EH=1 prior to the GOSUB
and then examining the value of RC after the GOSUB. (If EH=0, then
any error results in an error message and a STOP.)

The current implementation is geared to a network of more than two
machines, and uses a message server to queue the requests. The server
and client code are easily modified for a two-machine network that
forgoes queueing (since one client can't have more than one request
in the queue at a time anyway) and so doesn't need the message server.

The client machine queues a request (prefixed with its machine ID)
by doing a &PUTMSG to the predetermined file server queue number, then
idles in a &SERVE() loop polling the result code after each network
transaction handled by the client. When it finds a result, it returns
from the GOSUB and continues execution.

The file server idles polling its input queue with a &GETMSG, and, when
it finds a request, it parses it, sets up any required parameters that
were not supplied, and executes the command on the local file system.

If a data transfer is required, it is &PEEKed and BSAVEd or BLOADed and
&POKEd in chunks up to some maximum (like 4KB, to keep network latency
reasonable). When the command is complete, the result code, and any
address and EOF information, is &POKEd to the requester, and the server
goes on to the next request in its queue.

Performance seems to be quite good, limited primarily by device latency
and/or network bandwidth (>10KB/sec).

After I get a little further down the road (and get back from a short
trip) I'll complete testing and do some performance characterization.

After doing some performance measurement of v1.0, I found that my
Applesoft code for scanning requests and their parameters was slower
than I thought (I'm too used to my Zip Chip ;-). For a typical request,
it was taking about 1.5 seconds on a 1MHz machine! It's hard to afford
structure in Applesoft.

So I recoded the scanner to use Applesoft's DATA statement scanner,
and that speeded up request scanning by a factor of three--good enough
for government work. ;-) Version 1.1 works quite efficiently.

When that's satisfactory, I'll be writing it up and posting it on my
web site for people to play with, or just take a look at. I think
there is some value in publishing code that implements modest network
functionality concisely.

</brazen preannouncement>


I expect to finish up within the next week--now all I need are some
NadaNet users. ;-) (Bill Garber still has some NadaNet adapters
for anyone who'd rather buy than build...)

OK, it's out there. ;-)

It's linked prominently from my main page, as well as from new
"mentions" in several of the other articles.

There is a pretty complete performance section, with comparisons
to local floppy and local CFFA access.

The file server (FSERVER), two functional test programs (TEST.FSERVER
and TEST.FSERVER2), and a handy EXEC file for adding the file server
code to a client are all in a ShrinkIt archive for downloading.

For the record, getting the RUN command to work properly under all
circumstances was more difficult than I expected. ;-) (In the process
I finally picked a "standard" way to write FOR loops that are actually
DO..UNTIL loops.)

-michael

NadaNet networking for Apple II computers!
Home page: http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it's seriously underused."
.



Relevant Pages

  • Re: NadaNet file server coming soon...
    ... After each command is completed by the server, ... This allows any machine on a NadaNet to use the filesystem on the ... the request string can be formed by concatenating ... by doing a &PUTMSG to the predetermined file server queue number, ...
    (comp.sys.apple2)
  • Re: Replication/Sychronization and security
    ... request to the *file server* for the sectors of the file on disk ... A server database does not do the same thing at all. ... hands off the request to a process running on the server, ...
    (microsoft.public.access.security)
  • Re: VPN-XP question
    ... >I can get to my "server" from my laptop but it won't connect. ... > When I try to connect my firewall responds with a request ... > But there is no connection made. ... > my objective is to use this connection as a file server for a DB file ...
    (microsoft.public.windowsxp.general)
  • VPN-XP question
    ... I can get to my "server" from my laptop but it won't connect. ... When I try to connect my firewall responds with a request ... But there is no connection made. ... my objective is to use this connection as a file server for a DB file ...
    (microsoft.public.windowsxp.general)
  • [REVS] NTLM HTTP Authentication is Insecure By Design
    ... in front of a web server, and that proxy server shares a single TCP ... These are attacks that make use of non-RFC HTTP requests (HTTP Request ... the authentication is associated with the ...
    (Securiteam)