Newsgroups: comp.sys.transputer
From: robbel@fwi.uva.nl (Robert Belleman)
Subject: OCCAM: Best way to multiplex protocols over one link?
Organization: FWI, University of Amsterdam
Date: 29 Apr 1994 14:27:20 GMT
Message-ID: <2pr5g8$2ai@mail.fwi.uva.nl>

I was wondering; in occam, what do you consider the best way to
multiplex different process protocols over one link?
So, something like this:


  proc1 <---> +-----+     transputer     +-----+ <---> proc1
  proc2 <---> | mux | <----------------> | mux | <---> proc2
  proc3 <---> +-----+        link        +-----+ <---> proc3

     processor 1                          processor 2


Channel protocols of the respective processes on either processor
are the same, while proc[1..3] protocols are different. Ideally,
the multiplexor should be such, that for each process it seems as
if it is directly talking to its partner (disregarding delays of
course).

Do you simply allocate a buffer in PROC mux() big enough to hold
whatever message can come from proc[1..3] and do you let it recognise
all protocols? Or is there a better way?

I have been experimenting with channel RETYPEs, but ran in loads of
trouble, especially since most of my processes need variant protocols
containing counted array protocols.

-- Rob

-- 
[] Robert Belleman              robbel@fwi.uva.nl     "If life is a stage,  []
[] Dept. of Computer Systems    robbel@nki.nl          I want some better   []
[] University of Amsterdam                             lighting."           []
[] the Netherlands.                                                         []

