Thursday, November 4, 2010

04 November 2010 - Bonjour Completed! :D

Completed the last stage of our Bonjour application today! :D we were able to do the synchronization of the displays fairly quickly. After that we also spent quite some time on trying to solve the memory leaks that we have. Learnt quite a lot about the Leaks Instrument today. I guess we better do proper memory management next time as we code. If not, we would have to spent a lot of time trying to solve leaks, especially with big projects.

Tried solving the problem with UIAlertView's memory leak, but to no avail. It wasn't much of a big problem though. Found this link while looking for solutions, might come in handy next time :)

This application is just the cherry on the cake. Since we have completed the cherry, it's time for us to start working on the cake. We must complete the cake! Therefore, we are gonna start on OpenGL next week! Sounds fun. Hehe.

Wednesday, November 3, 2010

03 November 2010 - Bonjour, multiple iOS sending data to OSX (listener)

Started the day with the setting up of the MacBook Pro as we need a third simulator to simulate multiple iOS-es. While doing that, we did research on how to go about having our listener receive data from multiple iOS-es. Spent quite a long time trying to do research, but in the end, nothing much could be found. Therefore, we decided to try things out ourselves.

Currently, our application has only instance variables for one NSInputStream and one NSOutputStream. This definitely cannot cater for multiple users. Then I thought that since we have the stream delegate, adding the various different streams into an array whenever there is a new user would not be a problem. I went on to try that out and it really worked. Our server was able to receive data from multiple users.

However, there was still one problem. Data sent from multiple users were merged together as they were all making use of the same instance variable that we have on the server, which is used to store leftover data. We went on to research on how to get the client's device name the moment a connection is established. This way, we would be able to identify the different users and have individual NSInputStreams, NSOutputStreams, as well as leftover data for each user. We spent quite a long time trying to get an answer, but all we could do was to retrieve the client's IP address. From there, we reworked our application in such a way that it takes in the device's IP address instead of the name.

We managed to complete the second stage of the application today - having multiple iOS-es connecting and sending data to the listener (OSX). We would be working on the third stage tomorrow - one client sends data to the server, the server receives the data and sends this data to all connected clients, resulting in synchronized displays on the server, as well as all clients connected to the server.

Tuesday, November 2, 2010

02 November 2010

Kevin discussed with us on some of the things for us to work on. For now, we'll have to work with the Bonjour protocol where one Mac OSX would be the listener, and multiple iOS devices would be able to send data over for interactions to occur.

There are three stages to this. First, we'll have to setup the listener, which is the Mac OSX, and allow a single iOS device to connect to it - e.g. when iPad A does zooming, it would be reflected on the listener's display.

Next, we would have to work on having the listener listen to multiple iOS devices connecting to it - e.g. when iPad A does zooming, it would be reflected on the listener's display. When iPad B does zooming, it would be reflected on the listener's display as well.

Last, we would have to ensure that all devices connected to the listener would be synchronized - e.g. when iPad A does zooming, this would be reflected on the listener's display, as well as iPad B's display. When, iPad B does zooming, it would be reflected on the listener's display, as well as iPad A's display.

Here is the picture showing our milestones:

We have completed the first stage and are now setting up the MacBook Pro to be used in testing multiple iOS devices.

Monday, November 1, 2010

01 November 2010 - Bonjour Application, Verge of Completion?

Completed the splitting and merging of data packets today. It wasn't that much of a trouble. Once we got that going, we were able to solve the rest of our consistency problems over different devices.

After showing our application to Kevin, we are now tasked to include multi-point interactions for the application. Once this is done, version 0.1 of our application would be ready! :D

*edit*
Now we're facing problems with multi-point interactions. The buffer size for data is either too small, or too big. If we set the buffer size to 512, and multi-point interaction occurs, we get an error. If we set it to 1024, and single-point interaction occurs, our application would not run properly as we're sending only small amounts of data.