Log in

No account? Create an account
Adding Mode to server response. - LiveJournal Client Discussions — LiveJournal [entries|archive|friends|userinfo]
LiveJournal Client Discussions

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

Adding Mode to server response. [Mar. 21st, 2003|08:24 pm]
LiveJournal Client Discussions


I am currently writing a client for LJ in ruby for the heck of learning and more experience of following specs. At the moment I am simply working on the inner core and forgetting about the user interface side of things.

One thing that has come up from testing so far is that the server responses do not include the mode they are for. This would be very useful for determining what should parse the response and would prevent the need to possibly parse the response straight away.

My plan is have a request queue and a response queue and do it that when a response is get from the server it is passed to a method of the Request object (i.e LoginRequest) which will spit out a "proper" response object i.e. LoginResponse or GetFriendsResponse which will then be plopped into the queue to be dealt with at some point.

Does anyone else think a mode entry in the server response would be helpful?

(Deleted comment)
[User Picture]From: duemoko
2003-03-21 01:25 pm (UTC)
Good point wooble, somewhere along the way my brain started thinking about asynchronous comms.

(Reply) (Parent) (Thread)
[User Picture]From: anam_uk
2003-03-21 01:00 pm (UTC)

more ruby clients

I'm intrested to see what you end up with as I have a ruby client myself, if you want to pull it apart its over here but it has a fullish gtk UI enjoy
(Reply) (Thread)
[User Picture]From: duemoko
2003-03-21 01:17 pm (UTC)

Re: more ruby clients

Thanks, I will have a look but more likely when I get further along. I want to try and not influence myself to much yet :)

I'll let you known when I finish, the core should be done over the weekend, maybe even a gui but probably not.
(Reply) (Parent) (Thread)
[User Picture]From: lxsli
2003-04-25 09:51 am (UTC)

Re: more ruby clients

I made a new thread to continue this... check lj_clients if you're interested
(Reply) (Parent) (Thread)
From: evan
2003-03-21 01:10 pm (UTC)
Why not just check the head of the Request queue to get the type of response? If the protocol allowed responses to possibly come out of order this might be an issue, but it does.
(Reply) (Thread)
[User Picture]From: duemoko
2003-03-21 01:30 pm (UTC)
If the protocol allowed responses to possibly come out of order this might be an issue, but it doesn't.

As I said to wooble, thanks somewhere along the way my brain started to think about async comms.

For the other bit, I will have my request object, which I could ask what mode it is for and pass the mode and the httpresponse object to a factory class which will return a "proper" response object that will be placed into the response queue for being dealt with later.
(Reply) (Parent) (Thread)