1 |
Ok. So this is a rough draft of the steps that will be involved in the |
2 |
building of an Online Image Builder. There are few doubts in my mind |
3 |
regarding the final stage of the process, which are listed at the end. |
4 |
Many Ideas over here have been given by solar. I will request all of |
5 |
you to kindly go through this and suggest me the many shortcomings in |
6 |
the process and if possible then may be answer my queries at the end. |
7 |
Here it goes, step wise: |
8 |
|
9 |
|
10 |
Steps on the user/client side: |
11 |
|
12 |
The client will accessing a web page to avail the service. For this |
13 |
reason the only scripting language that can be used on the client side |
14 |
is Java Script. Most of the browsers support only Java Script as the |
15 |
only scripting language. There is some work going on and their might |
16 |
be an expected release of Iron Python in Mozilla Firefox 4. So at this |
17 |
stage all the client side work will be done in js. Steps: |
18 |
|
19 |
1) All the requirements like removing initial dependency, user select |
20 |
option etc. , the JS script for these tasks will be hard coded in the |
21 |
html file. This will significantly reduce client-server interaction |
22 |
which usually slow down the process. |
23 |
2) Their is no standard implementation of xmlrpc parser in js though |
24 |
many are available. But I will be making a parser of our own. It wont |
25 |
be much trouble, simple Data Object Model scripting. Completing this |
26 |
step gives the ability to encode and decode (messages,parameters) in |
27 |
the XMLRPC format. |
28 |
3) Again since their is no standard implementation of xmlrpc in js so |
29 |
all the requests will be sent and received using XMLHttpRequest |
30 |
object. |
31 |
4) There is a mock up of the interface at the client side( curtsy |
32 |
solar) at http://tinderbox.dev.gentoo.org/image/ |
33 |
5) We can have a basic authentication system (Both http and https |
34 |
supports this) :http://user:pass@host:port/actual_server_path |
35 |
|
36 |
|
37 |
|
38 |
Steps on the Server side: |
39 |
|
40 |
To handle the network traffic we can either go with normal blocking |
41 |
modes using threads to handle multiple clients. But according to me a |
42 |
better aproach will be to use asynchronous server, I have the one |
43 |
developed by twisted in mind: |
44 |
http://twistedmatrix.com/trac/wiki/TwistedProject |
45 |
This will effeciently take care of multiple clients. The twisted |
46 |
server will pass on all the request to a python object of |
47 |
SimpleXMLRPCServer.SimpleXMLRPCServer(addr[, requestHandler[, |
48 |
logRequests[, allow_none[, encoding]]]]). Their onwards all the |
49 |
processing will be done by this object. |
50 |
1) All the functions will be added using |
51 |
SimpleXMLRPCServer.register_function(function[, name]). |
52 |
2) Whenever a request come appropriate function will be called. |
53 |
|
54 |
Now once we have the complete configuration from users, comes the task |
55 |
of actually gathering all the packages and binding them in a user |
56 |
defined output form (eg:- .iso, .tar.gz etc). I had a detailed |
57 |
discussion regarding this with solar and this is what I got from what |
58 |
he suggested (apologies to solar if I misinterpret any of the steps). |
59 |
Steps: |
60 |
1) User request will finally be made available in the form of |
61 |
.conf(regular text file) something like |
62 |
http://tinderbox.dev.gentoo.org/image/feeds |
63 |
2) Now each of the package in the above file consists of feeds like |
64 |
http://tinderbox.dev.gentoo.org/embedded/openmoko/Packages |
65 |
3) To speed up the process of collection of packages from these feeds, |
66 |
they can be broken down into sets such that each set can be treated as |
67 |
a meta package. These sets will be rsync simultaneously into a common |
68 |
directory. |
69 |
4) After all the packages have been fetched we do a final packing |
70 |
producing the archives of package fetched in the user given format |
71 |
like .iso or .tar.gz (using different utilities). |
72 |
|
73 |
My Doubts: |
74 |
1* Solar suggested to break feeds into set such that each set |
75 |
resembles a meta package. How can this be done without human |
76 |
interaction (obviously) |
77 |
2* Is their any step missing between step 3 and step 4 above. |
78 |
|
79 |
Thanks for going through this. I request you to kindly find the time to reply. |
80 |
|
81 |
With Regards |
82 |
Kartik Rustagi |