Smalltalk Peer-to-Peer Networking

January 22, 2011

Smalltalk Peer-to-Peer Networking

Smalltalk Peer-to-Peer Networking


http://www.silversmalltalk.com/
http://www.silversmalltalk.com/index2.html

In the image above, there are four browsers open.
Clockwise from the top left:
— Chrome running SST/JavaScript
— Opera running SST/Silverlight
— Firefox running SST/Silverlight
— Safari running SST/Silverlight

In each of the three SST/Silverlight browsers, I have opened a game board for ‘Tic-Tac-Toe’.

In the SST/JavaScript browser, I have opened a Workspace and executed the following Smalltalk code:

| dict |
dict := Dictionary new.
dict at: '0' put: 'S'.
dict at: '1' put: 'M'.
dict at: '2' put: 'A'.
dict at: '3' put: 'L'.
dict at: '4' put: 'L'.
dict at: '5' put: 'T'.
dict at: '6' put: 'A'.
dict at: '7' put: 'L'.
dict at: '8' put: 'K'.
Channel send: 't3-demo-1' msg: dict

And the Tic-Tac-Toe boards in each of the other browsers immediately changed to read “S-M-A-L-L-T-A-L-K”.

To try this yourself, open a Tic-Tac-Toe board in any SST/Silverlight browser (first link at the top) – choose “Demos” from desktop menu, choose Tic-Tac-Toe, and “DoIt” from the context menu in the right panel. Then open an SST/JavaScript browser (second link at the top), place the above code in the Workspace, select it, and “PrintIt” from the context menu.

What is happening here is that I am sending a Smalltalk dictionary object by Google ChannelAPI from SST/JavaScript to three instances of SST/Silverlight. The Smalltalk dictionary is deserialized by the receiving Smalltalk interpreters and is then used to set the game board positions.

This is peer-to-peer transmission of a Smalltalk object between two different versions of Silver Smalltalk (JavaScript and Silverlight).

Once the other versions of Sillver Smalltalk are released (ActionScript, Java, and Objective-C) it should be possible to send Smalltalk objects amongst any of the current user environments:
— .Net desktop
— Silverlight
— Android
— JavaScript
— Flash/AIR
— iPhone/iPad

Write once, run anywhere….?

2 Responses to “Smalltalk Peer-to-Peer Networking”

  1. Andy Burnett Says:

    I think this is one of the most exciting aspects of the SST project. The ability to, easily , build real time collaborative tools is just amazing!


  2. […] This post was mentioned on Twitter by Planet Lang, Sungjin Park. Sungjin Park said: P2p가 웹으로 들어오나 RT @planet_lang [Smalltalk] Smalltalk Peer-to-Peer Networking: http://bit.ly/e08lGw […]


Leave a comment