Hmmmm ... no HTTP

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Hmmmm ... no HTTP

Chris Cunnington
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.

Correspondent has no protocols in its subclasses. Actually, there is no
HTTP at all that you could put into the #transport instvar, because it's
not in the image. Because HTTPServer is not in this alpha. I guess
there'd be a corresponding HTTPStream to put into HTTPServer.

WormholeServer>>initialize
     transport := (
                     (TCPStream transport)
                     beBinary;
                     port: 7777)

Neat things do go by watching with Wireshark: ModuleEdition;
TagsEdition; activeEditionOfMethodAt:; and "an instance of Array doesn't
understand #editionOfMethodAt:inClassWithBaseID:"

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

Chris
_______________________________________________
Spoon mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/spoon
Reply | Threaded
Open this post in threaded view
|

Re: Hmmmm ... no HTTP

ccrraaiigg

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