- Added a bunch of comments to new dispatcher code
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Manual / SuccessStories.pod
CommitLineData
8e40e7ef 1=head1 NAME
2
3Catalyst::Manual::SuccessStories - Catalyst rocks!
4
5=head1 DESCRIPTION
6
d01df17d 7Catalyst is great, no question...
8e40e7ef 8
9=head1 STORIES
10
f531dd37 11=head2 Early Maypole -> Catalyst porting (Jesse Sheidlower)
12
13The original version of the Oxford English Dictionary's
14Science Fiction web site, now at
15L<http://www.jessesword.com/sf>, was written as plain CGI
16scripts. (No, it's worse than that. It was written as .shtml
17pages, with the SSI shelling out to a Perl script that
18generated HTML. And yes, this was written after 1996. So sue
19me.) While this was mostly satisfactory at one time, as the
20site grew there were very many problems introduced by this
21system. I decided to upgrade it to a modern system based on
22L<Maypole> and L<Template Toolkit|Template>. Among the
23user-visible features added were proper paging of the result
24sets, a search function, and the linking in of the OED's
25massive citation database to show all the quotations collected
26by the OED for each term. Back-end features included a
27mod_perl based framework, an extensible OO structure, proper
28templating, and the like.
29
30After some desultory work - I have a day job - a perfectly
31working Maypole-based system was ready. However, at this point
32development on Catalyst was going strong, and it was clearly
33the wave of the future for Perl-based MVC frameworks. Also,
34I was irritated by some features of Maypole, in particular its
35habit of setting up an enormous amount of structures for you
36regardless of whether they were needed. Since I was trying to
37optimize this application, I wasn't thrilled with the idea of
38having literally dozens of unneeded database calls on every
39request; it wasn't easy to switch this off without overriding
40large swathes of Maypole.
41
42So I delayed the launch of the new site to port it to
43Catalyst. This took less than a day. My initial benchmarks
44showed a remarkable speed increase, in the range of 100-250%,
45depending on the type of request. (For example, on my
46development server, I had been getting 16 pages/second under
47Maypole for a "view" page that displayed a single full record;
48under Catalyst this jumped to 57 pages/second.) After a week
49or so of public beta testing, I shifted the entire site to the
50new system, e-mailed Slashdot, and waited for the onslaught.
51
52When it hit Slashdot, things held up very nicely. (Some early
07e73f82 53error pages, embarrassingly pointed out by a Slashdot poster,
f531dd37 54were in fact caused by a lack of available MySQL connections,
55for which misconfiguration the DB admin was harshly
56criticized, rather than from any app-specific failings.) In
57the hours after slashdotting, the app averaged about 3,000
58pages/hour, each representing a dynamic database-generated
59page; the total requests averaged about 30,000/hour. During
60this period the perceived speed of the app was extremely
61snappy. After a small bump in the first minute, the load
62average on the server was less than 1.0 the whole time,
63usually under .3. Other apps running on the server were also
64unaffected.
65
66The ease of use and speed of Catalyst contributed greatly
67to the success of this site.
8e40e7ef 68
69=head1 AUTHOR
70
71Sebastian Riedel, C<sri@oook.de>
f531dd37 72Jesse Sheidlower, C<jester@panix.com>
8e40e7ef 73
74=head1 COPYRIGHT
75
76This program is free software, you can redistribute it and/or modify it under
77the same terms as Perl itself.