Monday, July 15, 2024

kyky is the new Component Design Champion

Friday, June 29, 2007
by the Design Review Board
TopCoder Members

After three days of on-site finals, kyky emerged as the winner of the 2007 TopCoder Open Component Design competition, taking home the top prize of $25,000. bendlund took second place, and oldbam took home the third.

Wednesday, June 27, 2007
Round 1: File Delivery
by adic

We've all had problems with sending files as attachments through email. Either the attachment is too big or the email server has some crazy antivirus system that will not let your attachment through. The File Delivery component (or better said, application) comes to address this problem. It is basically a Web base file storage solution. You can go to a site where the application is installed, upload the file you want to send, and then specify the email address(es) you want it to be sent to. The recipients will receive an automatic email with the URL of the file. There are also nice features such as receiving notifications when the recipients actually download the file and you can also say when the file will expire.

From a design point of view this application is not hard but there are a lot of things that need to be done. There are servlets for upload and download, there is an email notification system and there is also database persistence because the application needs to keep track of expired files.

The best submission managed to address all the requirements properly and also took into consideration performance issues (handling huge uploaded files efficiently). Some added additional functionality, such as the ability to view a history of the uploaded files, and support for authentication in the future.

Thursday, June 28, 2007
Generic Application Service Processor
by Luca

The Generic Application Service Processor (GASP) component provides a service framework for applications, which allows the decoupling between the presentation and business tiers of an application. The customer of a service will use a concrete Event in order to invoke the service. He can pass the custom arguments using the Payload property of the Event. The user will interact only with a service processor delegate, which has the ability to look up the service processor (similar to how the Context is looked up in Java).

The GASP will look up the concrete service implementation based on the ID and version of the Event and will invoke the service. The invocation can be performed inside a transaction and this component will provide at least one implementation of a transaction management mechanism. The result of the service invocation will be returned to the user inside a ServiceResponse, in the Payload property. The user will also have the possibility to simulate a session between multiple invocations of different services by reusing the same EventContext for subsequent service invocations.

Implementing the design for this component was quite straightforward, as the notions needed for the framework were identified and well specified in the requirements. One place where the designers had to be creative in order to achieve the requirements was in the transactions area.

For the Java version, there are multiple technologies that could be supported: EJB, Spring, and so forth. For the .NET version, the usage of TransactionScope was quite straightforward. The designers also had a challenge in choosing the way to look up the service processor and the way to invoke the services. These could have been done locally (using direct method calls) or remotely. There was one interesting approach which uses MSMQs in order to look-up the service processor remotely.

This approach has the advantage of working remotely, but it has the drawback of a possible overhead introduced by the queues. Another interesting aspect inside a submission was the possibility to map the service to normal methods, similar to how web services / web methods work.

Friday, June 29, 2007
DB Converter
by zjq

DB Converter is a command line tool which provides the functionality to convert a database structure from one database to another. Since the concrete design of different database systems vary a great deal, the component will only cover the configured / pre-defined parts of the database structure, and log all the things not successfully converted into a file. The initial version supports database objects including Table, Column, Keys and Index.

The very first thing to consider before starting the design is to define a set of metadata to store the database structure, then two main procedures should be designed, one is to pull out the structure / objects of a database and convert it to the metadata form defined before, the other procedure is to convert the metadata information into DDL which can establish the structure in the destination database.

The basic requirement is not hard to fulfill, but making the whole design clean and easy to understand is not a trivial job. More specifically, how to define the metadata and the configuration format is important for flexibility and extensibility consideration. Some of the competitors deal with this problem elegantly and provide clean design which is easy to extend and can accommodate further requirements.

Component Design: Scores & Wagers

  File Delivery
Java .NET
  Round 1  
Competitor initial score final score place wager points link rd1 total
kyky 87.89 90.33 1 30 30 download 30
bendlund 57.17 60.28 5 10 2 download 2
oldbam 88.79 89.35 2 45 22 download 22
sql_lall 87.63 88.38 3 30 10 download 10
argolite n/a n/a 7 10 1 n/a 1
AleaActaEst 54.48 63.85 4 10 2 download 2
kakarotto 52.29 53.19 6 20 3 download 3
  Generic Application Service Processor
Java .NET
  Round 2  
Competitor initial score final score place wager points link rd2 total
kyky 85.05 94.17 1 48 48 download 78
bendlund 89.13 93.27 2 60 30 download 32
oldbam 85.43 87.26 4 45 11 download 33
sql_lall n/a n/a 6 10 1 n/a 11
argolite 89.5 92.69 3 60 20 download 21
AleaActaEst 64.11 70.48 5 60 12 download 14
kakarotto n/a n/a 6 30 5 n/a 8
  DB Converter
Java .NET
  Round 3  
Competitor initial score final score place wager points link rd3 total
kyky 84.63 86.57 1 22 22 download 100
bendlund 81.4 85.68 2 30 15 download 47
oldbam n/a n/a 6 10 1 n/a 34
sql_lall 84.14 85.62 3 60 20 download 31
argolite n/a n/a 6 30 5 n/a 31
AleaActaEst 52.61 56.46 4 30 7 download 21
kakarotto 34.77 34.77 5 50 10 download 18