- 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.
Sunday 10 February 2008
Work on messaging System goes on
Saturday 9 February 2008
Database work is going on
Friday 8 February 2008
Working on the database
- A chat object with a userlist within the chat.
- A Database Log to allow communication between both servers.
Monday 4 February 2008
BuddyList exchange initially works
- In more detail: The buddylist will now be sent as single buddies and the client adds them one by one, instead of sending the whole bunch at once (Java automatically split my one message into several).
- The Avatar transfer went through a more radical design change. I decided to use a separate Imageserver and the client will download the images from the Avatar/Image Server using HTTP (no mather which connection is being used).
Sunday 3 February 2008
Protocol Implementation
Saturday 29 December 2007
Development has started
- Main Window Prototype
- First Localisation system
- Settings Reader/Writer
- Icon Handler
- Basic Image Handler (Still needs methods to write images as jpeg or png)
- Connection Interfaces designed (very early alpha stage)
- Many Util classes developed (File Handler, User Container,...)
- First attempts to create TCP connection
Tuesday 25 December 2007
Next Step
Sunday 16 December 2007
Interim Report
Thursday 6 December 2007
Interim Report
Friday 23 November 2007
Protocol
After researching again a little into available XMPP APIs I finally decided to create my own Protocol.
The main Problem here by is the http connection. It was a little tough to find information persistent connection using http.
I had a talk with Michael Collins and he told me that it's not possible anyway as http is stateless. He recommended me to use standard Sockets. As a result I did some further research how XMPP managed to connect through http and most important: receive messages from the server.
On Wikipedia I found a solution. It uses / used two approaches. HTTP polling and HTTP binding. For HTTP binding i will have to make some more research.
Polling
Polling is very simple.It uses frequent GET and POST requests to the server and the server replies all messages which have been stored.Binding
Binding is a little more complex. Wikipedia says, that it uses longer lived HTTP connections. I interpret it in a way, that the server sends out all messages but it won't close the connection. It could be compared with viewing a web site using a bad internet connection where the page is being loaded slowly line for line. Difficulties for this approach would appear in many ways. How tom implement it that the server will not create xxx bound connections to one client, as the connection is bound only one way. Another very important part is how to deal with time outs?
A Possible Solution
I also found out that XMPP also uses Standard Sockets - as recommended by Michael Collins. My idea is now to create a double implementation. Using standard Sockets and as an alternative HTTP if a socket connection could not be established. This would requires a good and clean implementation to avoid time loss due to unnecessary double implementation. Standard sockets for with full support how it is supposed to be and HTTP polling with a refresh rate between 1 and 20 seconds. This would slow decrease the response speed, but it would still allow a considerably good communication. As this is a quite large project I am considering HTTP binding only as an option if enough time is left in the end of the project as implementation would be unnecessary complex for the benefits in comparison to Polling. Nevertheless binding still gives enough potential should this project become a commercial success and a reduction of server load would become necessary.
File Transfer
For file transfers I would need to create separate connections. I am not 100% sure of how to implement it but the general idea is there. For legal and performance reasons all file transfers between clients would be set up using Peer to Peer socket connections. For file transfers between the server and it's clients I have two approaches in my head. One would using only HTTP GET and POST and the other would be the usage of Sockets if a socket connection exists. Which I approach I am going to take, I will have to decide when the basic communication is works.
