Preface
Liferay is the most popular portal based on open standards, written in Java. It was named Leader in Gartner's Magic Quadrant for Horizontal Portals. Many influential sites have been implemented with or have switched to Liferay Portal. The Liferay platform is highly scalable to serve millions of pages to millions of users on all web browsers, tablets, and mobile devices. We, at CIGNEX Datamatics, have implemented more than 200 large enterprise portals using Liferay since 2006. I was leading Liferay Practice at CIGNEX Datamatics with a staff of 240 Liferay experts. We have tuned many Liferay-based sites, and also trained many administrators and developers in Liferay. This book distills the hands-on approach of my project engagements into a concise, practical book.
Liferay Portal Performance Best Practices will explain to you how to implement high-performing, Liferay-based solutions by following various best practices. The book not only explains the best practices in detail, but also provides the detailed instructions to implement them. By following the logical flow of the chapters, you will learn performance-related best practices that should be followed during the architecture, design, development, deployment, and testing phases. You will also learn best practices for conducting performance tuning activities for a Liferay-based solution. By the end of this book you will have the advanced knowledge to implement a high-performing, Liferay-based solution.
What this book covers
Chapter 1, Architectural Best Practices, talks about the Liferay Portal reference architecture. It talks about various architectural options for implementing high-performing, Liferay-based solutions.
Chapter 2, Load Balancing and Clustering Best Practices, teaches you how to implement load balancing and clustering for a Liferay-based solution. It teaches you about various configuration options for implementing clustering.
Chapter 3, Configuration Best Practices, teaches you various configurations for improving performance of Liferay-based solutions. It talks about performance-related configuration options for the Apache web server, the Tomcat server, Liferay Portal, and so on.
Chapter 4, Caching Best Practices, talks about various options related to caching for improving the performance of Liferay-based solutions. It also teaches you how to configure Liferay Portal with the Terracotta cache server.
Chapter 5, Development Best Practices, talks about some of the key Liferay-specific development practices for developing a high-performing, Liferay-based solution.
Chapter 6, Load Testing and Performance Tuning, teaches you how to perform load testing and performance tuning exercises for a Liferay-based solution. It talks about best practices and guidelines related to load testing and performance tuning. It talks about how to monitor various resources during a load testing exercise in order to fine-tune the solution.
What you need for this book
The following is the software that you will need for Liferay Portal Performance Best Practices.
Liferay Portal 6.1 CE GA2 Tomcat Bundle (http://downloads.sourceforge.net/project/lportal/Liferay%20Portal/6.1.1%20GA2/liferay-portal-tomcat-6.1.1-ce-ga2-20120731132656558.zip)
Apache Web Server 2.x (http://httpd.apache.org/download.cgi)
MySQL Community Server 5.5.29 (http://dev.mysql.com/downloads/)
Terracotta Server Array, with Ehcache and Quartz (http://terracotta.org/downloads/open-source/destination?name=terracotta-3.7.5-installer.jar&bucket=tcdistributions&file=terracotta-3.7.5-installer.jar)
Who this book is for
Developers and architects who already work on Liferay Portal will find this book very useful. Also, system administrators who administer Liferay-Portal-based solutions will find this book very useful.
Conventions
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "Instead of using SingleVMPoolUtil
, we will need to use the MultiVMPoolUtil
class to store and retrieve objects from the cache."
A block of code is set as follows:
/arrows/01_down.png=0,16,16 /arrows/01_left.png=16,16,16 /arrows/01_right.png=32,16,16 /arrows/01_up.png=48,16,16
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
package com.connectsam.development;
import com.liferay.portal.kernel.cache.SingleVMPoolUtil;
import java.util.ArrayList;
import java.util.List;
public class SingleVMPoolExample {
public List<String> getTestList(String key){
List<String> listOfStrings = null;
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "In JConsole, navigate to the MBeans tab and then expand net.sf.ehcache | CacheStatistics | liferay-multi-vm-clustered."
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <feedback@packtpub.com>
, and mention the book title via the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <copyright@packtpub.com>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
Questions
You can contact us at <questions@packtpub.com>
if you are having a problem with any aspect of the book, and we will do our best to address it.