Tuesday, 19 May 2009

Working On Protocol

I'm working on the core go protocol. I'm inspired by Go Text Protocol (GTP) version 2 even though GTP is mainly used for computer to computer comunication. There are few issues need to address:
  • Character set - Unicode
  • Encoding - in UTF8
  • Transportation format - in XML, particularly in DOM

Friday, 15 May 2009

Let's Coding

Finally, it comes to the most exciting phase - coding. I'm going to implement the basic services (Game and Message) on PCs with J2SE, the management services (Account, Billing, Feedback, Rating and Ranking, etc.) on servers with J2EE or JSP, and eventually the basic services on mobile phones with J2ME. The primary programing language will be Java, which I have never ever written an application with. I believe it will be a very very interesting experience.

My next steps will be:
  • To implement a set of core classes that will be used for testing my design
  • To develop application protocols that will be used for communication among different components. Game Protocol should be the first one due to the nature of my project.
  • To build an environment that will allow me creating and testing my system.

I didn't realize that I was running an very old version of Red Hat Linux on two aged machines as my home servers until recently. It seems like I have to update my servers as well. There are enough work to do for now. Don't stop, just keep going. :)

Monday, 11 May 2009

Next Stop: JXTA - An Open Platform for P2P

While I was researching on different P2P technologies, JXTA came to my attention. "JXTA (Juxtapose) is an open source peer-to-peer protocol specification begun by Sun Microsystems in 2001. Sun remains actively involved in the development and promotion of JXTA. The JXTA protocols are defined as a set of XML messages which allow any device connected to a network to exchange messages and collaborate independently of the underlying network topology. JXTA is the most mature[citation needed] general purpose P2P framework currently available and was designed to allow a wide range of devices - PCs, mainframes, cell phones, PDAs - to communicate in a decentralized manner." (Quoted from Wikipedia http://en.wikipedia.org/wiki/JXTA)

JXTA is indeed language-independent. There are C/C++, J2SE and J2ME implementation available for now. JXTA is also platform-independent. It can be implemented on different OS platforms. Simply speaking, it is an open technology just like TCP/IP. It sounds perfect, doesn't it? I think it fits into my project because:

  • It is an open and generic purpose P2P technology - It defines a set of protocols that developers can use to build almost any P2P application. At the same time, these protocols are flexible enough to be easily adapted to application-specific requirements.
  • It is platform-independent - This is one of my project's goal.
  • It is open sourced - Sweet and smile.

However, some concerns and uncertainties still exist.

  • Is JXTA going to be improved over a long time?
  • Is JXTA going to be surviving given that Sun will be purchased by Oracle?

I've checked JXTA's developers list and list of projects which are using JXTA. I didn't find one significant enough to attract public attention. Is it still too early to adopt an new technology as JXTA? I don't know. I'm not worry about Java, but I'm worry about those guys who are contributing to JXTA project. Without the major supporter Sun, is JXTA able to grow?

Any ways, I know what I'm going to do now. I was inspired by P2P technology. I have decided that my system should be easily integrated with P2P, or should not be tied to a single architecture, e.g. client/server technology, at least when it comes to design phase. A new design class diagram is done. An abstract network/message layer, which will be implemented according to actual underline network, was added. Hopefully this design is flexible enough to be implemented in the future.

Wednesday, 6 May 2009

P2P or C/S? It Is Not Just A Technical Consideration

I have been always thinking the architecture of new system should ideally not be pure Client/Server because of the concern that

  1. server's operating cost potentially will be very high, and
  2. it will be very hard to maintain servers with high volume of transactions

I have experienced the difficulties of accessing TOM servers when there were major events hosted on their servers. From what I observed, the maximum number of concurrent users in each server is about 2500 - 3000. I can not even connect to any of their four servers some times because they are all full load. I don't have similar experience with KGS or IGS, but from what KGS shows on their server's statistics page, I can tell the maximum number of concurrent users never exceeds 3000, besides the data traffic is huge (total data for the day of May-06-2009 is about 128GB). See the screen shot at the bottom for reference. I don't think it is easy to run such a system in the early stage before I can get financial support from outside source.

My colleague James introduced me to book P2P - Networking and Applications, 2009 by Elsevier Inc, ISBN: 978-0-12-374214-8. I have to say it is an excellent book. It not only answered me so many questions (theoretical and practical), but also directed me to a much brighter future. I feel it is even more fun to work on this project.

Sure my application is quite different from most popular P2P applications, which are mainly for file sharing or multimedia streaming. But from content delivery point of view, it does the very same thing that is delivering contents to as many receivers as possible by means of high efficiency and low cost. So it is interesting to find out:

  1. Is P2P applicable to my system?
  2. If it is, what complexity will be added to my system?
  3. What will be the impacts of using P2P model in my system from business perspective?
  4. Should I build it from scratch or based on third party platform if there is such a platform?

All above questions have to be clearly answered before I move on to next phase of project, which is Architecture Design.