Improving WordPress performance with the Jobs System

637 views

Published on

https://code.trac.wordpress.org/wiki/JobsDocs - An introduction to the WordPress Jobs System: a fast, distributed, horizontally scalable system built upon linux, php5.2, and mysql 5.1 wherein work can be stored in a database, and processed outside the flow of script execution. Examples of common things that are part of script execution but not necessary to the rendering of the response to the user might be spam scanning, statistical analysis, email notification sending, processing input data, etc.

Published in: Technology, Business
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
637
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
2
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Improving WordPress performance with the Jobs System

  1. 1. Improving WordPress performance with the Jobs System 1 WORDPRESS MEETUP - MILAN - APRIL, 23 2013 # WPMI DANILO ERCOLI
  2. 2. INTRODUCTION PHP, as we all know, executes in a single threaded manner. That is the interpreter does A, then B, then C, then D, then finishes, and wipes its slate clean (shared nothing.) It does this same things for every page view on your site. For example, You have a social networking site that allows your users to send each other messages, the execution for that action might be something like this: • setup web environment • setup user environment • check user permissions • check message to make sure its not spam • check message to make sure its not a duplicate • check message for bad language • insert the message into the db for the recipient(s) • send out email to remote user(s) letting them know that they have a message waiting for them now • render the "message sent" page for the sender WORDPRESS MEETUP - APRIL 2013
  3. 3. OVERVIEW The jobs system changes everything. With the jobs system you can stash the message into a job after checking permissions, and skip straight to rendering the "message sent" page. Another process elsewhere on your network will pick up the job, pull out the message, check it for duplication, spam, language, stick it in the db if that all passes, and then finally send out emails to all the recipients. WORDPRESS MEETUP - APRIL 2013
  4. 4. HIGH LEVEL OVERVIEW WORDPRESS MEETUP - APRIL 2013 Job  systems Job  systems
  5. 5. THE JOBS SYSTEM • A Web user interface to tell you what’s going on. • A distributed fault tolerant crontab replacement. • Statistics on your servers and your jobs. • Error logs -- any output of a failed job (including STDERR output) is recorded along with the job in the db accessible from the UI. • Scaleability -- setup multiple jobs clusters or add new servers to the existing one. Adding new servers happens automatically, just works. Different servers can be told how many simultaneous workers they're allowed right from the web UI • Integration -- As a PHP application it's meant to, literally, include your whole code base allowing your environment to be accessible with no differences at all to developers • http://code.trac.wordpress.org/ WORDPRESS MEETUP - APRIL 2013
  6. 6. CODE WORDPRESS MEETUP - APRIL 2013
  7. 7. WEB ADMIN WORDPRESS MEETUP - APRIL 2013
  8. 8. WEB ADMIN WORDPRESS MEETUP - APRIL 2013
  9. 9. ERROR LOG (1) WORDPRESS MEETUP - APRIL 2013
  10. 10. ERROR LOG (2) WORDPRESS MEETUP - APRIL 2013
  11. 11. Danilo Ercoli ABOUT ME Web: http://daniloercoli.wordpress.com Twitter: @daniloercoli Danilo ha più di 10 anni di esperienza nello sviluppo di soluzioni software per il web e per il mobile. Ha lavorato con i più disparati linguaggi di programmazione, dall’assembler a SmallTalk, dal C all’ Object-C passando per Lisp, Java e PHP. Sviluppatore certificato PHP e Java2 SE. Molto tempo fa ha anche scritto un compilatore per il linguaggio Tiger. Attualmente lavora in WordPress.com passando gran parte del tempo sviluppando le soluzioni mobili offerte da WordPress e sviluppando componenti server a supporto del mobile. Lead Developer di WordPress for BlackBerry and PlayBook. BIO WORDPRESS MEETUP - APRIL 2013

×