January 21st, 2001

  • muerte

(no subject)

I've been thinking some more about the protocol to use and I came up with this. I'd make a request


Or something like that, then the server can return the following


and then it would return the data as follows

2001-01-01 00:29:00
2001-01-01 00:28:14

Where 123456 would be whatever the itemid is. So the data essentially would be the itemid a hypen and then the key. You could just repeat this until you went through all 250 records. Once my client recieves the 250 records it will make another request with the new offset being where it left off. Etc. Is that going to be all the data we're going to need to return or did I leave something out?
  • muerte

Attention VB developers:

hpassword - Alternative to plain-text password. Password as an MD5 hex digest. Not perfectly secure, but defeats the most simple of network sniffers.

I'm looking for a function for Visual Basic that will allow me to convert a password into an MD5 string. This is much preferable to transmitting the string in plaintext. If any of you VB gurus out there have one, please let me know.

MyLJ: syncitems mode

Okay, I created a new table (syncupdates) to keep track of when new items are added and modified, and the indexes are setup on that table to make it really quick to say, "SELECT ... FROM syncupdates WHERE userid=$userid AND atime > $date". (I just realized that indexes don't show up in the schema browser... hmmm...)

Anyway, I then changed the protocol modes 'postevent' and 'editevent' to keep the syncupdates table updated.

Then, I added the "syncitems" protocol mode, which returns a list of the items that have been modified since a given date. (the date of your lastsync).

Currently all items are prefixed with "L-" and then the itemid number. However, in the future we can sync to-do items, comments, etc.. all using this same table and protocol mode. So your logic in your program should be to ignore prefixes which you don't understand. If version 1 of your sync client doesn't understand T- prefixes, don't worry about it...version 2 of your client might understand them, and it could then send the syncitems request later with an empty date to get all the T- items and download them.

Anyway, here's a URL that does the new mode:


There is only one parameter to "syncitems", the "lastsync" date. However, in the above example it's excluded which means everything. However, it's not really everything... it'll give you up to sync_count items ... if sync_count == sync_total, then you're done (see the bottom of the output from the above URL)

The reason it's limited is because running it on my journal gave back a half meg response.... I want this this to run nicely even on users with modems. Plus, the client has a lot of work to do now, getting those 500 items anyway. (I actually had the limit at 1,000, but the test account only has 760 items so I brought it down to 500 for testing)

Now, say our client got those 500 items. Now we'd do:


And there are the remaining 260. sync_count==sync_total so we're done. (well, after you fetch them all)

Your client's store shouldn't update its "lastsync" date until after it has done getevents and got the items.

Also, each store should have a separate lastsync date for each item prefix type... that way when version 2 of your protocol runs, it knows it hasn't ever downloaded any comments or todo items, so it can rerun the sync from the beginning only caring about those new prefixes.

Next thing I have to do is just add a new select type to getevents to let it accept a bunch of arbitrary itemids to return.

Um, this is already long. I'm going to stop.

computer crap

(no subject)

Any WindowsCE developers out there??? Probably not, I was just wanting to take a poll to see how popular/possible a WinCE LJ client would be. Probably not since everyone uses Palm, and even if there were CE people, I bet they'd have 3.0 instead of 2.0 or 2.11. Grrrrrrr, WindowsCE is annoying.

mode=live !

I've been working on a kick ass LJ feature the past like ... uh, hour or so.

I was going to do it a clean way, but since nobody obeyed the spec, I then had to do it a netscape-proprietary way, but since IE doesn't support it, and Mozilla won't support it, I ended up doing it another kinda clean way, but I had to use frames and javascript.


Anyway, tack on ?mode=live to the end of your friends page....

There are two frames... a 100% frame showing your friends list and a 0% frame that reloads every 20 seconds... that frame hits friends?mode=livecond with a &lastitemid= parameter... it's very quick to find the last itemid of your latest friend's post, so I then compare it... if it's the same as last time, I just show a blank page and send the Refresh HTTP header again (oh, which I'd like to point out there is no spec for... IE and Mozilla both support two different ways of doing it, but not the same two ways!).

Anyway, if the friends page has changed, then some javascript is spit out that reloads the top frame. but I think I got the JavaScript wrong... I think I reload the whole frameset... actually, I know I do. this is ugly and makes everything flash white.... somebody want to send me the correct javascript?

yeah ---- fun stuff.

not sure if I should release this to everybody or just paid users... it's still a little more resource intensive, ya know?


in IRC we were discussing making it free for free users, but with a 60 second delay instead of like 15 seconds.
Peek a Boo!
  • tsutton

Hullo everyone

Brad added me and asked me to introduce myself here. So, I'm going to do that. :)

I'm Tony. I like helping out people. I have my own website (am not going to post my url here as I don't want to spam here, but if you want to look, check my profile) I usully bug Brad with errors I found and some ideas. But I thought it would be best if I posted my ideas here so I could share and discuss this with you all.

Well, that's all as I'm crap at introducing myself. If you have anything to ask about myself, ask away. :)
  • muerte

(no subject)

Oh good lord. Whoever set the style for this journal please set it for the "Day" view as well. As soon as you scroll back a couple of pages worth you get the ugly plain grey/white screen.