August 17th, 2001


Friends check, possible cache, image front end, ninjas

Hi folk. I was thinking about seeing what I could do about making the "Friends" link indicate, in some way, if there are any new entries from your friends. In other words, do what the various clients do, hopefully making a very quick and "light" check to the db that would, hopefully, prevent users from hitting the Friends link all the time if there aren't any new posts. Judging from a request I read somewhere about "please try to use a client that makes a light check on the server if possible", I was thinking this might help out the db load a great deal. However, I might be overlooking something, like maybe having that check on the web site itself would cause more of a problem than it would solve? Need some sort of input as to whether this is worth looking into.

I'm also trying to come up with some method of "caching" the friends page requests so that, if nothing has updated since the last time, the user would cause nothing more than a quick "anything new?" check on the main db and if nothing is new, get the results off a separate db. (which I'm not sure whether should be flat desk, another mysql db on another server or maybe even on the same... no idea as of yet what would work out well) What kind of space are y'all working with? (free disk space mostly) Granted, I haven't had time to really think this through so it might be a really bad idea .

All in all, what are the worst bottlenecks right now? Database traffic? Web server traffic? Ninja's attacking the servers? =)

I was also aiming to write a small, quick image front end that would basically figure out which image to pick instead of just going directly to it. In other words, lets say you have image files for 0 - 40 posts, which of course would grab image0, image1, image2,.... image40, after 40 you get a broken link currently. The front end would instead get you an "out of range" (maybe imageoor) one. The script would obviously need to be run on so it would be able to know how many images there are. Does this sound like something that would be useful in y'all's eyes?

Enough babble. This is my way of saying hi folk. ;)

More S2 fun

Just checked in a bunch more S2 work for mart. (told you I would, dormando)

You can now do this and have it spit out this. You can see the builtin implementations here. In that example, object interpolation in strings is done by accessing the class' asString string member, but if your class has a function named toString() with a return type of string, then it also just magically works (as seen here).

The only big problem remaining (as noted in BUGS) is that we need readonly or private class members (so you can't assign directly to a color's r/g/b values).

Oh, the big benefit of this batch of changes is that you can now do:

set bgcolor = "#ff0000";

and bgcolor is of type Color, not string. so the resultant backend code looks like:

register_set(1,"bgcolor",["#FF0000", sub {
my $_ctx = shift;
return LJ::S2::Builtin::Color__Color($_ctx, "#FF0000");

Anyway ... have fun. I think the S2 language stuff is done... new work will all be on the web interface while mart finishes up the core.s2 file.
  • build

LJ AIMbot updated

Hey everyone. I updated the LJ AOLIM bot.

Now it will only post messages sent from a 'master,' which presumably is the users's AOLim.

All error messages and any messages inadvertently sent to the bot will be automatically posted to the master.

The bot will also automatically reconnect if it is for some reason disconnected.