Book Image

Tapestry 5: Building Web Applications

Book Image

Tapestry 5: Building Web Applications

Overview of this book

Table of Contents (17 chapters)
Tapestry 5
Credits
About the Author
About the Reviewers
Preface
Foreword
Where to Go Next

Tapestry Pages are Pooled


Tapestry was designed with great scalability in mind. This means that a Tapestry application should be able to easily handle a huge amount of concurrent users, and for this, it should spend minimal efforts to serve every individual request.

Say, a user requests the Start page. Should Tapestry create an instance of this page especially for this user and discard it as soon as the user will go to another page? This wouldn't be efficient, as the next moment, twenty other users will come and request an instance of the Start page. It would be reasonable not to discard, but to reuse the instance that was just used for the first user.

However, there is a potential problem. The page might have some sensitive data put into it by the first user—say a password, or anything else. To avoid this problem, Tapestry will wipe clean the instance used by the first user before giving it to any other user. It will reset all variables on the page class to their initial values.

In reality...