Prev | Current Page 80 | Next

Alexander Kolesnikov

"Tapestry 5: Building Web Applications"


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.
??? ??? ???
The Foundations of Tapestry
[ 64 ]
In reality, Tapestry maintains a pool of instances for every page, and when a page is
requested, it takes an instance from the appropriate pool to serve that request, and
then returns the instance to its pool.


Pages:
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
bajka Tango Olsztyn pozycjonowanie typy bukmacherskie dieta light