SlideShare uma empresa Scribd logo
1 de 15
Baixar para ler offline
TEAMTALK
第109SMALLTALK勉強会
CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK
Quentin Plessis
(カンタン プレシ)
TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK
BACKGROUND
▸ Multi processing is not natively possible in Pharo Smalltalk
▸ To perform resource intensive operations, it is necessary to
split the load between several Pharo instances
▸ Efficiently setting up several Pharo instances is
troublesome
▸ Establishing communication between several Pharo
instances is tricky
TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK
BACKGROUND
▸ Multi processing is not natively possible in Pharo Smalltalk
▸ To perform resource intensive operations, it is necessary to
split the load between several Pharo instances
▸ Efficiently setting up several Pharo instances is
troublesome
▸ Establishing communication between several Pharo
instances is tricky
Docker image

https://github.com/mumez/pharo-vnc-supervisor
VerStix (Vert.x based communication tool)

https://github.com/mumez/VerStix

https://www.slideshare.net/umejava/verstix
▸ Pharo Smalltalk library making it possible to execute tasks
in a cluster of Pharos instances.
TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK
TEAMTALK
VerStix
Teamtalk
Teamtalk Server (Vert.x)
Producer
Pharo A
VerStix
Teamtalk
Worker
Pharo B
VerStix
Teamtalk
Worker
Pharo C
VerStix
Teamtalk
Worker
Pharo D
https://github.com/quentinplessis/Teamtalk
▸ Pharo Smalltalk library making it possible to execute tasks
in a cluster of Pharos instances.
TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK
TEAMTALK
VerStix
Teamtalk
Teamtalk Server (Vert.x)
Producer
Pharo A
VerStix
Teamtalk
Worker
Pharo B
VerStix
Teamtalk
Worker
Pharo C
VerStix
Teamtalk
Worker
Pharo D
TASK 1 TASK 2 TASK 3
https://github.com/quentinplessis/Teamtalk
TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK
PROTOCOL
AProducer
TASK 1
CB
Looking for Workers
Available!
Available!
Available!
Execute task
TASK 2Execute task
TASK 3Execute task
Executed TASK 1 RESULT 1
Executed TASK 2 RESULT 2
Executed TASK 3 RESULT 3
TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK
TASK FLOW
AProducer
Execution code
Input
Result
Result process code
Task
[ :input | input + 1 ]
1
[ :result | result inspect ]
‘[ :input | input + 1 ]’
1
[ :input | input + 1 ]
1
22
[ :input | input + 1 ]
1
2
[ :result | result inspect ]
2
TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK
REMARKS
▸ Support multiple producers
▸ Workers can be dynamically added / removed
▸ Pharo instances can be on different machines and use
different Pharo versions
▸ All communications are broadcasted throughout the
cluster
▸ Security issues are present but currently not dealt with
TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK
GETTING STARTED
▸ Install Teamtalk in two Pharos images A and B
▸ Setup Teamtalk server (docker must be installed and running)
▸ [Pharo Image A] Create a producer
▸ [Pharo Image B] Create a worker
▸ [Pharo Image A] Add a task to execute
docker run -p 8080:8080 plequen/teamtalk-server
Metacello new
baseline: 'Teamtalk';
repository: 'github://quentinplessis/Teamtalk/pharo-repository';
load.
producer := TTProducer host: 'localhost' port: 8080.
worker := TTWorker host: 'localhost' port: 8080.
task := TTTask
executionCode: [ :input |
input + 1
]
resultProcessCode: [ :result |
result inspect.
]
input: 1.
producer addTask: task.
TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK
TASK EXAMPLES
producer addTask: (TTTask executionCode: [ 1 inspect. 5 seconds wait. nil ]).
producer addTask: (TTTask executionCode: [ 2 inspect. 5 seconds wait. nil ]).
producer addTask: (TTTask executionCode: [ 3 inspect. 5 seconds wait. nil ]).
producer addTask: (TTTask executionCode: [ 4 inspect. 5 seconds wait. nil ]).
https://github.com/quentinplessis/Teamtalk
start := DateAndTime now.
number := 4.
i := 0.
number timesRepeat: [
task := TTTask
executionCode: [
10 seconds wait.
'OK' inspect.
'OK'
]
resultProcessCode: [ :result |
i := i + 1.
i = number ifTrue: [
(DateAndTime now asUnixTime - start asUnixTime) inspect
].
].
producer addTask: task.
].
task := TTTask
executionCode: [
ZnClient new get: 'https://www.google.com/'.
]
resultProcessCode: [ :result |
result inspect.
].
producer addTask: task.
TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK
CLUSTER MANAGEMENT https://github.com/quentinplessis/Teamtalk#cluster-setup
▸ Install Teamtalk in a Pharo image Teamtalk.image
▸ Setup a Teamtalk server on port 8080
▸ Add consumers, potentially on different machines
▸ Add a producer
requires docker and ruby
export TEAMTALK_SERVER_PORT=8080
ruby spawner.rb --create-server $TEAMTALK_SERVER_PORT

ifconfig | grep inet
export TEAMTALK_SERVER_IP=.....
ruby spawner.rb --create-consumer --pharo-image ./Teamtalk.image --server-host
$TEAMTALK_SERVER_IP --server-port $TEAMTALK_SERVER_PORT
ruby spawner.rb --create-consumer --pharo-image ./Teamtalk.image --server-host
$TEAMTALK_SERVER_IP --server-port $TEAMTALK_SERVER_PORT
ruby spawner.rb --create-consumer --pharo-image ./Teamtalk.image --server-host
$TEAMTALK_SERVER_IP --server-port $TEAMTALK_SERVER_PORT
ruby spawner.rb --create-producer --pharo-image ./Teamtalk.image --server-host
$TEAMTALK_SERVER_IP --server-port $TEAMTALK_SERVER_PORT
TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK
MAP REDUCE
TASK
SUB TASK
SUB TASK
SUB TASK
SUB TASK
SUB TASK
SUB RESULT
SUB RESULT
SUB RESULT
SUB RESULT
SUB RESULT
RESULT
MAP
REDUCESPLIT
TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK
MAP REDUCE WITH TEAMTALK
▸ Examples: https://github.com/quentinplessis/Teamtalk#mapreduce
mapReduce := (TTMapReduce
splitBlockForInput: [ :input :tasksNumber |
"split input into sub inputs here"
]
mapBlockForSubInput: [ :subInput |
"process sub inputs here"
"map sub input to sub result"
]
reduceBlockWithCallback: [ :results :callback |
"reduce sub results here"
callback value: results
])
ttClientClass: TTProducer;
host: 'localhost';
port: 8080;
yourself.
mapReduce
input: { }
tasksNumber: 4
callbackDo: [ :result | result inspect ].
TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK
IMPROVEMENTS
▸ Add labels to tasks for selective worker selection
▸ Propagate error handling from worker to producer
▸ Improve security
▸ Improve protocol to support additional languages
▸ Add a vote-based task scheduling system to remove the need for
producers to manage their tasks
▸ Add mechanism to handle loss of worker during task execution
▸ …
TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK
TEAMTALK

Mais conteúdo relacionado

Mais procurados

Terraform AWS modules and some best practices - September 2019
Terraform AWS modules and some best practices - September 2019Terraform AWS modules and some best practices - September 2019
Terraform AWS modules and some best practices - September 2019Anton Babenko
 
Simplify and run your development environments with Vagrant on OpenStack
Simplify and run your development environments with Vagrant on OpenStackSimplify and run your development environments with Vagrant on OpenStack
Simplify and run your development environments with Vagrant on OpenStackB1 Systems GmbH
 
Os dev tool box
Os dev tool boxOs dev tool box
Os dev tool boxbpowell29a
 
Fabricio - Docker deploy automation
Fabricio - Docker deploy automationFabricio - Docker deploy automation
Fabricio - Docker deploy automationRinat Khabibiev
 
Conan.io - The C/C++ package manager for Developers
Conan.io - The C/C++ package manager for DevelopersConan.io - The C/C++ package manager for Developers
Conan.io - The C/C++ package manager for DevelopersUilian Ries
 
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...Puppet
 
今すぐ始めるCloud Foundry #hackt #hackt_k
今すぐ始めるCloud Foundry #hackt #hackt_k今すぐ始めるCloud Foundry #hackt #hackt_k
今すぐ始めるCloud Foundry #hackt #hackt_kToshiaki Maki
 
Continuous delivery with docker
Continuous delivery with dockerContinuous delivery with docker
Continuous delivery with dockerJohan Janssen
 
Automating Mendix application deployments with Nix
Automating Mendix application deployments with NixAutomating Mendix application deployments with Nix
Automating Mendix application deployments with NixSander van der Burg
 
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...Dexter Horthy
 
PuppetConf 2017: Use Puppet to Tame the Dockerfile Monster- Bryan Belanger, A...
PuppetConf 2017: Use Puppet to Tame the Dockerfile Monster- Bryan Belanger, A...PuppetConf 2017: Use Puppet to Tame the Dockerfile Monster- Bryan Belanger, A...
PuppetConf 2017: Use Puppet to Tame the Dockerfile Monster- Bryan Belanger, A...Puppet
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy Systemadrian_nye
 
Docker command
Docker commandDocker command
Docker commandEric Ahn
 
Cloud focker を試してみた public
Cloud focker を試してみた   publicCloud focker を試してみた   public
Cloud focker を試してみた publicTakehiko Amano
 
Conan a C/C++ Package Manager
Conan a C/C++ Package ManagerConan a C/C++ Package Manager
Conan a C/C++ Package ManagerUilian Ries
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with DockerPatrick Mizer
 
Tomcat from a cluster to the cloud on RP3
Tomcat from a cluster to the cloud on RP3Tomcat from a cluster to the cloud on RP3
Tomcat from a cluster to the cloud on RP3Jean-Frederic Clere
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionBen Hall
 

Mais procurados (20)

Terraform AWS modules and some best practices - September 2019
Terraform AWS modules and some best practices - September 2019Terraform AWS modules and some best practices - September 2019
Terraform AWS modules and some best practices - September 2019
 
Simplify and run your development environments with Vagrant on OpenStack
Simplify and run your development environments with Vagrant on OpenStackSimplify and run your development environments with Vagrant on OpenStack
Simplify and run your development environments with Vagrant on OpenStack
 
Os dev tool box
Os dev tool boxOs dev tool box
Os dev tool box
 
Dockerizing pharo
Dockerizing pharoDockerizing pharo
Dockerizing pharo
 
Fabricio - Docker deploy automation
Fabricio - Docker deploy automationFabricio - Docker deploy automation
Fabricio - Docker deploy automation
 
Conan.io - The C/C++ package manager for Developers
Conan.io - The C/C++ package manager for DevelopersConan.io - The C/C++ package manager for Developers
Conan.io - The C/C++ package manager for Developers
 
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
 
今すぐ始めるCloud Foundry #hackt #hackt_k
今すぐ始めるCloud Foundry #hackt #hackt_k今すぐ始めるCloud Foundry #hackt #hackt_k
今すぐ始めるCloud Foundry #hackt #hackt_k
 
Continuous delivery with docker
Continuous delivery with dockerContinuous delivery with docker
Continuous delivery with docker
 
Automating Mendix application deployments with Nix
Automating Mendix application deployments with NixAutomating Mendix application deployments with Nix
Automating Mendix application deployments with Nix
 
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
 
PuppetConf 2017: Use Puppet to Tame the Dockerfile Monster- Bryan Belanger, A...
PuppetConf 2017: Use Puppet to Tame the Dockerfile Monster- Bryan Belanger, A...PuppetConf 2017: Use Puppet to Tame the Dockerfile Monster- Bryan Belanger, A...
PuppetConf 2017: Use Puppet to Tame the Dockerfile Monster- Bryan Belanger, A...
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
 
Docker command
Docker commandDocker command
Docker command
 
Cloud focker を試してみた public
Cloud focker を試してみた   publicCloud focker を試してみた   public
Cloud focker を試してみた public
 
Conan a C/C++ Package Manager
Conan a C/C++ Package ManagerConan a C/C++ Package Manager
Conan a C/C++ Package Manager
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with Docker
 
Vagrant
VagrantVagrant
Vagrant
 
Tomcat from a cluster to the cloud on RP3
Tomcat from a cluster to the cloud on RP3Tomcat from a cluster to the cloud on RP3
Tomcat from a cluster to the cloud on RP3
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
 

Semelhante a Teamtalk - Cluster Computing Library for Pharo Smalltalk

Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in developmentAdam Culp
 
Docker and fig for dev
Docker and fig for devDocker and fig for dev
Docker and fig for devpranas_algoteq
 
Continuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierContinuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierCarlos Sanchez
 
Docker for data science
Docker for data scienceDocker for data science
Docker for data scienceCalvin Giles
 
Docker & Kubernetes
Docker & KubernetesDocker & Kubernetes
Docker & KubernetesTroy Harvey
 
[Hands-on 필수 준비 사항] 쇼핑몰 예제를 통한 Microservice 개발/배포 실습 - 황주필 부장 / 강인호 부장, 한국오라클
[Hands-on 필수 준비 사항] 쇼핑몰 예제를 통한 Microservice 개발/배포 실습 - 황주필 부장 / 강인호 부장, 한국오라클[Hands-on 필수 준비 사항] 쇼핑몰 예제를 통한 Microservice 개발/배포 실습 - 황주필 부장 / 강인호 부장, 한국오라클
[Hands-on 필수 준비 사항] 쇼핑몰 예제를 통한 Microservice 개발/배포 실습 - 황주필 부장 / 강인호 부장, 한국오라클Oracle Korea
 
Minimum Viable Docker: our journey towards orchestration
Minimum Viable Docker: our journey towards orchestrationMinimum Viable Docker: our journey towards orchestration
Minimum Viable Docker: our journey towards orchestrationOutlyer
 
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz LachJDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz LachPROIDEA
 
Things I've learned working with Docker Support
Things I've learned working with Docker SupportThings I've learned working with Docker Support
Things I've learned working with Docker SupportSujay Pillai
 
Fabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymoreFabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymoreHenryk Konsek
 
Dockerize Laravel Application
Dockerize Laravel ApplicationDockerize Laravel Application
Dockerize Laravel ApplicationAfrimadoni Dinata
 
Quick & Easy Dev Environments with Vagrant
Quick & Easy Dev Environments with VagrantQuick & Easy Dev Environments with Vagrant
Quick & Easy Dev Environments with VagrantJoe Ferguson
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker皓鈞 張
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境謝 宗穎
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetAchieve Internet
 
Cacoo enterprise installation_manual
Cacoo enterprise installation_manualCacoo enterprise installation_manual
Cacoo enterprise installation_manualjoseig23
 
[Hands-on 필수준비사항] Oracle Developer Meetup 3rd | Jan 27th, 2018
[Hands-on 필수준비사항] Oracle Developer Meetup 3rd | Jan 27th, 2018[Hands-on 필수준비사항] Oracle Developer Meetup 3rd | Jan 27th, 2018
[Hands-on 필수준비사항] Oracle Developer Meetup 3rd | Jan 27th, 2018Oracle Korea
 

Semelhante a Teamtalk - Cluster Computing Library for Pharo Smalltalk (20)

Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in development
 
Docker and fig for dev
Docker and fig for devDocker and fig for dev
Docker and fig for dev
 
Continuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierContinuous Delivery: The Next Frontier
Continuous Delivery: The Next Frontier
 
The state of the swarm
The state of the swarmThe state of the swarm
The state of the swarm
 
Docker for data science
Docker for data scienceDocker for data science
Docker for data science
 
Docker & Kubernetes
Docker & KubernetesDocker & Kubernetes
Docker & Kubernetes
 
[Hands-on 필수 준비 사항] 쇼핑몰 예제를 통한 Microservice 개발/배포 실습 - 황주필 부장 / 강인호 부장, 한국오라클
[Hands-on 필수 준비 사항] 쇼핑몰 예제를 통한 Microservice 개발/배포 실습 - 황주필 부장 / 강인호 부장, 한국오라클[Hands-on 필수 준비 사항] 쇼핑몰 예제를 통한 Microservice 개발/배포 실습 - 황주필 부장 / 강인호 부장, 한국오라클
[Hands-on 필수 준비 사항] 쇼핑몰 예제를 통한 Microservice 개발/배포 실습 - 황주필 부장 / 강인호 부장, 한국오라클
 
Minimum Viable Docker: our journey towards orchestration
Minimum Viable Docker: our journey towards orchestrationMinimum Viable Docker: our journey towards orchestration
Minimum Viable Docker: our journey towards orchestration
 
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz LachJDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
 
Things I've learned working with Docker Support
Things I've learned working with Docker SupportThings I've learned working with Docker Support
Things I've learned working with Docker Support
 
Simple docker hosting in FIWARE Lab
Simple docker hosting in FIWARE LabSimple docker hosting in FIWARE Lab
Simple docker hosting in FIWARE Lab
 
Fabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymoreFabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymore
 
Dockerize Laravel Application
Dockerize Laravel ApplicationDockerize Laravel Application
Dockerize Laravel Application
 
Quick & Easy Dev Environments with Vagrant
Quick & Easy Dev Environments with VagrantQuick & Easy Dev Environments with Vagrant
Quick & Easy Dev Environments with Vagrant
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
 
Mcollective introduction
Mcollective introductionMcollective introduction
Mcollective introduction
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and Puppet
 
Cacoo enterprise installation_manual
Cacoo enterprise installation_manualCacoo enterprise installation_manual
Cacoo enterprise installation_manual
 
[Hands-on 필수준비사항] Oracle Developer Meetup 3rd | Jan 27th, 2018
[Hands-on 필수준비사항] Oracle Developer Meetup 3rd | Jan 27th, 2018[Hands-on 필수준비사항] Oracle Developer Meetup 3rd | Jan 27th, 2018
[Hands-on 필수준비사항] Oracle Developer Meetup 3rd | Jan 27th, 2018
 

Último

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 

Último (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 

Teamtalk - Cluster Computing Library for Pharo Smalltalk

  • 1. TEAMTALK 第109SMALLTALK勉強会 CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK Quentin Plessis (カンタン プレシ)
  • 2. TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK BACKGROUND ▸ Multi processing is not natively possible in Pharo Smalltalk ▸ To perform resource intensive operations, it is necessary to split the load between several Pharo instances ▸ Efficiently setting up several Pharo instances is troublesome ▸ Establishing communication between several Pharo instances is tricky
  • 3. TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK BACKGROUND ▸ Multi processing is not natively possible in Pharo Smalltalk ▸ To perform resource intensive operations, it is necessary to split the load between several Pharo instances ▸ Efficiently setting up several Pharo instances is troublesome ▸ Establishing communication between several Pharo instances is tricky Docker image
 https://github.com/mumez/pharo-vnc-supervisor VerStix (Vert.x based communication tool)
 https://github.com/mumez/VerStix
 https://www.slideshare.net/umejava/verstix
  • 4. ▸ Pharo Smalltalk library making it possible to execute tasks in a cluster of Pharos instances. TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK TEAMTALK VerStix Teamtalk Teamtalk Server (Vert.x) Producer Pharo A VerStix Teamtalk Worker Pharo B VerStix Teamtalk Worker Pharo C VerStix Teamtalk Worker Pharo D https://github.com/quentinplessis/Teamtalk
  • 5. ▸ Pharo Smalltalk library making it possible to execute tasks in a cluster of Pharos instances. TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK TEAMTALK VerStix Teamtalk Teamtalk Server (Vert.x) Producer Pharo A VerStix Teamtalk Worker Pharo B VerStix Teamtalk Worker Pharo C VerStix Teamtalk Worker Pharo D TASK 1 TASK 2 TASK 3 https://github.com/quentinplessis/Teamtalk
  • 6. TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK PROTOCOL AProducer TASK 1 CB Looking for Workers Available! Available! Available! Execute task TASK 2Execute task TASK 3Execute task Executed TASK 1 RESULT 1 Executed TASK 2 RESULT 2 Executed TASK 3 RESULT 3
  • 7. TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK TASK FLOW AProducer Execution code Input Result Result process code Task [ :input | input + 1 ] 1 [ :result | result inspect ] ‘[ :input | input + 1 ]’ 1 [ :input | input + 1 ] 1 22 [ :input | input + 1 ] 1 2 [ :result | result inspect ] 2
  • 8. TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK REMARKS ▸ Support multiple producers ▸ Workers can be dynamically added / removed ▸ Pharo instances can be on different machines and use different Pharo versions ▸ All communications are broadcasted throughout the cluster ▸ Security issues are present but currently not dealt with
  • 9. TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK GETTING STARTED ▸ Install Teamtalk in two Pharos images A and B ▸ Setup Teamtalk server (docker must be installed and running) ▸ [Pharo Image A] Create a producer ▸ [Pharo Image B] Create a worker ▸ [Pharo Image A] Add a task to execute docker run -p 8080:8080 plequen/teamtalk-server Metacello new baseline: 'Teamtalk'; repository: 'github://quentinplessis/Teamtalk/pharo-repository'; load. producer := TTProducer host: 'localhost' port: 8080. worker := TTWorker host: 'localhost' port: 8080. task := TTTask executionCode: [ :input | input + 1 ] resultProcessCode: [ :result | result inspect. ] input: 1. producer addTask: task.
  • 10. TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK TASK EXAMPLES producer addTask: (TTTask executionCode: [ 1 inspect. 5 seconds wait. nil ]). producer addTask: (TTTask executionCode: [ 2 inspect. 5 seconds wait. nil ]). producer addTask: (TTTask executionCode: [ 3 inspect. 5 seconds wait. nil ]). producer addTask: (TTTask executionCode: [ 4 inspect. 5 seconds wait. nil ]). https://github.com/quentinplessis/Teamtalk start := DateAndTime now. number := 4. i := 0. number timesRepeat: [ task := TTTask executionCode: [ 10 seconds wait. 'OK' inspect. 'OK' ] resultProcessCode: [ :result | i := i + 1. i = number ifTrue: [ (DateAndTime now asUnixTime - start asUnixTime) inspect ]. ]. producer addTask: task. ]. task := TTTask executionCode: [ ZnClient new get: 'https://www.google.com/'. ] resultProcessCode: [ :result | result inspect. ]. producer addTask: task.
  • 11. TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK CLUSTER MANAGEMENT https://github.com/quentinplessis/Teamtalk#cluster-setup ▸ Install Teamtalk in a Pharo image Teamtalk.image ▸ Setup a Teamtalk server on port 8080 ▸ Add consumers, potentially on different machines ▸ Add a producer requires docker and ruby export TEAMTALK_SERVER_PORT=8080 ruby spawner.rb --create-server $TEAMTALK_SERVER_PORT
 ifconfig | grep inet export TEAMTALK_SERVER_IP=..... ruby spawner.rb --create-consumer --pharo-image ./Teamtalk.image --server-host $TEAMTALK_SERVER_IP --server-port $TEAMTALK_SERVER_PORT ruby spawner.rb --create-consumer --pharo-image ./Teamtalk.image --server-host $TEAMTALK_SERVER_IP --server-port $TEAMTALK_SERVER_PORT ruby spawner.rb --create-consumer --pharo-image ./Teamtalk.image --server-host $TEAMTALK_SERVER_IP --server-port $TEAMTALK_SERVER_PORT ruby spawner.rb --create-producer --pharo-image ./Teamtalk.image --server-host $TEAMTALK_SERVER_IP --server-port $TEAMTALK_SERVER_PORT
  • 12. TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK MAP REDUCE TASK SUB TASK SUB TASK SUB TASK SUB TASK SUB TASK SUB RESULT SUB RESULT SUB RESULT SUB RESULT SUB RESULT RESULT MAP REDUCESPLIT
  • 13. TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK MAP REDUCE WITH TEAMTALK ▸ Examples: https://github.com/quentinplessis/Teamtalk#mapreduce mapReduce := (TTMapReduce splitBlockForInput: [ :input :tasksNumber | "split input into sub inputs here" ] mapBlockForSubInput: [ :subInput | "process sub inputs here" "map sub input to sub result" ] reduceBlockWithCallback: [ :results :callback | "reduce sub results here" callback value: results ]) ttClientClass: TTProducer; host: 'localhost'; port: 8080; yourself. mapReduce input: { } tasksNumber: 4 callbackDo: [ :result | result inspect ].
  • 14. TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK IMPROVEMENTS ▸ Add labels to tasks for selective worker selection ▸ Propagate error handling from worker to producer ▸ Improve security ▸ Improve protocol to support additional languages ▸ Add a vote-based task scheduling system to remove the need for producers to manage their tasks ▸ Add mechanism to handle loss of worker during task execution ▸ …
  • 15. TEAMTALK - CLUSTER COMPUTING LIBRARY FOR PHARO SMALLTALK TEAMTALK