🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.protocols.iso.dev-environ
Article #779

Re: Pepy

#779
From: David Herron -- NonResident E-Ma...
Date: Thu, 15 Feb 1990 14:11
49 lines
2991 bytes
Kevin,

>      The problem: PEPY creates structures with  pointers  to
> other  structures  containing pointers and so on. We need to
> pass a "message" between processes composed of these  struc-
> tures.   To  accomplish  this over a socket leaves a "piece-
> meal" approach as the only alternative for a bcopy. This  is
> totally unacceptable, does anyone know of a way to have PEPY
> generate "instances" rather than pointers??


This sounds like a general purpose data structures problem.  In fact,
I once faced a similar problem long ago while writing a BASIC
interpretor.  Had a compiler in one process (This was PDP-11 days..)
which was generating a data structure and the interpretor in another
process.  Problem was how to communicate that data structure since
the pointers were only good for that address space.

At the time I punted and turned the data structure into an ASCII
file containing an intermediate language which looked a whole lot
like FORTH.  I also wrote a forth-ish interpretor for it.

Now that I think about it again..  you can treat the packet of data you
send across the socket as an "address space".  That is, it's an array
of bytes just like any other address space, just quite a bit smaller.
You copy the PEPY structure & all the subsidiary structures into this
array and while doing so translate the pointers into offsets within the
array (or new addresses in a new virtual address space).  You should
also keep a translation table of other mappings already done in case
you use the same pointer multiple times.

When communicating it over the socket you'll need a header giving which
data structure it is and how many bytes follow.

On the receiving end you have another address-space translation.

I'm afraid that this doesn't generalize well into a general purpose routine.
But at least it's only two routines to write.  (Yes!  I know!  two routines
per data structure!  And ISODE has a *LOT* of data structures!)
--
<- David Herron; an MMDF guy                              <david@ms.uky.edu>
<- ska: David le casse\*'      {rutgers,uunet}!ukma!david, david@UKMA.BITNET
<- Coming to a nameserver near you --SOON--: david@davids.mmdf.com
<- 	(until then, david%davids.mmdf.com@rutgers.edu will work)
--
<- David Herron; an MMDF guy                              <david@ms.uky.edu>
<- ska: David le casse\*'      {rutgers,uunet}!ukma!david, david@UKMA.BITNET
<- Coming to a nameserver near you --SOON--: david@davids.mmdf.com
<- 	(until then, david%davids.mmdf.com@rutgers.edu will work)
Technical Details
Message-ID: <9002150911.aa23335@g.e.ms.uky.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ucbvax!ms.uky.edu!david

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ucbvax!ms.uky.edu!david
From: david@ms.uky.edu (David Herron -- NonResident E-Mail Hack)
Newsgroups: comp.protocols.iso.dev-environ
Subject: Re: Pepy
Message-ID: <9002150911.aa23335@g.e.ms.uky.edu>
Date: 15 Feb 90 14:11:09 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Distribution: inet
Organization: U of Kentucky Mathematical Sciences
Lines: 49