Saturday 29 December 2007

Development has started

Over Christmas I used a few days to just sit on the implementation. What has been done till yet: Client:
  • 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,...)
Server:
  • First attempts to create TCP connection
I will continuew to work intensively for a few more days and then I will start prepairing for exams.

Tuesday 25 December 2007

Next Step

So, I finally finished my interim report. No the next step is to start with some implementation work. I first want to start with the main protocol and then I will look further. For now I wish everyone a merry christmas!

Sunday 16 December 2007

Interim Report

Having serious problems with my Laptop last Weekend, I finally fixed it and am now able again to continue with my work. I requested a computer from DIT just in case my machine would brake down over Christmas. As this event interrupted my work I talked with my supervisor and we arranged a later submission-date for the interim report. Having done a decent amount of work for it, I will start with the implementation stage shortly.

Thursday 6 December 2007

Interim Report

Finally the Assignments are over and I can start with the interim report. Till now I mostly did some research in case of the protocol. I have a rough Idea of how to implement it now. The propably hardest part will be the implementation of file transfers, but I will see. This kind of stuff is being used regularly all over the web and should not be too complicated.

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.

Sunday 18 November 2007

Busy with Assignments

Since weeks i'm busy with my assignments. Today I finally finished the distributed systems one which was really hard get running. Especially since I'm trying to make them nice. I did some research into http using java. It will be a little tricky to get it running how I want it. One point is that HTTP comunication is not persistent, i could solve this using a session id. A concerning thing is a missing callback function. I need to have a look whether it is possible to implement it this way that I won't close the PrintWriter on the server side. I'm just afraid that as a result I could get timeout errors. But first I need to go a little deeper into this subject. I'll start to really work with it when I got rid of those assignments.

Monday 15 October 2007

Blog Setup

Blog Setup

So, I finally made it to setup a Blog for my final year project. I know it's quiet late but still better than never. This is a small List of Requiremnts I have set to myself till yet. All include a vague estimation of their difficulty to implement and a necessarity in %.
  • Users can create a new Account - Easy - 100%
  • Users can Add Entries to a Blog - Easy - 100%
  • Users can find Friends - Medium Difficult - 100%
  • Will take a while as invitations have to be sent confirmed and denied
  • Users can read Messages - Medium Difficult (necessarity check needed)
  • Users can setup their page - Easy 100%
  • Users can select a layout for their page - Medium -50%
    • I will try to use simple CSS and DIV Backround.
    • And Example for this method would be Bebo.
  • Users can select and Avatar - Medium Difficult - 100%
  • Users can Upload Pictures into a Galery - Difficult - 50%
  • Users can Post YoutubeVideos and other apps on FrontPage - Medium - 30%
  • Users can create Groups
Main issues would be to learn JSP (Should be very straight forward since I know ASP and JAVA). A harder issue would be image handling since I will have to retrieve, resize and store plenty of images in propably different formats.

Instant Messaging App

  • Users can Message each other - Easy - 100%
  • Users can Find new Usres - Medium - 100%
  • Users can connect trhough firewalls and Proxies - Difficult - 75%
  • Users can transfer Files - Difficult - 30%
  • Users can upload Stuff to their Blog
  • Users can view others Avatars - Medium Difficult
  • Users can upload images to their galeries - Medium difficult - 50%
  • Users can block other users
  • User profiles are being stored on server - Easy - 50%
  • Users can see if other side is typing - Medium - 10%