Dear all,
From yesterday we have the memcache like caching in Aida. That is, the integrated caching support to serve from cache instead regenerating the content at each request. Here is short docs with how-to and some advices of usage: http://www.aidaweb.si/caching.html I did some benchmarking on VW and achieved 170 req/s for 4KB login page, comparing to 30 of generated one, that is 5x faster! I'm proud of myself on the way I made this caching: I went to a walk and my brain just wanted to solve the caching in Aida. So I let him to solve. After I came back it took me just an hour or two to implement it:) In the next step Nico will port it to Squeak, then Scribo is a first candidate to use this caching in practice. Namely we have frequent Denial of Service attacks on Squeak website in recent days and caching could help a bit. Best regards Janko -- Janko Mivšek AIDA/Web Smalltalk Web Application Server http://www.aidaweb.si _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Hello Janko,
JM> I'm proud of myself on the way I made this caching: I went to a walk and JM> my brain just wanted to solve the caching in Aida. So I let him to JM> solve. After I came back it took me just an hour or two to implement it:) Bed an some other place serve the same purpose :-)) 5 times faster is an impressive achievement. Cheers Herbert mailto:[hidden email] _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Hi Herbert,
Herbert König wrote: > 5 times faster is an impressive achievement. Consider how impressive can be if you generate a page from some database instead. 50 times faster at least, I'd guess. Also, for very frequent sites you can cache just say 5 seconds and this already have a big impact. I noticed that technique at http://stackoverflow.com, where you won't notice caching of the first page until you ask a question and then see that it comes on first page with a slight, hardly noticeable few seconds delay. Best regards Janko -- Janko Mivšek AIDA/Web Smalltalk Web Application Server http://www.aidaweb.si _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Janko Mivšek wrote:
> Consider how impressive can be if you generate a page from some database > instead. 50 times faster at least, I'd guess. Also, for very frequent > sites you can cache just say 5 seconds and this already have a big > impact. I noticed that technique at http://stackoverflow.com, where you > won't notice caching of the first page until you ask a question and then > see that it comes on first page with a slight, hardly noticeable few > seconds delay. That's the right way to do it. You cache different parts of the web site different amounts of time, ranging from most changable data (few seconds only) to least ones (few ten or hundred of seconds). But there are caveats, you can't just cache everything. I understand, you've got a new hammer and now every problem looks like a nail. :-) Just be careful, caching can lead to bizzare situations if used without careful thought. But it's also a great tool and like all other tools, one needs to learn how to use it properly. Your advices on Aida cache supage are great and should be respected. It's like SEO - only trial & error will do. :-) Congrats Janko! This is great milestone! br, Damir -- Kleko računalniške rešitve Damir Horvat s.p. Glavna cesta 54 8233 Mirna Id za DDV: 54999448 email: [hidden email], [hidden email] www: http://kleko.si telefon: 030 387 933 Skype: dhkleko _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
In reply to this post by Janko Mivšek
Hello Janko,
JM> > 5 times faster is an impressive achievement. JM> Consider how impressive can be if you generate a page from some database JM> instead. 50 times faster at least, I'd guess. Also, for very frequent I think that depends. If objects are in memory and and the few changed objects can notify the few views via dependency to invalidate the cache, the overall gain is big. If you have e.g. a mysql backend you would have to go there and look for changes that invalidate your cache which might eat up your gain even if if it turns out the cache stays valid. But it's great to have caching at hand when you need it, mainly for static content as you said in your initial mail. -- Best regards, Herbert mailto:[hidden email] _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Free forum by Nabble | Edit this page |