Book description
The only book to address using cache to enhance and speed up Web application development
Developers use Apache, MySQL, memcached, and Perl to build dynamic Web sites that store information within the MySQL database; this is the only book to address using these technologies together to alleviate the database load in Web development
Covers each of the four systems and shows how to install, set up, and administer them; then shows the reader how to put the parts together to start building applications
Explains the benefits of a base perl library for code re-use, and provides sample applications that demonstrate in a practical way the information covered in the previous chapters
Examines monitoring, performance, and security, with a problem-solving chapter that walks the reader through solving real-world issues
Table of contents
- Copyright
- Credits
- About the Author
- About the Technical Editor
- Acknowledgments
- Foreword
- Introduction
- 1. LAMMP, Now with an Extra M
-
2. MySQL
- 2.1. How CGI and PHP Changed the Web Dramatically
- 2.2. About MySQL
- 2.3. MySQL Programs
- 2.4. Working with Data
- 2.5. MySQL Privileges
- 2.6. Summary
-
3. Advanced MySQL
- 3.1. SQL Features
- 3.2. Storage Engines
- 3.3. Using Storage Engines
-
3.4. Replication
- 3.4.1. Replication Overview
- 3.4.2. Replication schemes
- 3.4.3. Replication Command Options
- 3.4.4. Setting Up Replication
- 3.4.5. Searching Text
- 3.4.6. When to Use Sphinx
- 3.5. Summary
-
4. Perl Primer
- 4.1. What Exactly Is Perl?
- 4.2. Perl Primer
- 4.3. Perl Data Types
- 4.4. Variable Usage
- 4.5. Packages
- 4.6. Regex One-Liners
- 4.7. Perl 6 Tidbits
- 4.8. Summary
- 5. Object-Oriented Perl
-
6. MySQL and Perl
- 6.1. Perl DBI
- 6.2. Connect
- 6.3. Statement Handles
- 6.4. Binding Methods
- 6.5. Other Statement Handle Methods
- 6.6. Statement Handle Attributes
- 6.7. MySQL-Specific Statement Handle Attributes
- 6.8. Multistep Utility Methods
- 6.9. Other Database Handle Methods
- 6.10. Stored Procedures
- 6.11. Error Handling
- 6.12. Server Admin
- 6.13. Summary
- 7. Simple Database Application
-
8. memcached
- 8.1. What Is memcached?
- 8.2. How memcached Is Used
- 8.3. Installing memcached
- 8.4. Starting memcached
- 8.5. Using Cache::Memcached
- 8.6. Simple Examples
-
8.7. A More Practical Example
- 8.7.1. User Application
- 8.7.2. Data Design
- 8.7.3. UserApp Package
- 8.7.4. Instantiation
- 8.7.5. Database Connector Method
- 8.7.6. Data Retrieval Methods
- 8.7.7. Simple Accessor Methods
- 8.7.8. Data Modification Methods
- 8.7.9. Using UserApp
- 8.7.10. Memcached Connector Method
- 8.7.11. Caching Implementation Plan
- 8.7.12. Where to Add Caching?
- 8.7.13. Caching Key Scheme
- 8.7.14. Precaching
- 8.7.15. Precaching Cities
- 8.7.16. Precaching States
- 8.7.17. Using Instantiation for Precaching Method Calls
- 8.7.18. Modifying Accessor Methods to Use Cache
- 8.7.19. User Data Caching—Set Method Modifications
- 8.7.20. User Data Caching—Get Method Modifications
- 8.7.21. UserApp Now Has Caching!
- 8.7.22. Other Caching Issues
- 8.8. Summary
-
9. Libmemcached
- 9.1. What Is libmemcached?
- 9.2. libmemcached Utility Programs
-
9.3. libmemcached Perl Driver
- 9.3.1. Installation
- 9.3.2. Memcached::libmemcached and libmemcached API using Memcached::libmemcached
- 9.3.3. Connection Functions
- 9.3.4. libmemcached Behavioral Functions
- 9.3.5. Functions for Setting Values
- 9.3.6. Data Retrieval (get) Functions
- 9.3.7. Increment, Decrement, and Delete
- 9.3.8. Informational and Utility Functions
- 9.3.9. Object-Oriented Interface
- 9.3.10. Procedure Memcached::libmemcached Program Example
- 9.3.11. Object-Oriented Memcached::libmemcached Program Example
- 9.4. Cache::memcached::libmemcached
- 9.5. Summary
-
10. Memcached Functions for MySQL
- 10.1. What Are Memcached Functions for MySQL?
- 10.2. How Do the Memcached Functions for MySQL Work?
- 10.3. Install the Memcached Functions for MySQL
- 10.4. Using the Memcached Functions for MySQL
- 10.5. Using memcached UDFs
- 10.6. Summary
-
11. Apache
- 11.1. Understanding Apache: An Overview
- 11.2. Understanding the Apache Modules API
- 11.3. Installing Apache
- 11.4. Installing mod_perl from Source
- 11.5. Installing libapreq2 from Source
-
11.6. Apache Configuration
- 11.6.1. Configuration Section Container Directives
- 11.6.2. Basic Directives
- 11.6.3. Server Tuning Directives
- 11.6.4. Logging Directives
- 11.6.5. Error Directives
- 11.6.6. Access Control, Authentication, and Authorization
- 11.6.7. .htaccess File Directives
- 11.6.8. Indexing Directives
- 11.6.9. CGI Directives
- 11.6.10. VirtualHost Directives
- 11.6.11. Handler and Filter Directives
- 11.6.12. Client Handling
- 11.6.13. SSL Directives
- 11.6.14. Clickstream Analysis
- 11.6.15. Rewriting URLs
- 11.6.16. Conditional Pattern
- 11.6.17. Apache Reverse Proxying
- 11.6.18. Enabling mod_proxy
- 11.6.19. mod_proxy Directives
- 11.6.20. Apache Server Control
- 11.7. Apache Configuration Schemes
- 11.8. Common Apache Tasks
- 11.9. Summary
-
12. Contact List Application
- 12.1. Using MySQL and memcached Together
- 12.2. A CGI Program
- 12.3. Program Flow
- 12.4. WebApp Class Methods
- 12.5. Database Methods
-
12.6. Caching Methods
- 12.6.1. The saveUserToCache() Method
- 12.6.2. The cacheUsers() Method
- 12.6.3. The getUsersFromCache() Method
- 12.6.4. The userExistsInCache() Method
- 12.6.5. The deleteUserFromCache Method
- 12.6.6. The setMemcUIDList() Method
- 12.6.7. The updateMemcUIDList Method
- 12.6.8. The deleteMemcUIDList() Method
- 12.6.9. The getMemcUIDList Method
- 12.7. Other Methods
- 12.8. Testing
- 12.9. Summary
-
13. mod_perl
- 13.1. New mod_perl 2.0 Features
- 13.2. Configuring mod_perl
-
13.3. mod_perl Configuration Directives
- 13.3.1. <Perl> Sections
- 13.3.2. PerlModule
- 13.3.3. PerlLoadModule
- 13.3.4. SetHandler perl-script
- 13.3.5. SetHandler modperl
- 13.3.6. PerlSetEnv
- 13.3.7. PerlPassEnv
- 13.3.8. PerlSetVar
- 13.3.9. PerlAddVar
- 13.3.10. PerlPostConfigRequire
- 13.3.11. PerlRequire
- 13.3.12. PerlOptions
- 13.3.13. PerlSwitches
- 13.3.14. POD
- 13.4. mod_perl Handler Directives
- 13.5. Apache Life Cycle Overview
- 13.6. Perl Apache2 Modules
- 13.7. Summary
- 14. Using mod_perl Handlers
-
15. More mod_perl
- 15.1. mod_perl Handlers or ModPerl::Registry?
- 15.2. Dealing with Cookies
- 15.3. Generic Database Methods
- 15.4. Session Management
- 15.5. File Upload mod_perl Handler
- 15.6. Templating
- 15.7. HTML::Template
- 15.8. HTML::Mason (Mason)
- 15.9. Summary
-
16. Perl and Ajax
- 16.1. What Is Ajax?
-
16.2. mod_perl Applications and Ajax
- 16.2.1. Basic Ajax Examples
-
16.2.2. More Examples Using the JSON Perl Module
- 16.2.2.1. Ajax Example 3: Building the Table on the Client
- 16.2.2.2. Example 3: mod_perl Handler
- 16.2.2.3. Example 4: MySQL Ajax Client
- 16.2.2.4. Example 4: mod_perl Handler
- 16.2.2.5. Example 4 in Action
- 16.2.2.6. Example 5: Reading the Raw Post Data
- 16.2.2.7. Example 5: mod_perl Handler
- 16.2.2.8. Example 6: Using the Prototype JavaScript Framework
- 16.2.2.9. Example 7: Account Creation with Ajax
- 16.2.2.10. Account Page mod_perl Handler
- 16.2.2.11. Account Page Template
- 16.2.2.12. Account Handler
- 16.2.2.13. New WebApp Method sendEmail()
- 16.2.2.14. Ajax Account Creation in Action
- 16.3. Summary
-
17. Search Engine Application
- 17.1. Using Gearman to Put the Search Engine Application Together
- 17.2. The Search Engine Application
- 17.3. mod_perl Handler Web Applications
- 17.4. URLQueueHandler handler() Subroutine
- 17.5. Summary
- A. Installing MySQL
- B. Configuring MySQL
Product information
- Title: Developing Web Applications with Perl, memcached, MySQL® and Apache
- Author(s):
- Release date: July 2009
- Publisher(s): Wrox
- ISBN: 9780470414644
You might also like
book
What's New in Apache Web Server 2.2?
What's New in Apache Web Server 2.2? shows you all the new features you'll know to …
book
PHP 5 Unleashed
Over 12 million Internet domains worldwide use the PHP language to power their websites. If you …
book
Preventing Web Attacks with Apache
“Ryan Barnett has raised the bar in terms of running Apache securely. If you run Apache, …
book
Open Source Web Development with LAMP: Using Linux, Apache, MySQL, Perl, and PHP
Open Source technologies are providing contemporary developers with a range of cost-effective and robust alternatives to …