Re: Use ILU? (Was: Re: Information integration at client or server?)

Daniel W. Connolly (connolly@hal.com)
Fri, 22 Jul 1994 14:18:59 -0500


In message <Ii=ndRMB0KGW42uzwo@holmes.parc.xerox.com>, Bill Janssen writes:
>
>... a possibly useful tool is PARC's ILU system, a freely
>available object interface system which includes flexible object RPC
>code. I know that many of you are familiar with it. Using ILU would
>involve describing an interface in `ISL', ILU's Interface Specification
>Language.

>Just to give you the flavor, an *extremely* simple ISL description for a
>WWW server might be (I haven't tried to ``compile'' this :-):
>
> (* ======= interface for simple WWW service *)
> (* == Bill Janssen <janssen@parc.xerox.com> 20.7.94 *)
> INTERFACE WWW-Simple;

Boy... this looks familiar... Right after I read "Systems Programming
with Modula-3" I started messing around with interface specifications
of HTTP.

>From "Comments on HTTP spec"
http://www.hal.com/users/connolly/drafts/http-mime.html

>INTERFACE HTTP0_9;
> TYPE HTML = TEXT;
> TYPE SearchWords = REF ARRAY OF TEXT;
> TYPE Request = RECORD
> resource : TEXT;
> search : SearchWords = NIL;
> END;
> TYPE Response = RECORD
> structured : HTML;
> plain : TEXT = NIL;
> END;
>END HTTP0_9.
>
> For example,
>
>
>HTTP Modula
>Client:
> GET /foo/bar.html req = Request{resource="/foo/bar.html"}
>;
>Server:
> <PLAINTEXT> resp := Response{
> Four score and seven years ago structured="<PLAINTEXT>",
> today... plain="Four score and seven..."
>};
>
> or...
>
>
>HTTP Modula
>Client:
> GET /foo?a+b words := NEW(ARRAY[3] OF TEXT);
> words[0] := "a"; words[1] := "b";
> req = Request{resource="/foo",
> search = words);
>Server:
> <H1>Search Results
> </H1> r := Response{structured="<H1>Search...
>"};
> <A HREF="x1">r1>/A>
>
> The "1.0" style transaction is more involved... it looks like:
>
>
>INTERFACE MIME;
> TYPE Body = TEXT;
>
> TYPE BaseType = { text, audio, image, video,
> application, message, multipart, extension };
> TYPE SubType = { plain, enriched, basic, gif, jpeg, mpeg,
> octet_stream, postscript,
> rfc822, partial, external_body,
> alternative, mixed, parallel,
> extension };
>
> TYPE ContentType = OBJECT
> base : BaseType;
> xbase : TEXT;
> sub : SubType;
> xsub: TEXT;
> parameters : REF ARRAY OF RECORD
> name : TEXT;
> value : TEXT;
> END;
>
> TYPE BodyPart = OBJECT
> headers = REF ARRAY OF RECORD
> name : TEXT;
> value : TEXT;
> END;
> body : Body;
> METHODS
> contentType() : ContentType;
> decode() : TEXT; (* undoes Content-Transfer-Encoding *)
> END;
>END MIME.
>
>INTERFACE HTTP1_0;
> IMPORT MIME;
>
> TYPE SearchWords = REF ARRAY OF TEXT;
>
> TYPE Method = {'GET'};
>
> TYPE Request = RECORD
> method : Method;
> resource : TEXT;
> search : SearchWords;
> aux : MIME.BodyPart;
>
> TYPE Version = [0..999];
> TYPE StatusCode = [0..999];
> TYPE Line = TEXT; (* with no CR or LF chars *)
>
> TYPE Response = RECORD
> version : Version;
> code : StatusCode;
> reason : Line;
> object : MIME.BodyPart;
> END;
>END.
>
> Whew... that was a fun excercise. I'm not sure what the point of it
> was, except to attempt to specify HTTP at a more abstract level than
> sequences of characters.

ISL seems like a natural for this kind of thing... when I last
looked at it, there were some outstanding issues with data pipes.
Since it's not reasonable to require clients to marshal/unmarshal
entire objects (files etc.) in memory, we would certainly want
to use pipes in the HTTP protocol.

Other than that, we just need to come up with a "grandfather" transport
that uses TCP and RFC822 syntax. Then, once we have the abstraction
tested, we can replace the transport layer.

If anybody is working on this, let me know. I've done a bunch of
python prototyping in this area.

Dan

p.s. Mr. Janssen: I recall some oblique reference you made to
python support in ILU. I can't seem to find it anywhere in
the web rooted at ftp://parcftp.parc.xerox.com/pub/ilu/ilu.html

Is it available for alpha/beta testing?