SlideShare una empresa de Scribd logo
1 de 15
Jared Mooring
Platform Engineer
Former lead developer
• BigPond GameArena
• BigPond Kids
• BigPond Prepaid
• Ausgamers
What is distribution?
It seems to be a ‘buzz word’ at the moment
'A distributed system consists of multiple autonomous
computers that communicate through a computer network.
The computers interact with each other in order to achieve
a common goal' – wikipedia
Share the work, sharing is caring!
SCENARIO
– PHOTO GALLERY
1. User uploads photo through
form
2. Photo get resized – thumb,
medium, original
3. Web server resizes images
4. Stores new sizes on disk
5. Display resized photos
Issues?
Web server is meant to server HTTP requests
– Why should it do the heavy lifting?
– Be kind to your presentation server(s)
CPU spent on resizing images
Alternative - Distribute
Job
Worker
Job
Server
Job
Request
ApacheUser
Upload
Image
Process
Request
Request to
resize image
Receive
request
Idle worker
Idle Worker
Idle Worker
Resize
image
Wait for other
connections
Message Queue Systems
Store data as a ‘message’ for processing
– Serialized objects
– Text
Allows different applications to interact
– Includes different operating systems
– Different languages
Message Persistence
– RAM: Memcache
– DB: mySQL, SQLite, PostgreSQL
Introducing
‘Gearman provides a generic application framework to
farm out work to other machines or processes that are
better suited to do the work’ - http://gearman.org
Basics
Gearman Layer
Server Manages jobs / Multiple instances
Client Makes request to job server – it wants work done!
Worker Performs job / Tells server what it can do / Distributed
Example Time
http://gearman.org
–Source / Repositories
API available through PECL
–http://pecl.php.net/package/gearman
–http://php.net/manual/en/book.gearman.php
Drivers available for other languages
–Perl
–Python
–Java
–.NET
How are Yahoo!7 using it?
Platform for distributing management of content
– Developers are able to build distributed plugins
– Individual business units
Building feeds RSS/MRSS
Video transcoding
– Allows us to add new nodes easily
– Distributed managed transcoding
Who else is using it?
ALL DONE! THANK YOU
Twitter: @jadzor
Forward Pass: http://fwdpass.it/bN4Q4v
MammothVPS Coupon:
–http://www.mammothvps.com.au
–SYDPHP

Más contenido relacionado

Destacado

Hunter Marketing Group May 2016
Hunter Marketing Group May 2016Hunter Marketing Group May 2016
Hunter Marketing Group May 2016blaifsky
 
208140104 안혜진
208140104 안혜진208140104 안혜진
208140104 안혜진AnHYeJin
 
Visual dictionary-Sp10Ashlar
Visual dictionary-Sp10AshlarVisual dictionary-Sp10Ashlar
Visual dictionary-Sp10AshlarSp10Ashlar
 
Nevada west bni cyber focus 7-min
Nevada west bni cyber focus 7-minNevada west bni cyber focus 7-min
Nevada west bni cyber focus 7-minblaifsky
 
K548 family journal iii
K548 family journal iiiK548 family journal iii
K548 family journal iiiguesteee0595
 
Manage Your Likes - 1. Międzynarodowy Czwartek Social Media w Katowicach
Manage Your Likes - 1. Międzynarodowy Czwartek Social Media w KatowicachManage Your Likes - 1. Międzynarodowy Czwartek Social Media w Katowicach
Manage Your Likes - 1. Międzynarodowy Czwartek Social Media w KatowicachMartin Felcman
 
Lisa batiz
Lisa batizLisa batiz
Lisa batizblaifsky
 
06 dolor abdominal_agudo
06 dolor abdominal_agudo06 dolor abdominal_agudo
06 dolor abdominal_agudoMedlab
 
Desert oasis lawn care
Desert oasis lawn careDesert oasis lawn care
Desert oasis lawn careblaifsky
 

Destacado (14)

Hunter Marketing Group May 2016
Hunter Marketing Group May 2016Hunter Marketing Group May 2016
Hunter Marketing Group May 2016
 
208140104 안혜진
208140104 안혜진208140104 안혜진
208140104 안혜진
 
Visual dictionary-Sp10Ashlar
Visual dictionary-Sp10AshlarVisual dictionary-Sp10Ashlar
Visual dictionary-Sp10Ashlar
 
Nevada west bni cyber focus 7-min
Nevada west bni cyber focus 7-minNevada west bni cyber focus 7-min
Nevada west bni cyber focus 7-min
 
K548 family journal iii
K548 family journal iiiK548 family journal iii
K548 family journal iii
 
Manage Your Likes - 1. Międzynarodowy Czwartek Social Media w Katowicach
Manage Your Likes - 1. Międzynarodowy Czwartek Social Media w KatowicachManage Your Likes - 1. Międzynarodowy Czwartek Social Media w Katowicach
Manage Your Likes - 1. Międzynarodowy Czwartek Social Media w Katowicach
 
Power point
Power pointPower point
Power point
 
Tufik
TufikTufik
Tufik
 
Figueres tintinaire
Figueres tintinaireFigueres tintinaire
Figueres tintinaire
 
Teclejant vinyetes
Teclejant vinyetesTeclejant vinyetes
Teclejant vinyetes
 
Lisa batiz
Lisa batizLisa batiz
Lisa batiz
 
06 dolor abdominal_agudo
06 dolor abdominal_agudo06 dolor abdominal_agudo
06 dolor abdominal_agudo
 
Desert oasis lawn care
Desert oasis lawn careDesert oasis lawn care
Desert oasis lawn care
 
L’enigma lartsinim
L’enigma lartsinimL’enigma lartsinim
L’enigma lartsinim
 

Similar a Distributed Systems and Gearman

Understanding Computers: Today and Tomorrow, 13th Edition Chapter 5 - System ...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 5 - System ...Understanding Computers: Today and Tomorrow, 13th Edition Chapter 5 - System ...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 5 - System ...yaminohime
 
Operating Systems Structure1- Explain briefly why the objectives o.pdf
Operating Systems Structure1- Explain briefly why the objectives o.pdfOperating Systems Structure1- Explain briefly why the objectives o.pdf
Operating Systems Structure1- Explain briefly why the objectives o.pdfrishabjain5053
 
Cloud computing 13 principal enabling technologies
Cloud computing 13 principal  enabling technologiesCloud computing 13 principal  enabling technologies
Cloud computing 13 principal enabling technologiesVaibhav Khanna
 
Introduction to Cloud Computing
Introduction to Cloud ComputingIntroduction to Cloud Computing
Introduction to Cloud ComputingAnay Kamat
 
Tuenti Tech Teams. Frontend, Backend, Systems and more, working together
Tuenti Tech Teams. Frontend, Backend, Systems and more, working togetherTuenti Tech Teams. Frontend, Backend, Systems and more, working together
Tuenti Tech Teams. Frontend, Backend, Systems and more, working togetherTuenti
 
Virtual memory
Virtual memoryVirtual memory
Virtual memoryNegar Neda
 
Capacity Planning For Your Growing MongoDB Cluster
Capacity Planning For Your Growing MongoDB ClusterCapacity Planning For Your Growing MongoDB Cluster
Capacity Planning For Your Growing MongoDB ClusterMongoDB
 
Uc14 chap05
Uc14 chap05Uc14 chap05
Uc14 chap05ayahye
 
How Computer work
How Computer workHow Computer work
How Computer workSpy Seat
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidJawad Mohmand
 
Tuenti teams - Php Conference
Tuenti teams - Php ConferenceTuenti teams - Php Conference
Tuenti teams - Php ConferenceGuille -bisho-
 
Alex Wade, Digital Library Interoperability
Alex Wade, Digital Library InteroperabilityAlex Wade, Digital Library Interoperability
Alex Wade, Digital Library Interoperabilityparker01
 
Google Developer Days Brazil 2009 - Java Appengine
Google Developer Days Brazil 2009 -  Java AppengineGoogle Developer Days Brazil 2009 -  Java Appengine
Google Developer Days Brazil 2009 - Java AppenginePatrick Chanezon
 

Similar a Distributed Systems and Gearman (20)

Understanding Computers: Today and Tomorrow, 13th Edition Chapter 5 - System ...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 5 - System ...Understanding Computers: Today and Tomorrow, 13th Edition Chapter 5 - System ...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 5 - System ...
 
Software
SoftwareSoftware
Software
 
Operating Systems Structure1- Explain briefly why the objectives o.pdf
Operating Systems Structure1- Explain briefly why the objectives o.pdfOperating Systems Structure1- Explain briefly why the objectives o.pdf
Operating Systems Structure1- Explain briefly why the objectives o.pdf
 
Cloud computing 13 principal enabling technologies
Cloud computing 13 principal  enabling technologiesCloud computing 13 principal  enabling technologies
Cloud computing 13 principal enabling technologies
 
Chap2
Chap2Chap2
Chap2
 
Introduction to Cloud Computing
Introduction to Cloud ComputingIntroduction to Cloud Computing
Introduction to Cloud Computing
 
Tuenti Tech Teams. Frontend, Backend, Systems and more, working together
Tuenti Tech Teams. Frontend, Backend, Systems and more, working togetherTuenti Tech Teams. Frontend, Backend, Systems and more, working together
Tuenti Tech Teams. Frontend, Backend, Systems and more, working together
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
Capacity Planning For Your Growing MongoDB Cluster
Capacity Planning For Your Growing MongoDB ClusterCapacity Planning For Your Growing MongoDB Cluster
Capacity Planning For Your Growing MongoDB Cluster
 
Capacityplanning
Capacityplanning Capacityplanning
Capacityplanning
 
Virtual Memory
Virtual MemoryVirtual Memory
Virtual Memory
 
Uc14 chap05
Uc14 chap05Uc14 chap05
Uc14 chap05
 
Uc14 chap05
Uc14 chap05Uc14 chap05
Uc14 chap05
 
How Computer work
How Computer workHow Computer work
How Computer work
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Tuenti teams - Php Conference
Tuenti teams - Php ConferenceTuenti teams - Php Conference
Tuenti teams - Php Conference
 
Alex Wade, Digital Library Interoperability
Alex Wade, Digital Library InteroperabilityAlex Wade, Digital Library Interoperability
Alex Wade, Digital Library Interoperability
 
Unit 1
Unit 1Unit 1
Unit 1
 
Google Developer Days Brazil 2009 - Java Appengine
Google Developer Days Brazil 2009 -  Java AppengineGoogle Developer Days Brazil 2009 -  Java Appengine
Google Developer Days Brazil 2009 - Java Appengine
 

Distributed Systems and Gearman

  • 1.
  • 2. Jared Mooring Platform Engineer Former lead developer • BigPond GameArena • BigPond Kids • BigPond Prepaid • Ausgamers
  • 3.
  • 4. What is distribution? It seems to be a ‘buzz word’ at the moment 'A distributed system consists of multiple autonomous computers that communicate through a computer network. The computers interact with each other in order to achieve a common goal' – wikipedia Share the work, sharing is caring!
  • 5. SCENARIO – PHOTO GALLERY 1. User uploads photo through form 2. Photo get resized – thumb, medium, original 3. Web server resizes images 4. Stores new sizes on disk 5. Display resized photos
  • 6. Issues? Web server is meant to server HTTP requests – Why should it do the heavy lifting? – Be kind to your presentation server(s) CPU spent on resizing images
  • 7. Alternative - Distribute Job Worker Job Server Job Request ApacheUser Upload Image Process Request Request to resize image Receive request Idle worker Idle Worker Idle Worker Resize image Wait for other connections
  • 8. Message Queue Systems Store data as a ‘message’ for processing – Serialized objects – Text Allows different applications to interact – Includes different operating systems – Different languages Message Persistence – RAM: Memcache – DB: mySQL, SQLite, PostgreSQL
  • 9. Introducing ‘Gearman provides a generic application framework to farm out work to other machines or processes that are better suited to do the work’ - http://gearman.org
  • 10. Basics Gearman Layer Server Manages jobs / Multiple instances Client Makes request to job server – it wants work done! Worker Performs job / Tells server what it can do / Distributed
  • 12. http://gearman.org –Source / Repositories API available through PECL –http://pecl.php.net/package/gearman –http://php.net/manual/en/book.gearman.php Drivers available for other languages –Perl –Python –Java –.NET
  • 13. How are Yahoo!7 using it? Platform for distributing management of content – Developers are able to build distributed plugins – Individual business units Building feeds RSS/MRSS Video transcoding – Allows us to add new nodes easily – Distributed managed transcoding
  • 14. Who else is using it?
  • 15. ALL DONE! THANK YOU Twitter: @jadzor Forward Pass: http://fwdpass.it/bN4Q4v MammothVPS Coupon: –http://www.mammothvps.com.au –SYDPHP

Notas del editor

  1. Being a good developer is more than writing code Be aware of your environment What OS are you developing for? Are you using a cluster? Where are your servers? AU/EU/US? Do you have servers for specific tasks? Web Servers Mail Servers Tools Servers
  2. Use your web server to serve HTTP requests Offload (distribute) the tasks that aren’t related to serving HTTP requests Move the image processing Send a request to resize images Worker picks up request, resizes image Writes image to disk Returns paths to images
  3. Client does:
* Connect to gearmand.
* submit's a job for a particular func.
 Gearmand does:
* Acks the job, finds all *sleeping workers* related to the function.
* Sends them all a 'noop' command to wake them up.
 Worker does:
* Urk, I'm awake now.
* Worker asks for jobs.
* If jobs, do work.
* If no jobs, sends command 'pre_sleep' to all gearmand's, etc.