Your SlideShare is downloading. ×
0
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Php resque
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Php resque

4,762

Published on

This talk presents php-resque which is a php port of resque which was built by the cool folks @ github.

This talk presents php-resque which is a php port of resque which was built by the cool folks @ github.

Published in: Technology
1 Comment
5 Likes
Statistics
Notes
  • IT Pathshala, Noida-Sector-63, offers Guaranteed JOB with PHP Training Programs.

    PAY US ONLY IF YOU GET A JOB!

    CALL US - +91-9871350999 or +91-8800394970

    Technology Centre Address: H-110, Sector-63, Noida (UP)

    Program Takeaways:

    - GUARANTEED JOB in your technology domain
    - Live Major Project development
    - Experience Letter on Training Completion
    - Certification on Training Completion
    - Project Source Code available in CD

    Program Highlights:

    - 100% Guaranteed Job – Don’t pay us if you don’t get a JOB!
    - Industry Ready Courses
    - LIVE International Project Experience
    - Exposure to corporate culture at our IT services facility
    - Networking & Interaction with Industry Experts
    - Training Provided by a reputed IT Company
    - Live Project Source Code made available in CD
    - Technology certification and experience letter at program completion
    - Online Study Content

    CALL US - +91-9871350999 or +91-8800394970

    Our website: www.itpathshala.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
4,762
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
28
Comments
1
Likes
5
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • hello and welcome to my talk on php-resque\nbefore we proceed i have to tell you all that php-resque was developed by chris boulton\nmy name is chaitanya kuber and can be contacted via twitter\n
  • hello and welcome to my talk on php-resque\nbefore we proceed i have to tell you all that php-resque was developed by chris boulton\nmy name is chaitanya kuber and can be contacted via twitter\n
  • hello and welcome to my talk on php-resque\nbefore we proceed i have to tell you all that php-resque was developed by chris boulton\nmy name is chaitanya kuber and can be contacted via twitter\n
  • standing here and doing this presentaiton is a little strange because i know everyone in the audience is smarter than myself\nthat said, i want to provide a little bit of context about our world\ntalk about what resque is and how it works\nthe move to php\nwhat we use it for @ bigcommerce\n\n
  • standing here and doing this presentaiton is a little strange because i know everyone in the audience is smarter than myself\nthat said, i want to provide a little bit of context about our world\ntalk about what resque is and how it works\nthe move to php\nwhat we use it for @ bigcommerce\n\n
  • standing here and doing this presentaiton is a little strange because i know everyone in the audience is smarter than myself\nthat said, i want to provide a little bit of context about our world\ntalk about what resque is and how it works\nthe move to php\nwhat we use it for @ bigcommerce\n\n
  • standing here and doing this presentaiton is a little strange because i know everyone in the audience is smarter than myself\nthat said, i want to provide a little bit of context about our world\ntalk about what resque is and how it works\nthe move to php\nwhat we use it for @ bigcommerce\n\n
  • context, it really is everything\nin engineering web applications its all about the milliseconds\ntasks like …. take time\nthey not only take time, often they are supporting tasks\nthings that do not directly impact servicing a request form the user\n
  • context, it really is everything\nin engineering web applications its all about the milliseconds\ntasks like …. take time\nthey not only take time, often they are supporting tasks\nthings that do not directly impact servicing a request form the user\n
  • context, it really is everything\nin engineering web applications its all about the milliseconds\ntasks like …. take time\nthey not only take time, often they are supporting tasks\nthings that do not directly impact servicing a request form the user\n
  • context, it really is everything\nin engineering web applications its all about the milliseconds\ntasks like …. take time\nthey not only take time, often they are supporting tasks\nthings that do not directly impact servicing a request form the user\n
  • context, it really is everything\nin engineering web applications its all about the milliseconds\ntasks like …. take time\nthey not only take time, often they are supporting tasks\nthings that do not directly impact servicing a request form the user\n
  • users are fickle\ni like to think that a web application should focus on responding as fast possible to the request form its user\nif not they will leave\nso, any operation thats not directly related to the request can and probably should go elsewhere\n\n
  • where ?\nbackground jobs … whats that\nthink asynchronous\nsupermarket shelves are stacked in the night to ensure shoppers can walk in get there things and walk out\nit would be a sucky experience to walk in and wait for them to stock the milk before you could buy it\n
  • where ?\nbackground jobs … whats that\nthink asynchronous\nsupermarket shelves are stacked in the night to ensure shoppers can walk in get there things and walk out\nit would be a sucky experience to walk in and wait for them to stock the milk before you could buy it\n
  • there are various systems to do background/async processing\nbackgroundjob is a zero admin background priority queue for rails\ndelayedjob is similar with the advantage that it doesn’t load the entire rails env into memory\nbeanstalk is a simple, fast work queue. its interface is generic, was designed for increase response times for high-volume web apps\ngearman is quite similar to resque as it supports persistant queues, is open source, fault tolerant and is distributed\n
  • there are various systems to do background/async processing\nbackgroundjob is a zero admin background priority queue for rails\ndelayedjob is similar with the advantage that it doesn’t load the entire rails env into memory\nbeanstalk is a simple, fast work queue. its interface is generic, was designed for increase response times for high-volume web apps\ngearman is quite similar to resque as it supports persistant queues, is open source, fault tolerant and is distributed\n
  • there are various systems to do background/async processing\nbackgroundjob is a zero admin background priority queue for rails\ndelayedjob is similar with the advantage that it doesn’t load the entire rails env into memory\nbeanstalk is a simple, fast work queue. its interface is generic, was designed for increase response times for high-volume web apps\ngearman is quite similar to resque as it supports persistant queues, is open source, fault tolerant and is distributed\n
  • there are various systems to do background/async processing\nbackgroundjob is a zero admin background priority queue for rails\ndelayedjob is similar with the advantage that it doesn’t load the entire rails env into memory\nbeanstalk is a simple, fast work queue. its interface is generic, was designed for increase response times for high-volume web apps\ngearman is quite similar to resque as it supports persistant queues, is open source, fault tolerant and is distributed\n
  • there are various systems to do background/async processing\nbackgroundjob is a zero admin background priority queue for rails\ndelayedjob is similar with the advantage that it doesn’t load the entire rails env into memory\nbeanstalk is a simple, fast work queue. its interface is generic, was designed for increase response times for high-volume web apps\ngearman is quite similar to resque as it supports persistant queues, is open source, fault tolerant and is distributed\n
  • there are various systems to do background/async processing\nbackgroundjob is a zero admin background priority queue for rails\ndelayedjob is similar with the advantage that it doesn’t load the entire rails env into memory\nbeanstalk is a simple, fast work queue. its interface is generic, was designed for increase response times for high-volume web apps\ngearman is quite similar to resque as it supports persistant queues, is open source, fault tolerant and is distributed\n
  • it was developed by the cool folks @github, it was inspired by delayedjob\nresque is written in ruby which is a redis backed library for creating background jobs, placing them in queues and processing them later\nworkers can process one or multiple queues\nworkers can be run on different servers\n
  • it was developed by the cool folks @github, it was inspired by delayedjob\nresque is written in ruby which is a redis backed library for creating background jobs, placing them in queues and processing them later\nworkers can process one or multiple queues\nworkers can be run on different servers\n
  • it was developed by the cool folks @github, it was inspired by delayedjob\nresque is written in ruby which is a redis backed library for creating background jobs, placing them in queues and processing them later\nworkers can process one or multiple queues\nworkers can be run on different servers\n
  • it was developed by the cool folks @github, it was inspired by delayedjob\nresque is written in ruby which is a redis backed library for creating background jobs, placing them in queues and processing them later\nworkers can process one or multiple queues\nworkers can be run on different servers\n
  • it was developed by the cool folks @github, it was inspired by delayedjob\nresque is written in ruby which is a redis backed library for creating background jobs, placing them in queues and processing them later\nworkers can process one or multiple queues\nworkers can be run on different servers\n
  • it was developed by the cool folks @github, it was inspired by delayedjob\nresque is written in ruby which is a redis backed library for creating background jobs, placing them in queues and processing them later\nworkers can process one or multiple queues\nworkers can be run on different servers\n
  • it was developed by the cool folks @github, it was inspired by delayedjob\nresque is written in ruby which is a redis backed library for creating background jobs, placing them in queues and processing them later\nworkers can process one or multiple queues\nworkers can be run on different servers\n
  • resque supports prioritising jobs by prioritising queues against each other\njobs are persisted to queues as JSON objects and the queues are stored in redis as lists\na nice web interface, a sinatra app, is also included for monitoring the workers\nplugin system using a event framework for events like after_fork, before_fork etc \n
  • resque supports prioritising jobs by prioritising queues against each other\njobs are persisted to queues as JSON objects and the queues are stored in redis as lists\na nice web interface, a sinatra app, is also included for monitoring the workers\nplugin system using a event framework for events like after_fork, before_fork etc \n
  • resque supports prioritising jobs by prioritising queues against each other\njobs are persisted to queues as JSON objects and the queues are stored in redis as lists\na nice web interface, a sinatra app, is also included for monitoring the workers\nplugin system using a event framework for events like after_fork, before_fork etc \n
  • resque supports prioritising jobs by prioritising queues against each other\njobs are persisted to queues as JSON objects and the queues are stored in redis as lists\na nice web interface, a sinatra app, is also included for monitoring the workers\nplugin system using a event framework for events like after_fork, before_fork etc \n
  • resque supports prioritising jobs by prioritising queues against each other\njobs are persisted to queues as JSON objects and the queues are stored in redis as lists\na nice web interface, a sinatra app, is also included for monitoring the workers\nplugin system using a event framework for events like after_fork, before_fork etc \n
  • this is a little tangent, but i quickly want to talk about redis\nit’s a key-value store, all its operations are atomic and O(1) meaning they will always complete in a constant amount of time\nthis means speed and its really important when you want to set and forget\n\n
  • this is a little tangent, but i quickly want to talk about redis\nit’s a key-value store, all its operations are atomic and O(1) meaning they will always complete in a constant amount of time\nthis means speed and its really important when you want to set and forget\n\n
  • this is a little tangent, but i quickly want to talk about redis\nit’s a key-value store, all its operations are atomic and O(1) meaning they will always complete in a constant amount of time\nthis means speed and its really important when you want to set and forget\n\n
  • this is a little tangent, but i quickly want to talk about redis\nit’s a key-value store, all its operations are atomic and O(1) meaning they will always complete in a constant amount of time\nthis means speed and its really important when you want to set and forget\n\n
  • this is a little tangent, but i quickly want to talk about redis\nit’s a key-value store, all its operations are atomic and O(1) meaning they will always complete in a constant amount of time\nthis means speed and its really important when you want to set and forget\n\n
  • this is a little tangent, but i quickly want to talk about redis\nit’s a key-value store, all its operations are atomic and O(1) meaning they will always complete in a constant amount of time\nthis means speed and its really important when you want to set and forget\n\n
  • they use it for a whole host of things\n
  • they use it for a whole host of things\n
  • they use it for a whole host of things\n
  • they use it for a whole host of things\n
  • they use it for a whole host of things\n
  • they use it for a whole host of things\n
  • around 2009 when they released this library they had already processed over 10 million jobs\nwow … right\n
  • around 2009 when they released this library they had already processed over 10 million jobs\nwow … right\n
  • so, how does it do what it does ?\nas a user of the resque library in your app you essentially interact with redis\nwhen you ask resque to queue up a job, it will push it onto the queue in redis\na resque worker comes along at some point in time and pops a job of the queue and forks that into its own process and runs the job\n\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • but it can also have a setUp and tearDown method if there are pre and post actions you wish to do or conditions you wish to check etc\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript

    • 1. php-resque
    • 2. php-resqueauthor: @surifchris
    • 3. php-resque author: @surifchrisspeaker: @chaitanyakuber
    • 4. introduction
    • 5. introduction context
    • 6. introduction context what & how
    • 7. introduction context what & how move to php
    • 8. introduction context what & how move to php @bigcommerce
    • 9. context
    • 10. contextit’s about ms
    • 11. context it’s about mscreate a thumbnail
    • 12. context it’s about mscreate a thumbnail upload videos
    • 13. context it’s about mscreate a thumbnail upload videosdownload a tarball
    • 14. context it’s about mscreate a thumbnail upload videosdownload a tarball send an email
    • 15. purpose
    • 16. purpose
    • 17. where ?
    • 18. where ?background jobs
    • 19. where ? background jobsasynchronous processing
    • 20. how ?
    • 21. how ?fork :)
    • 22. how ? fork :)backgroundjob
    • 23. how ? fork :)backgroundjob delayedjob
    • 24. how ? fork :)backgroundjob delayedjob beanstalkd
    • 25. how ? fork :)backgroundjob delayedjob beanstalkd gearman
    • 26. how ? fork :)backgroundjob delayedjob beanstalkd gearman others ?
    • 27. resque
    • 28. resquedeveloped by github
    • 29. resquedeveloped by github ruby
    • 30. resque developed by github rubymemory leak resistant
    • 31. resque developed by github rubymemory leak resistant multiple queues
    • 32. resque developed by github ruby memory leak resistant multiple queuesqueues processed by workers
    • 33. resque developed by github ruby memory leak resistant multiple queuesqueues processed by workers distributed processing
    • 34. resque https://github.com/defunkt/resque developed by github ruby memory leak resistant multiple queuesqueues processed by workers distributed processing
    • 35. resque
    • 36. resquepriorities
    • 37. resque prioritiesstored in redis
    • 38. resque priorities stored in redispersistent queues
    • 39. resque priorities stored in redispersistent queues web interface
    • 40. resque priorities stored in redispersistent queues web interface plugins
    • 41. redis
    • 42. rediskey value store
    • 43. redis key value storeatomic operations
    • 44. redis key value storeatomic operations O(1)
    • 45. redis key value store atomic operations O(1)strings, hashes, lists
    • 46. redis key value store atomic operations O(1)strings, hashes, listssets and sorted sets
    • 47. redishttp://redis.io/topics/introduction key value store atomic operations O(1) strings, hashes, lists sets and sorted sets
    • 48. resque @ github
    • 49. resque @ github warming a cache
    • 50. resque @ github warming a cache counting disk usage
    • 51. resque @ github warming a cache counting disk usage building tarballs, rubygems
    • 52. resque @ github warming a cache counting disk usage building tarballs, rubygems firing off web hooks
    • 53. resque @ github warming a cache counting disk usage building tarballs, rubygems firing off web hooks building graphs
    • 54. resque @ github warming a cache counting disk usage building tarballs, rubygems firing off web hooks building graphs deleting users
    • 55. does it scale ?
    • 56. does it scale ?> 10 million jobs
    • 57. does it scale ?> 10 million jobs November 3, 2009
    • 58. what’s resque?
    • 59. what’s resque?
    • 60. php-resque
    • 61. php-resque interface parity
    • 62. php-resque interface parity queues
    • 63. php-resque interface parity queues workers
    • 64. php-resque interface parity queues workers persistence
    • 65. php-resque interface parity queues workers persistence resilience
    • 66. php-resque interface parity queues workers persistence resiliencephp @ bigcommerce
    • 67. php-resquehttps://github.com/chrisboulton/php-resque/ interface parity queues workers persistence resilience php @ bigcommerce
    • 68. php-resque
    • 69. php-resque in addition
    • 70. php-resque in additionsetUp and tearDown
    • 71. php-resque in additionsetUp and tearDownmarks jobs as failed
    • 72. php-resque in addition setUp and tearDown marks jobs as failedability to track job status
    • 73. how ?
    • 74. how ?jobs are queued as follows
    • 75. how ? jobs are queued as followsrequire_once lib/Resque.php; // Required if redis is located elsewhere Resque::setBackend(localhost:6379); $args = array( name => Chris ); Resque::enqueue(default, My_Job, $args);
    • 76. job class
    • 77. job classclass My_Job { public function setUp() { // ... Set up environment for this job } public function perform() { // .. Run job } public function tearDown() { // ... Remove environment for this job } }
    • 78. house keeping
    • 79. house keeping part of your app
    • 80. house keeping part of your appresque loads app into memory
    • 81. house keeping part of your appresque loads app into memory instantiates the job class
    • 82. house keeping part of your appresque loads app into memory instantiates the job class runs it
    • 83. @bigcommerce
    • 84. @bigcommerce email
    • 85. @bigcommerce email uploads/downloads
    • 86. @bigcommerce email uploads/downloads statsd
    • 87. @bigcommerce email uploads/downloads statsd totango
    • 88. @bigcommerce email uploads/downloads statsd totango monitoring
    • 89. @bigcommerce email uploads/downloads statsd totango monitoring ….
    • 90. thanks for listening
    • 91. Questions?

    ×