User:Trademark/GSoC 2013/Addon Server: Create a new and shiny one
This page is related to Summer of Code 2013 |
See the list of Summer of Code 2013 Ideas |
This is a Summer of Code 2013 student page |
Contents
- 1 Caution
- 2 Proposal — Addon Server
- 3 IRC
- 4 Questionnaire
- 4.1 Basics
- 4.2 Experience
- 4.2.1 What programs/software have you worked on before?
- 4.2.2 Have you developed software in a team environment before? (As opposed to hacking on something on your own)
- 4.2.3 Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?
- 4.2.4 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.
- 4.2.5 Gaming experience - Are you a gamer?
- 4.2.6 Patches
- 4.3 Communication skills
- 4.3.1 Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.
- 4.3.2 What spoken languages are you fluent in?
- 4.3.3 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.
- 4.3.4 Do you give constructive advice?
- 4.3.5 Do you receive advice well?
- 4.3.6 Are you good at sorting useful criticisms from useless ones?
- 4.3.7 How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to "see how it turn out", taking the risk of having it thrown away if it doesn't match what the project want
- 4.4 Project
- 4.4.1 Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?
- 4.4.2 If you have invented your own project, please describe the project and the scope.
- 4.4.3 Why did you choose this project?
- 4.4.4 Include an estimated timeline for your work on the project. Don't forget to mention special things like "I booked holidays between A and B" and "I got an exam at ABC and won't be doing much then".
- 4.4.5 Include as much technical detail about your implementation as you can
- 4.4.6 What do you expect to gain from this project?
- 4.4.7 What would make you stay in the Wesnoth community after the conclusion of SOC?
- 4.5 Practical considerations
Caution
This proposal is under construction and can be modified any time.
Proposal — Addon Server
Description
This proposal aims to rewrite and improve the addon server with Boost.Asio. The current server becomes old and has few drawbacks:
- The code is monolithic, resumed in a single file which made it hard to extend and maintain.
- The responses are in english only, support for gettext should be added.
- The translation of the addons are not synchronized with Wescamp.
- Native handling of the different types of add-on (campaigns, factions, eras, …).
The hope is to design a new and robust server with the help of Boost.Asio, make it extensible with every layer of code clearly defined. Moreover the wire has been completely reviewed to integrate translatable features. It'll add meta-information on the different types of add-on.
Server configuration
Most of it is described in the patch #3848. You can also find a PDF version here. The following is a summary of the chapter "Server configuration" of the umcd.pdf document.
Options
The file umcd.cfg resumes the main characteristics of the server:
- Port: The TCP/IP port to listen to for incoming requests.
- Threads: The number of working threads to start.
- Dir: The directory where the add-on will be stored.
Wire
The wire has been extensively described in the patch #3848. You can find a PDF version of the wire at this link umcd.pdf. For documentation purpose, the following is a list of the major features.
Special packets
These packets inform the user that abnormal packet has been sent in the request. For example, it warns if a field is missing in the request.
- Warning packet
- Error packet
User request packets
These packets can be sent by users of Wesnoth having any of the following requests:
- Request the campaign list in a favorite language.
- Request UMC download in a specific language.
- Request UMC change password.
- Request a new password.
- Request UMC upload.
- Request UMC delete.
- Request license.
Admin request packets
Should be discussed with mordante before further analysis.
Architecture
Requests handler
Requests dispatcher
Database
The definition of database in this section is not necessarily related to the classical relational database. What we will choose to use in this project is further discussed in the following sections.
Interface
Firstly, some high levels choices must be made and are independent from the way data are actually stored. Given the wire, we have an idea of the operations on the database and thus we can establish the database interface. Note that all names can change.
class AddonDatabase { public: virtual config request_campaign_list(const config& request) =0; virtual config request_campaign(const config& request) =0; virtual config request_password_update(const config& request)=0; virtual config request_new_password(const config& request)=0; virtual config request_campaign_upload(const config& request)=0; virtual config request_campaign_delete(const config& request)=0; virtual config request_license(const config& request)=0; };
Discussion
Implementation details
Signal
The signals are handle via std::signal. The default behavior for every signal is:
- Notice all current tasks that a problem occurs and they must stop.
- If some tasks communicate with any user, send a packet describing the interruption.
- Waiting (with timed out) that all threads have stopped.
- Restart the server.
Specific actions are applied for SIGTERM and SIGINT:
- Launch a maintenance server which respond to users with an informative message.
- Close the server.
For the other signals, we mail the server owner and then restart.
If the server has restarted more than 3 times in half a hour, we do the same as with SIGTERM/SIGINT.
Log
IRC
Trademark
Questionnaire
Basics
Information
Email :
Nickname : Trademark
Study : Master degree in computer science at the University of Lyon 1
Country : France
Availability : Mostly during the evening (4pm to 9pm UTC)
Write a small introduction to yourself.
My name is Pierre Talbot, I currently follow a Master Degree (first year) in computer science in Lyon (France). After being a hardcore gamer for few years during high school, I choose to study computer science. So I begun my studies in Belgium and after 2 years I joined the University of Lyon 1 in France. Now, more than anything I like to program and to learn more on the various fields of computer science.
Why do you want to participate in summer of code?
Because I already participated in the GSoC, I know that is an invaluable program to excel your programming level. Furthermore being paid to learn from experienced people is just an opportunity.
Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.
I will restart school 2 weeks before the ending. During these weeks I will work more during the week-end instead of balancing the works all over the week. But I'll try to finish the most before this date. I didn't planned any vacation but if I take some, it will be at most 3 days.
Experience
What programs/software have you worked on before?
I mainly worked on numerous school projects which involves various skills, the relevants one's for this project were:
- FTP-like server in C.
- Network game programming in Java and C.
- Web application respecting a web oriented MVC architecture (team of 4 persons).
I also worked on many C++ projects (data structures implementation, Boost.Check, garbage collector, …) without a networking layer.
Have you developed software in a team environment before? (As opposed to hacking on something on your own)
Yes, the most of my school projects are in team of 2,3 or 4 students. We are using source versionning such as Mercurial, Git. Depending on the project, we use other team tools such as the ones provided by Redmine.
I used SVN during my previous GSoC.
Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?
I participated in 2011 as a student in the Boost organisation.
Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.
Gaming experience - Are you a gamer?
What type of gamer are you?
What type of games?
What type of opponents do you prefer?
Are you more interested in story or gameplay?
Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.
Patches
This year patch:
2012 patches:
Communication skills
Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.
What spoken languages are you fluent in?
Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.
Do you give constructive advice?
Do you receive advice well?
Are you good at sorting useful criticisms from useless ones?
How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to "see how it turn out", taking the risk of having it thrown away if it doesn't match what the project want
Project
Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?
If you have invented your own project, please describe the project and the scope.
Why did you choose this project?
Include an estimated timeline for your work on the project. Don't forget to mention special things like "I booked holidays between A and B" and "I got an exam at ABC and won't be doing much then".
Include as much technical detail about your implementation as you can
What do you expect to gain from this project?
What would make you stay in the Wesnoth community after the conclusion of SOC?
Practical considerations
Are you familiar with any of the following tools or languages?
- Subversion (used for all commits)
- C++ (language used for all the normal source code)
- STL, Boost, Sdl (C++ libraries used by Wesnoth)
- Python (optional, mainly used for tools)
- build environments (eg cmake/scons)
- WML (the wesnoth specific scenario language)
- Lua (used in combination with WML to create scenarios)
Which tools do you normally use for development? Why do you use them?
What programming languages are you fluent in?
Would you mind talking with your mentor on telephone / internet phone?
We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of "there is no way to contact you" does arise!