opentalk at large - sts 2005
DESCRIPTION
Multicasting and grid computing with OpentalkSmalltalk Solutions 2005TRANSCRIPT
![Page 1: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/1.jpg)
Opentalk at LargeOpentalk at Large
Martin Kobetic
Cincom Smalltalk Development
Smalltalk Solutions 2005
![Page 2: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/2.jpg)
OverviewOverview
Multicasting– IP Multicasting– Opentalk-Groups
Grid Computing– Introduction– Framework
![Page 3: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/3.jpg)
Join the GRID Demo !Join the GRID Demo !
Wireless AP– SSID: Blitzz– DHCP
Browse: http://192.168.1.3/pub Dowload:
– grid.im– grid.cha– VM– otminstaller.exe
![Page 4: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/4.jpg)
IP Multicasting: IntroIP Multicasting: Intro
IP range: 224.0.0.0-239.255.255.255API: datagram sockets (UDP)join/drop multicast grouploopback: on/offmulticast routing, IGMP, ttl
![Page 5: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/5.jpg)
IP Multicasting: SenderIP Multicasting: Sender
( SocketAccessorfamily: SocketAccessor AF_INETtype: SocketAccessor
SOCK_DGRAM) bindTo: IPSocketAddress
thisHostAnyPort
![Page 6: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/6.jpg)
IP Multicasting: SendingIP Multicasting: Sending
group := IPSocketAddresshostAddress: #[224 5 6 7]port: 4242.
(sender writeWaitWithTimeoutMs: 100)ifFalse: [
sendersendTo: groupbuffer: ‘Hello’ asByteArray ]
![Page 7: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/7.jpg)
IP Multicasting: ReceiverIP Multicasting: Receiver
( SocketAccessorfamily: SocketAccessor AF_INETtype: SocketAccessor SOCK_DGRAM
) soReuseAddr: true;bindTo: (IPSocketAddress
hostAddress: #[0 0 0 0]port: 4242);
join: (IPMulticastRequesttoAddress: #[224 5 6 7])
![Page 8: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/8.jpg)
IP Multicasting: ReceivingIP Multicasting: Receiving
sa := IPSocketAddress new.buf := ByteArray new: 5.(receiver readWaitWithTimeoutMs: 100)
ifFalse: [size := receiver
receiveFrom: sabuffer: buf
(buffer copyFrom: 1 to: size) asString ]
![Page 9: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/9.jpg)
Opentalk-Groups: IntroOpentalk-Groups: Intro
Object Group– brokers running on the same port– brokers join the same mcast address– receivers exported under the same OID– group proxy #(mcast-address, port, OID)
Remote Group Request– STSTOnewayRequest
![Page 10: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/10.jpg)
Opentalk-Groups: BrokerOpentalk-Groups: Broker
(BrokerConfiguration standardadaptor: (AdaptorConfiguration objectGroupstransport: (TransportConfiguration mcastmcastAddresses: #([224 5 6 7]);marshaler: MarshalerConfiguration stst
))) newAtPort: 4242
![Page 11: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/11.jpg)
Opentalk-Groups: ReceiverOpentalk-Groups: Receiver
receivers exported under the same OID
broker1 objectAdaptorexport: Transcript oid: #group.
broker2 objectAdaptorexport: Transcript oid: #group.
…
![Page 12: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/12.jpg)
Opentalk-Groups: SenderOpentalk-Groups: Sender
group proxy #(mcast-address, port, OID)
group := broker groupById: #group.group show: ‘Hello World!’
![Page 13: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/13.jpg)
Opentalk-Groups: SenderOpentalk-Groups: Sender
multiple mcast addresses
group := brokergroupAt: (IPSocketAddress
hostAddress: #[224 5 6 7]
port: 4242)id: #group.
group show: ‘Hello World!’
![Page 14: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/14.jpg)
OpenChat: UnicastOpenChat: Unicast
server: parties, sessions– add/remove parties– session management (invite/accept/decline…)
client: server, parties, session– messages (send/receive – via session)
session: server, parties– message broadcasting– party management (joining/leaving session)
![Page 15: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/15.jpg)
OpenChat: MulticastOpenChat: Multicast
group #all– joining:, alreadyIn:, leaving:– startSession: id for: originator with: party on: topic
session groups– accepting: id / declining: id– displayMessage: aString from: id– leavingSession: id
![Page 16: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/16.jpg)
Opentalk-GroupsOpentalk-Groups
one-way messages– Group Refs => multicasted messages– ObjRefs => unicasted messages
groups tied to the object table– constraints (only one export per object)– weakness (exported objects may get GCed)
packet size / fragmentation (UDP)
![Page 17: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/17.jpg)
Grid: IntroGrid: Intro
complex task & distributed resourcesSETI@home
resource discoveryresource configurationtask distributionresult collection
![Page 18: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/18.jpg)
Grid: DemoGrid: Demo
code breaking: RC4_40_MD5brute force but
– randomly selected ranges– ranges searched sequentially– looking for a known pattern
‘GET /’
![Page 19: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/19.jpg)
Grid: Demo SetupGrid: Demo Setup
http://192.168.1.3/pubgrid.im, grid.cha, VM
start the image (chmod u+x VM)launcher menu: Tools / Open Grid Droneset #id inst varinst var menu: ConnectIf asked for IP => 192.168.1.2:7777
![Page 20: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/20.jpg)
Grid: FrameworkGrid: Framework
Controller– task specific– maintains the grid– configures drones– distributes tasks– collects results
Drones– generic– looks for controller– joins/leaves grid– gets configured– executes tasks
![Page 21: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/21.jpg)
Grid: TaskGrid: Task
[ :range :size :ct |(range to: range + size - 1)
detect: [ :i || dt |arc setKey: i asByteArray.dt := arc decrypt: ct.dt “starts with ‘GET /’ ?” ]
ifNone: [nil] ]
![Page 22: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/22.jpg)
Grid: ConfigurationGrid: Configuration
task: <String>prerequisites: #(('ARC4' ''))imports: 'private Security.*'defaults: #(nil 2**task ct)bindings: #(#arc -> ‘ARC4 new’)
![Page 23: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/23.jpg)
Grid: ExecutionGrid: Execution
task parameters: chosen rangecallback selector: #reply:from:in: (default)callback recipient: controller (default)
![Page 24: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/24.jpg)
Grid: ExecutionGrid: Execution
[ | drone |drone := self next.key ifNil: [ | range |
range := “random unchecked range”drone goWith: range.count < tasks
ifNotNil: [ false ]] whileTrue.^((ARC4 key: key) decrypt: ct) asString.
![Page 25: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/25.jpg)
Grid: Result CollectionGrid: Result Collection
reply: anObject from: aDrone in: ms
count := count + 1anObject ifNotNil: [
key := anObject.winner := aDrone ].
self return: aDrone
![Page 26: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/26.jpg)
Grid: ChallengesGrid: Challenges
code in Strings– task– binding initializers
concurrency– control thread– working threads
![Page 27: Opentalk at Large - StS 2005](https://reader035.vdocuments.site/reader035/viewer/2022062514/5592b79b1a28ab47658b4592/html5/thumbnails/27.jpg)
Thank You!Thank You!
– /join #smalltalk (mk)
public Store repository bundles– OpentalkBase– OpenChat– Grid