Log in

No account? Create an account
LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

A postevent question [Aug. 13th, 2002|11:34 pm]
LiveJournal Client Discussions
[music |J.S. Bach - Prelude No.13 in F-sharp major]

Is there really a need to post a current_moodid? If I'm sending a current_mood the server automatically looks it up and applies the appropriate icon if one exists right? If that is true, I can't think of one good reason to keep moodid numbers around after downloading moods initially. If I keep an array of strings that represents the downloaded moods, the number of elements in the array also represents the highest moodid.

Any input?

Oh, I don't plan to show a hierarchal view.

From: piman
2002-08-13 11:04 pm (UTC)
No, some moodids are missing. So either your array has blank spaces, or it's the wrong length for moodids.

Also, my guess is that moodids are smaller to store on the server than moods (int versus the length of a string, plus the overhead of storing a string), so it'd probably be better to send moodids when possible (LogJam does the checking for the mood string matching a moodid itself, or at least when I just typed "Good" as my mood, it changed it to "good".)
(Reply) (Thread)
[User Picture]From: phil99
2002-08-14 03:48 am (UTC)
As far as I am aware, sending moodid is better for everyone. Caching moodids is good because it means less load on the server every time you log on.
(Reply) (Thread)
[User Picture]From: dottey
2002-08-14 04:57 am (UTC)
I'd also guess that moodids are better, because sometime in the future moods will be translatable - I think. So it won't be strictly English words anymore.
(Reply) (Thread)
[User Picture]From: benzado
2002-08-14 06:43 pm (UTC)
1. The server does not automatically apply icons. If you send a mood and no mood ID number, there will be no icon (though the mood will be displayed). I think the idea is that the lookup has to happen on either the client side or the server side; it might as well happen on the client since the server has enough work to do.

2. The protocol does not say that the mood IDs are sequential. It may be true that your array length equals the highest ID, but you shouldn't assume that. If anything changes on the server side, your client might break.
(Reply) (Thread)