1 |
Hello everyone, |
2 |
|
3 |
I'm working on the 'Package Statistics' project [1] for GSoC this summer. |
4 |
This is my first progress report. |
5 |
|
6 |
Title: "Client-server model for reporting and querying package statistics" |
7 |
========================================================================== |
8 |
|
9 |
This project aims to implement a client program to gather package |
10 |
information from gentoo hosts and submit them to a server, which will |
11 |
calculate useful statistics based on the data, rendered using a webapp. |
12 |
|
13 |
Over the past 2-3 weeks, I have been communicating with my mentor Alec, |
14 |
and have already written a proof-of-concept client and server, that is |
15 |
ready to be deployed and collect data, thanks to excellent code reviews |
16 |
and ideas from Alec. |
17 |
|
18 |
A short summary of my progress: |
19 |
------------------------------- |
20 |
|
21 |
* Created project repository [2] on git.overlays.gentoo.org |
22 |
* Read up on RESTful Web Services (from the O'reilly book) |
23 |
* Tried to improve my python coding style using the google guide |
24 |
(suggested by Alec) |
25 |
* Wrote a simple client in python to collect a few environment variables |
26 |
from portage, list of installed packages with useflags, encode the |
27 |
data in JSON, with proper authentication, and issue a POST to the |
28 |
server |
29 |
* Wrote a simple webapp using web.py to handle requests from the above |
30 |
client and save the data to MySQL tables |
31 |
* Wrote some documentation to deploy the webapp and client |
32 |
|
33 |
Issues encountered: |
34 |
------------------- |
35 |
|
36 |
* Choice of portage api vs gentoolkit api: The gentoolkit api is very |
37 |
easy to use, but quite slow [3] compared to the portage api. Alec asked me |
38 |
to use both of them as necessary, but provide an easy way to swap out |
39 |
one in favor of the other at a later time. |
40 |
* Choice of web framework, Turbogears vs others: I ended up using web.py |
41 |
for the server, instead of Turbogears (as promised in my proposal), |
42 |
since I found it easier to implement RESTful services using web.py. |
43 |
Also, web.py is lightweight, provides more control, and has enough |
44 |
features for implementing this webapp. However, should I hit a snag |
45 |
using web.py, it probably wouldn't take more than a day or two of |
46 |
coding to replace it with Turbogears. |
47 |
|
48 |
The project repository currently provides a working client and server, |
49 |
and it'll be deployed soon on soc.dev.gentoo.org. |
50 |
|
51 |
Plans for the upcoming weeks: |
52 |
----------------------------- |
53 |
|
54 |
* Get updates from the community on what data should be collected from |
55 |
hosts |
56 |
* Try to add more fields to the client/server and modify the SQL tables |
57 |
accordingly |
58 |
* Learn more about the portage api and discuss them on #gentoo-portage |
59 |
|
60 |
My semester exams are currently in progress, and they'll last till the |
61 |
end of May. So, I'll not be able to work during these 2 weeks. I'm |
62 |
looking forward to get back on 1st June, and continue with my project. |
63 |
|
64 |
[1] |
65 |
http://www.google-melange.com/gsoc/proposal/review/google/gsoc2011/vh4x0r/1 |
66 |
|
67 |
[2] |
68 |
http://git.overlays.gentoo.org/gitweb/?p=proj/gentoostats.git;a=summary |
69 |
|
70 |
[3] |
71 |
http://vh4x0r.wordpress.com/2011/04/12/portage-dbapi-vs-gentoolkit-api/ |
72 |
|
73 |
-- |
74 |
Vikraman |