Google Summer of Code/Proposals2010/tpserver-py port to Twisted
From Thousand Parsec Wiki
Contents |
Abstract
The main goal of this project is to rewrite TP python server to use Twisted Network Framework. Twisted is a full featured event-driven platform suited at writing network application. Reimplementing TP python server with Twisted will bring many benefits including: increased performance and responsibility, ease of adding new features to TP protocol and server, better code maintainability. This project might be crucial for convenience of TP gamers using current python server implementation. Content:
Project goals
Primary goal is to reimplement TP python server using Twisted which involves a few steps:
- Some of the TP protocol classes and the database layer need to be rewritten to fully support asynchronous requests.
- New classes should be added to allow the server to accept multiple connection with SSL or without it.
- TP server must be modified to run as a daemon by default.
- All messages need to be gathered using flexible logger mechanism implemented in twisted.python.log module - in order to provide logging levels and possibility to redirect log messages to different sinks (syslog, file, stderr, etc.)
Secondary goals:
- Extend the server to provide users with game data. This could be accomplished using twisted.web2 module.
- Add to the server remote console by using SSH protocol implemented in twisted.conch.
- Implement Zeroconf using Twisted to allow clients to discover local TP server without hassle.
Alternatively a server control UI might be implemented using Django on Twisted if suitable.
Project schedule
The applicant plans to be available for 2-3 days in a week before the end of the semester (21st of June) and 3-4 days in a week after that. He also plans a short vacations for no longer than a week.
May 10 - May 23 (Planning)
- Dive into existing sources.
- Prepare an estimation of changes needed to be made to the existing TP protocol and server.
- Gather detailed requirements and if needed change the plan appropriately.
- Prepare sketch of a design.
May 24 - July 12 (Phase 1)
- Implement basic server classes.
- Modify TP protocol classes, extract server protocol class and attach it to server factory class.
- Add logger and redirect all of the messages to it.
- Add configuration mechanism.
- Rewrite database access to use asynchronous requests.
- Add HTTP server.
- Provide some mechanisms for gathering statistics.
July 13 - August 9 (Phase 2)
- Provide server control interface.
- Extending configuration and statistics functionality if needed.
- Daemonize the server.
- Add mDNS server.
August 9 - August 16 (Optional)
This period is meant to be a buffer. Unfinished task must be closed during this period.
About me
Twisted Network Framework is known to the applicant in large degree. He implemented multiple protocols using Twisted - including binary protocols based on ASN.1 encoding, and textual protocols based on HTML and XML. He wrote fully featured testing framework which was used to inspect corectness of commercially developed server used in telecommunication market. He also implemented centrally controlled distributed client using command protocol over SSH. The applicant has also experience in extending Python with C++ classes (boost.python and SWIG) and a basic knowledge of Django Framework.
He has been a Python developer for more than 5 years. He's used to work using Agile methodology - namely Scrum.
Contact
- Name: Krystian Bacławski
- Timezone: GMT+2
- e-mail: krystian.baclawski [at google mail]
- JID: as above
- IRC nickname: cahirwpz
- Blog URL: http://cahir.eisp.pl/doku.php?id=en:gsoc2010
