sábado, 1 de mayo de 2010

And so there was light!

After a lot of thinking about the problem of turning the project distributed and a long time of "rest" (if we could say that), we start working one week before the last delivery, praying for ideas came to our minds. When Martha achieved the connection between the client and server, which was a major step forward, even that was a big problem as we had to modify the table and each customer could be independent... : S
At last on Wednesday, after long time thinking and with an incentive (a good cup of coffee and a delicious slice of pay XD...) and so there was light! I got inspiration to my head. I was designing the protocols that would make it possible that the system would work as distributed... after long hours I could make an outline of what each protocol should do, indicating what would be done on the server and client sides. Then we would only follow the recipe and pray Alfonso and Martha could implement them and make the system work!
Only a few hours left for dawn and share this idea with my friends, and work in the implementation.

The (almost) last post

So after a long long long wait, we’re back to this blog, just to tell how fast and how easy it was to end this Project.

After like a month of doing nothing (actually working for other projects), we got back to work on Tuesday. My teammates commenced doing research on java sockets, and using the code provided by the Programming teacher Ariel Ortiz, which involved the use of a single java socket for both client and server for clojure, using an agent to control concurrency, Martha was able to implement a code that copied the database from the server to the client, so the client would always have the most up-to-date version. On Wednesday, Karen began to work with that code, and tried to implement the code that would make updating, creating and deleting possible in a distributed way, but she realized that it would be too complicated to start from scratch, and she designed the protocols for every transaction, which proved to be very useful later (for more information, see Karen’s post)

After the protocols were designed, Martha and I checked them, and began to implement them. Thank god it was pretty easy, and we just technically followed by the book the protocols and in a couple of hours we had already implemented the easiest ones. The next day, in a free hour and half before our class, we had already implemented all of them, and almost all of them were working, except for the update protocol. Today, we met in my house, and we’ve made everything work, in a local and distributed way. (for more information see Martha’s post).

It’s pretty interesting for me how much we have learned with this project: a whole new language, and so much more about java’s API and its internal logic. I’m happy to know that our big effort to make good code for the first delivery paid off, and we were able to finish the project in no more than 4 days.

It seems like we’re done now =), we’re happy like hell, and we’ll just ask for some help to make the jar work on Monday and we’ll be absolutely done. If you’re visiting this blog, please don’t forget to vote! See you in our next (and hopefully last) entry.

The pursuit of knowledge...

In the beginning there was an utter lack of knowledge, it was as if the team was smothered in the dark depths of ignorance. With the dawn of the project the noble team began to see the light at the end of the tunnel hoping to see the sun rise. As the blindness became unclouded the team began to take control of the clojure monster, commanding it to do what they wanted and not the other way around. But then the first revision came and master Ariel summoned them to his cubicle. Standing there, in the four-walled palace, the team was fearful of the master’s reaction and hoped not to leave him unsatisfied; but the brave teammates were able to overcome all obstacles and depart with the highest score. Unfortunately the noble knight and the two princesses weren’t able to carry on with their clojure quest for quite a while. One month later, the good master announced the final adventure was about to begin and the noble programmers where reunited. First, Princess Martha worked on the pioneer adaptation of the distributed version of their program, successfully making the server to send the whole database to the client. The labor then passed to Princess Karen who bravely designed the protocols through which the hosts would communicate. Finally noble Prince Fonz and Princess Martha worked through sunrise and sunsets without rest so the ultimate release could be done on time. During this two-day journey the valiant teammates dealt with errors, monstrous exceptions and dreadful uncertainties, but never gave up and eventually came up with a solution and countermeasure for each obstacle except for one: the abominable jar. Hopefully with some help from master Ariel’s magic and knowledge the audacious nobles will finish on time, so stick around for more of this tale and don’t forget to visit the gallery for some pictures of their adventures.