Summer of Code/2009/Print Support

About you

1 What is your name?
Vamsi Krishna Davuluri
2 What is your email address?
vamsi<dot>davuluri<at>gmail<dot>com
3 What is your Sugar Labs wiki username?
IwikiwI
4 What is your IRC nickname?
IwikiwI
5 What is your primary language? (We have mentors who speak multiple languages and can match you with one of them if you'd prefer.)
English, Hindi, Telugu. I prefer English!
6 Where are you located, and what hours do you tend to work? (We also try to match mentors by general time zone if possible.)
I am located in india (5:30+ GMT), I usually work in the night, from my 7 pm to 2:30 am
So any mentor should be ideal.
7 Have you participated in an open-source project before? If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in :open-:source. If not, why do you want to work on an open-source project this summer?
I have not been part of an open source development team. Nor do I have a very profound understanding of the OS development paradigm yet. But seeing how I could never afford software which was sold at :high price even though that software was the bare essential software for me to get my computer working. And as my experiences are true for almost two thirds of other students, I would like to see them :not to have to put up with the buy-what-you-want software, in-fact I would love for them to grow up using free software that I make and hope that they will produce free software themselves, a few of them :at least.
Although not really a group developmental project, I have coded two networks projects and a prototype game for windows. (the source is in downloads)
1) Simulation of mobile units and their movement over a network
http://code.google.com/p/iwikiwi/
2) A client/server model for file transfer, md5 check sum, IP translations, and file size requests
http://code.google.com/p/iwikiwi-clientserver/
3) A prototype Bounce game in OpenGL for windows
http://code.google.com/p/iwikiwi-bounce/

About your project

1 What is the name of your project?
Print Support for the XO laptops
2 Describe your project in 10-20 sentences.
As the self explanatory name suggests, the project is to add print support to the laptops.For the time being, the print requests will be sent to the school server through a moodle print page
then the teacher can view the files through his login in the same application, and approve them for printing to a print server. Later on as we are going with a CUPS architecture, we can include USB
printing on demand!
Why should my idea be considered:
My refined version of the print support idea is actually a better way of ensuring that paper abuse will be curbed, as the kids wouldn't really take into account :all the predicaments associated with :printing. And needless to say printing does take place with the teacher's intervention.
A step by step abstraction:
1) During boot of the XO laptops, Sugar will compile itself in compliance to supported file types, and will have the print button enabled only when they are available.
2) The print button on click, prints in PDF format locally,that is, saves them under a specific 'print objects' category in the journal
3) There will be a send-for-printing interface( a moodle plugin) which allows the user to send his request to the datastore in the school server. On a successful send the user's page will display him the details of his job, whether in queue for printing and waiting for approval from the teacher or done printing or disapproved for printing along with an optional reason why, he can also cancel his request from the page. There wll a quota of maximum 3 live jobs per student.
4) Through moodle the teacher will have a page displaying the contents of the print datastore along with user names attached, and he/she will be able to download them to his remote system, and check them and approve them for printing if he/she wishes. After his/her approval or disapproval (that is a delete along with an option why) the information is held in the datastore, and the user can view it in the form of history transactions pertaining to his id, and teacher can view a finite list of previous transactions pertaining to all.


In-Depth analysis:
The easiest way to implement step-1 would be to check which mime types exist on the client side in the etc/cups/mime.types file with a simple python method (getAllowableMIMETypes) , and access it with a :python script and compile our sugar shell accordingly. So any mime type non-existent there will have its corresponding activities print button disabled.
As an Alternative, CUPS print function returns a python -1/ C 0 when a non-supported MIME type is used, so I can take advantage of that and display a non supported format error.
for step-2, We use CUPS. The API has a nice array of functions, one of which is to get the printers name (the cups-pdf virtual printer). Since we know the name is CUPS-PDF, we can check it, and print our :file as a PDF to the journal under a special category. We will also be using an automatic script to configure the network printers client sides when user (although only
For the sake of our python convenience we will be using a python wrapper to cups, pycups. We will be using our Sugar api to create a nice simple widget for this. And we will use D-Bus for transfer of :objects to journal. The print button will be just saving the file in its original mime format, and then a Cups-PDF job takes place and outputs a pdf in the to print objects category. And, the original :saved mime type is destroyed.
for step-3, We will be creating a new print management page in moodle, which accepts at most 3 print requests(the pdfs) from the user at a time until one of them is processed or deleted. We will be :creating a plugin with the FILE_API of moodle( which enables us to do things like uploading client side files, and sending them, and receiving back the files, deleting them) in php, and access the local :to print files, send upload them to the moodle server datastore. I will be taking the already available "upload one file for teacher's review" plugin's code as basis for this. [1]
for step-4, We will be using the same plug-in/interface already created, but for the teacher we will issue global access privileges enabling him/her to access all the sent requests, and the approve :button will initiate shell commands to send the particular file to a network printer.This can again be achieved through hacking into moodle and understanding how notifications are sent to the students :from teacher. The notifications would be relating to whether the teacher has approved or disapproved the print.



3 Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, :credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.
I have a fairly good understanding of communication models, and my skill with networks is quite satisfactory. And as most of the implementation is already available in form of python bindings, all that :remains is placing them together with a sound design, which I have already discussed with several community members. And I can provide as much time as is required for the work to get done.
My credentials include:
1) The ability to finish projects on his own, with self motivation, as the 3 projects I have attached have been made as a self interest.
2) An internship at Kenexa which had been to develop an assembly which logged database transactions, written in c#, so I have an exposure to infrastructure.
3) winner of a coding event, Mind-Hunters, at a national level technical festival.
I have already added a fix to Write so that it can export to pdf files, and I have provided a temporary fix for a screen bug, for which I will provide a complete fix.
And I have checked the feasibility of my approach by going through the source files/apis, and writing sample programs like


 cups_dest_t *dests, *dest;
 int num_dests = cupsGetDests(&dests);
 int job_id = cupsPrintFile(dests->name,
                            argv[1],
                            "Test",
                             0, NULL);
 if (job_id == 0)
 printf("error printing file, unsupported format");
for printing

You and the community

1 If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.
From myself:
"The XO users and teachers will greatly benefit from printing, as converting something digital(which may be art, a presentation or a photo) into a physical representation is something very basic, and :something very strong. Not only will there be a good deal of happy faces, but it will also kill the effort required to copy content to a portable drive, and go to a terminal and print.
"
From Benjamin M. Schwartz:
"In order for Sugar to be adopted in schools with existing IT infrastructure, it must give users an easy way to print their documents.If that printing could be routed through a teacher-controlled visual :print queue, then in this regard Sugar would be the most preferred solution for primary education and schools with limited IT resources."
2 Sugar Labs will be working to set up a small (5-30 unit) Sugar pilot near each student project that is accepted to GSoC so that you can immediately see how your work affects children in a deployment. We will make arrangements to either supply or find all the equipment needed. Do you have any ideas on where you would like your deployment to be, who you would like to be involved, and how we can help you and the community in your area begin it?
I think it would be wonderful to begin with my school, I come from a government funded school, not one of those fancy private schools. The kids there would definitely love the different teaching :environment. I will have a talk with the principal, and after that I will further this.
3 What will you do if you get stuck on your project and your mentor isn't around?
I will of course go through the net. developer mailing lists, and forums.
But more over, the community has been very helpful without having a mentor as of yet. I will look forward to the community then!
4 How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?
I intend to provide weekly updates on the wiki itself. And I will also be providing daily updates on the channel.

Miscellaneous

Here is the pic with my hack [2]
1 What is your t-shirt size? (Yes, we know Google asks for this already; humor us.)
Large! (do I get a sugar tshirt?)
2 Describe a great learning experience you had as a child.
Being alone and not interacting with others is a hard bargain. It might seem appropriate during the experience (as one can brush it off as," who will interact with the lessers"), but its only after you :reach an age you realise the tragedy one has brought on himself. I can never change my past, but I am a different person now and will be in the future.
3 Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?
My motto: There is no such thing as not able to achieve something, the only variable really is effort which differs from achievement to achievement with person to person.
what someone else can do, So can I.
To come: schedule!