Pressing Words with a Cloud WordPress Technical Overview, the art of the Scale, and the Cloud Hans Zaunere, Managing Membe...
Overview <ul><li>The Technology Behind WordPress How Things Actually Fit Together </li></ul><ul><li>Can WordPress Do That?...
WordPress Technical Overview <ul><li>An AMP application – one of many </li></ul><ul><ul><li>AMP = Apache/MySQL/PHP </li></...
Architectural Overview <ul><li>AMP : Acronym for three key software components </li></ul><ul><li>Basis of modern, dynamic,...
PHP Language Overview <ul><li>The programming language WordPress is written in </li></ul><ul><ul><li>“ ...a widely-used op...
Working on the Web - HTTP <ul><li>Apache is designed to handle HTTP communication </li></ul><ul><ul><li>HTTP is the H yp...
Working on the Web - HTML <ul><li>PHP is designed to process hypertext (templates) </li></ul><ul><ul><li>HTML is the H y...
Working on the Web - SQL <ul><li>PHP is designed to communicate with databases </li></ul><ul><ul><li>...and other data sou...
Putting It All Together <ul><li>Web browser uses HTTP to make web server request </li></ul><ul><li>Apache passes control t...
<ul><li>PHP manipulates returned data and generates HTML </li></ul><ul><li>PHP and the web server use HTTP to respond </li...
<ul><li>Volunteer organization for women interested in technology </li></ul><ul><li>Over 40 chapters worldwide </li></ul><...
<ul><li>High profile media company </li></ul><ul><li>Dozens of blogs covering various topics </li></ul><ul><li>Requirement...
Scaling into the Cloud <ul><li>WordPress is another AMP application – so… </li></ul><ul><ul><li>It can be deployed onto cl...
Scaling into the Cloud <ul><li>WordPress is another AMP application – so… </li></ul><ul><ul><li>The database is a bottlene...
Conclusions <ul><li>WordPress is an AMP application </li></ul><ul><ul><li>Uses Apache / MySQL / PHP </li></ul></ul><ul><ul...
Thank You 02/04/10 [email_address] For renowned worldwide online support, New York PHP Mailing Lists are free and availabl...
of 16

Pressing Words with a Cloud: WordPress Technical Overview, the art of the Scale, and the Cloud

Pressing Words with a Cloud: WordPress Technical Overview, the art of the Scale, and the Cloud, by Hans Zaunere, from New York PHP (Courtesy by Zend / Rynet Cipta Teknologi), for WORDCAMPID - WordCamp Indonesia 2010. Auditorium Gunadarma University, Depok, January 30, 2010
Published on: Mar 4, 2016
Published in: Technology      
Source: www.slideshare.net


Transcripts - Pressing Words with a Cloud: WordPress Technical Overview, the art of the Scale, and the Cloud

  • 1. Pressing Words with a Cloud WordPress Technical Overview, the art of the Scale, and the Cloud Hans Zaunere, Managing Member 02/04/10 WordCamp Indonesia 2010 January 30 th , 2010
  • 2. Overview <ul><li>The Technology Behind WordPress How Things Actually Fit Together </li></ul><ul><li>Can WordPress Do That? Customization and Large-Scale Deployments </li></ul><ul><li>Pressing Words – Scaling and the Cloud WordPress is Part of the AMP Family </li></ul>02/04/10 WordPress as a Modern Web Application
  • 3. WordPress Technical Overview <ul><li>An AMP application – one of many </li></ul><ul><ul><li>AMP = Apache/MySQL/PHP </li></ul></ul><ul><ul><li>One of the most popular platforms on the web today </li></ul></ul><ul><ul><li>Enables the blogosphere by providing attainable web technology </li></ul></ul><ul><li>AMP is used for… </li></ul><ul><ul><li>Intranets, corporate sites, e-commerce, web services </li></ul></ul><ul><ul><li>Blogs, social networks, CMSs </li></ul></ul><ul><ul><li>Facebook, Yahoo, NY Times </li></ul></ul><ul><ul><li>… and much, much, much, MUCH, more </li></ul></ul>02/04/10 In Good Company
  • 4. Architectural Overview <ul><li>AMP : Acronym for three key software components </li></ul><ul><li>Basis of modern, dynamic, web/internet applications </li></ul>02/04/10 A pache /M ySQL /P HP : The Cartel “ More internet applications speak PHP than any other” Apache Provides the transit M ySQL Provides the data P HP Provides the processing – the “glue”
  • 5. PHP Language Overview <ul><li>The programming language WordPress is written in </li></ul><ul><ul><li>“ ...a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML” </li></ul></ul><ul><ul><li>Borrows from other languages – mostly C, Perl and Java </li></ul></ul><ul><li>For your themes – &quot;embedded into HTML&quot; </li></ul><ul><ul><li>Allows dynamic generation of content </li></ul></ul><ul><ul><li>The non-HTML part of WordPress themes </li></ul></ul><ul><ul><li>Those annoying <?php and ?> tags </li></ul></ul><ul><li>For your plug-ins – &quot;general-purpose scripting language&quot; </li></ul><ul><ul><li>The programming logic </li></ul></ul><ul><ul><li>Connects databases, RSS feeds, and other data sources </li></ul></ul>02/04/10 PHP is the P HP: H ypertext P reprocessor
  • 6. Working on the Web - HTTP <ul><li>Apache is designed to handle HTTP communication </li></ul><ul><ul><li>HTTP is the H yper T ext T ransfer P rotocol, used for exchanging information on the WWW </li></ul></ul><ul><ul><li>Apache provides the runtime for processing requests and providing WordPress' response </li></ul></ul>02/04/10 Web Server – Trafficking Partner
  • 7. Working on the Web - HTML <ul><li>PHP is designed to process hypertext (templates) </li></ul><ul><ul><li>HTML is the H yper T ext M arkup L anguage </li></ul></ul><ul><ul><li>Gives structure to the data contained in the WordPress database </li></ul></ul>02/04/10 HTML – The “Goods” <!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;....> <html> <head> <title>Hello World</title> </head> <body> <b> <?php echo 'Hello World!'; ?> </b> <?php echo 'At the tone, the time will be: '.date('r'); ?> </body> </html>
  • 8. Working on the Web - SQL <ul><li>PHP is designed to communicate with databases </li></ul><ul><ul><li>...and other data sources... </li></ul></ul><ul><ul><li>SQL is the S imple Q uery L anguage, used for manipulating and retrieving WordPress data (user information, posts, etc) </li></ul></ul><ul><li>SQL is also used for complex or “relational” data </li></ul>02/04/10 MySQL – The “Supplier” SELECT ID FROM wp_users WHERE user_login = 'username' SELECT ID,meta_value FROM wp_users,wp_usermeta WHERE user_id=ID AND user_login = 'username'
  • 9. Putting It All Together <ul><li>Web browser uses HTTP to make web server request </li></ul><ul><li>Apache passes control to PHP which in turn executes WordPress code to understand how to respond </li></ul><ul><li>Often this means running a database query </li></ul>02/04/10 Your Cast and Crew – Apache / MySQL / PHP <?php $Result = mysql_query(&quot;SELECT post_title,DATE_FORMAT(post_date,'%M, %D, %Y') AS post_date FROM wp_posts WHERE category='4',$MYDBR); $ResultCount = mysql_num_rows($Result); $ResultArray = array(); for( $i = 0; $i < $ResultCount; ++$i ) { $ResultArray[$i] = mysql_fetch_assoc($Result); } ?>
  • 10. <ul><li>PHP manipulates returned data and generates HTML </li></ul><ul><li>PHP and the web server use HTTP to respond </li></ul><ul><li>Web browser receives HTML and displays the results </li></ul>Putting It All Together 02/04/10 <!DOCTYPE...> <ul> <?php foreach( $ResultArray as $Key => $Row ): ?> <li><?=$Row[post_title']?> (<?=$Row['post_date']?>)</li> <?php endforeach; ?> </ul> The Finale
  • 11. <ul><li>Volunteer organization for women interested in technology </li></ul><ul><li>Over 40 chapters worldwide </li></ul><ul><li>Considerations </li></ul><ul><ul><li>Each chapter to have it's own blog </li></ul></ul><ul><ul><li>Support multiple-users and permissions per chapter </li></ul></ul><ul><ul><li>Unified platform to share and aggregate information </li></ul></ul><ul><li>Deployment and customization of WordPress MU </li></ul>www.girlsintech.net 02/04/10 A Case Study in Complexity
  • 12. <ul><li>High profile media company </li></ul><ul><li>Dozens of blogs covering various topics </li></ul><ul><li>Requirements </li></ul><ul><ul><li>Frequent huge spikes in traffic </li></ul></ul><ul><ul><li>Keep unified online look and feel </li></ul></ul><ul><ul><li>Integrate with other web properties for consistent online experience </li></ul></ul><ul><li>Utilizes large server farms in the cloud for scalability </li></ul><ul><li>Customization of HTML and PHP code </li></ul>www.nytimes.com/blogs/ 02/04/10 A Case Study in Traffic
  • 13. Scaling into the Cloud <ul><li>WordPress is another AMP application – so… </li></ul><ul><ul><li>It can be deployed onto cloud servers </li></ul></ul><ul><ul><li>Configure and install once – deploy multiple times </li></ul></ul><ul><ul><li>Manage from a single interface </li></ul></ul><ul><ul><li>Scale by adding servers </li></ul></ul><ul><li>Multi-Tenant </li></ul><ul><ul><li>One web server hosting multiple blogs using virtual hosting </li></ul></ul><ul><li>Single-Tenant </li></ul><ul><ul><li>One operating system instance hosting a single blog </li></ul></ul><ul><li>MU (multi-user) </li></ul><ul><ul><li>WordPress MU provides multiple blogs from single server </li></ul></ul>02/04/10 How WP Storms the Cloud…
  • 14. Scaling into the Cloud <ul><li>WordPress is another AMP application – so… </li></ul><ul><ul><li>The database is a bottleneck and the hardest to scale </li></ul></ul><ul><ul><li>Caching can help but… </li></ul></ul><ul><ul><li>… as writes increase (comments, new posts, multiple users)… </li></ul></ul><ul><ul><li>… the database becomes strained and caching is ineffective </li></ul></ul><ul><li>Keep things optimized </li></ul><ul><ul><li>Consider performing query analysis and adding indexes </li></ul></ul><ul><ul><li>Fine-tune database settings </li></ul></ul><ul><ul><li>Custom code or query to avoid pressure points </li></ul></ul><ul><li>Keep things clean </li></ul><ul><ul><li>Optimize your stack and save as an image in the cloud </li></ul></ul><ul><ul><li>Minimize plug-ins – the less code the better </li></ul></ul>02/04/10 … or are Those Storm Clouds?
  • 15. Conclusions <ul><li>WordPress is an AMP application </li></ul><ul><ul><li>Uses Apache / MySQL / PHP </li></ul></ul><ul><ul><li>Benefits from the same service as any other AMP app </li></ul></ul><ul><li>Utilizing the cloud gives flexibility and options - but… </li></ul><ul><ul><li>Customizations and optimizations are still needed </li></ul></ul><ul><ul><li>High traffic /High complexity always requires special attention </li></ul></ul><ul><li>No single silver-bullet – cloud or anything else </li></ul><ul><ul><li>Hire skilled PHP engineers - specific experience a plus but not required </li></ul></ul>02/04/10 Engineer the right WordPress solution
  • 16. Thank You 02/04/10 [email_address] For renowned worldwide online support, New York PHP Mailing Lists are free and available to anyone: http://www.nyphp.org/Mailing-Lists

Related Documents