Sunday 10 February 2008

Work on messaging System goes on

I only worked on the server and database related stuff. Todays work mostly contained work on dealing with messages. This was actually much more work than I originally expected. Having to deal with message de and encoding to/from a sendable format, identfying users involved and dealing with messages to offline and HTTP hidden users. Only the fact that the recipient could be a Chatroom with a number of users makes the situation much more complicated. All in all plenty of work. I am still not sure how to deal with that log. My latest idea is to store it as textfiles to reduce load on the database, but here again I am not sure whether this would be faster at all and how to synchronize it. One way would be a Buffer which is being emptied into the Log after time intervals. Furthermore two log Files would be stored which work accross the servers.
  • HTTP Log: Would be filled by the Socket server and read + emptied by the HTTP Server.
  • SOCKET Log: Would be filled by the HTTP Server and read + emptied by the Socket Server.
The main problem is just how to read those while the other side is writing on them? Probably just wait a few millisekonds and try it again. But again, it all only seems to be good if it is faster than a Database. I will have to consult some Database experts probably ;-)

No comments: