Login  Register

Re: Hmmmm ... no HTTP

Posted by ccrraaiigg on Feb 18, 2012; 5:10pm
URL: https://forum.world.st/Hmmmm-no-HTTP-tp3794570p4400076.html


Hi Chris--

> I took out a book on HTTP to probe Spoon. Then I broke out Wireshark
> and watched messages from 62982 and the base image. Guess what? There
> is no use of HTTP anywhere. It's all TCP. That makes sense. There is
> TCPStream and no HTTPStream.

     Spoon uses the Flow streaming framework, which separates transport
(e.g., TCP) from session protocol (e.g., HTTP). Here's a partial look at
the ExternalStream hierarchy:

Object
  Stream
    PositionableStream (collection, position, readLimit)
      WritableStream (writeLimit)
        ExternalStream (resource, binary, indexOfLastDirtyElement,
                        singletonToWrite)
          FileStream (currentBufferIndex, previousPosition, writable)
            AppendingFileStream (appendStream, isWriteable)
            AppendingFileStreamWriter (readStream)
            RemoteFileStream
          NetStream (readingBufferSize, scarcityThreshold,
                     availability, scarcity, filling,
                     indexOfFirstWritableField, transcribeTraffic,
                     writingPosition, transcript,
                     availableSpaceStraddles, readingBufferLock)
            HardwareStream
              AudioStream
              IEEE1394Stream
              MIDIStream (devices, messageDispatcher,
                          nextIncomingPacket,
                          nextIncomingTimestamp, incomingPackets,
                          incomingPacketCollector, incomingPacketBytes)
              ParallelPortStream
              SerialPortStream
            SocketStream
              TCPStream
              UDPStream

and here's a partial look at the the Correspondent hierarchy:

Object
  Correspondent (stream, transport)
    Client
      IncomingClient (processing)
        IncomingHTTPClient
        IncomingTelnetClient
      OutgoingClient
        OutgoingHTTPClient
        OutgoingPOPClient
    Server (listening, clients, clientsLock)
      HTTPServer

Support for different session protocols is transport-independent. E.g.,
an HTTP client will run just as well over a serial line as a socket.

> Correspondent has no protocols in its subclasses.

     Sorry, I didn't put this part of Flow into that release of Spoon. I
was just trying to show the remote browsing demo, and get people to look
at the history system object model underlying it. HTTP comes into play
when communicating with the headless memories from traditional tools
(others are WebDAV and telnet).

> Spoon transports raw object memory as binary data on the TCP protocol.
> That's how it appears to me.

     More or less, yes. See the various implementations of
storeOnProxyStream:.


-C

--
Craig Latta
www.netjam.org/resume
+31   6 2757 7177
+ 1 415  287 3547


_______________________________________________
Spoon mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/spoon