Monday, July 28, 2008
Parser modifications and tests
Commit the changes of the parser[1]. Then I started with tests, first I go through with the documentations[2][3][4].
[1] svn//svn.zope.org/repos/main/Sandbox/adamg/ocql/branches/qo-compiler - implementation
[2] http://pypi.python.org/pypi/zope.testing/3.5.1
[3] http://wiki.zope.org/zope3/Zope3Book
[4] http://wiki.zope.org/zope3/unittests.html
Friday, July 25, 2008
Week progress report from 21st July to 25th July
I was able to complete the rewriter component implementation during this week[1] and was able to do this with out many difficulties because I discuss the work well before Adam's holiday.
[1] svn//svn.zope.org/repos/main/Sandbox/adamg/ocql/branches/qo-compiler - implementation
[2] http://spreadsheets.google.com/ccc?key=pqiTfcdeaKaYf-C6HpM32VQ&hl=en - Time plan
Monday, July 21, 2008
Query Object Adaptaion
[1] svn://svn.zope.org/repos/main/Sandbox/adamg/ocql/branches/qo-compiler
Friday, July 18, 2008
Week progress report from 14th July to 18th July
Main task of this week is to implement the algebra optimization. To do that it needs to re-organize the algebra tree, such that new tree leads for a optimize search. For that, need to find a specific pattern in the tree and replace it by simple algebra. So I started to find the target algebra object pattern in the tree and later moved to more generic algorithm to find a general pattern in the tree.
By the time I had to spend time to set up the code coverage, svn version problems and google mid term survey. I was previously using eclipse 3.2 and it worked well with subclipse and svn. But using eclipse 3.4 leads to touch the svn files as version 1.5 but the actual client is version 1.4.6. I tried the instructions given in [1] to solve the problem. Since it didn't work for me I moved to the previous eclipse which is simplest to continue on work.
I discuss the things to be done for the next two weeks [2] and break the tasks in to smaller sub tasks. For the next week I will continue with the rewriter module.
[1] http://durin42.blogspot.com/2008/03/setuptools-and-subversion-15.html
[2] http://spreadsheets.google.com/ccc?key=pqiTfcdeaKaYf-C6HpM32VQ&hl=en - Time plan
[3] svn//svn.zope.org/repos/main/Sandbox/adamg/ocql/branches/optimize-with-index - implementation
Monday, July 14, 2008
Algebra optimization
Then I spent some amount to add a recursion tree to the algebra optimizer script. Since I have used children variable in class level, my recursion part loop forever. It was because mutables like list, we can only work with the only instance. So the recursion loop execute for long iterations until it reach maximum. I got mentor's help to identify the problem. So it can be solved by adding setting the variable in the object initiation[2].
[1] http://durin42.blogspot.com/
[2] svn//svn.zope.org/repos/main/Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/rewriter/algebra.py
Friday, July 11, 2008
Week progress report from 04th July to 11th July
Then I moved to the queyobject compiler, which has pretty much the same kind of work to be done as I did in the algebra compiler. I did the interface declarations and implement location in the query object tree. But leave the adaptation part to do later. Implementations for this part goes here [3].
After doing that I moved for a algebra optimization part. Identified optimization is related to transform the algebra tree if it contains a particular pattern. That means look for a pattern in the tree and modify the tree to get the results. For a example say we have a condition,
class.property operation value,
so if there is an index available for the class.property we can use that for the fast searching. Currently, engine gets all objects of an interface and then it uses some loop to filter what it wants. So I include methods to find out whether it can decide the class.property has an index and retrieve data for particular class.property. Repository branch for this work linked here.[4]
[1] http://spreadsheets.google.com/ccc?key=pqiTfcdeaKabBUy48qR0JTw&hl=en_GB - OCQL - TODO list
[2] svn://svn.zope.org/repos/main/Sandbox/adamg/ocql/branches/alg-compiler - algebra compiler
[3] svn://svn.zope.org/repos/main/Sandbox/adamg/ocql/branches/qo-compiler - query object compiler
[4] svn://svn.zope.org/repos/main/Sandbox/adamg/ocql/branches/optimize-with-index
Wednesday, July 9, 2008
Query compiler and identified optimization
class.property operation value,
so if there is an index available for the class.property we can use that for the fast searching. Identified the method need to be added to the class and introduced a index for attributes(property). They still gave me some errors, need to correct them tomorrow, hopefully. :)
Monday, July 7, 2008
Algebra Compiler and Queryobject Compiler
Then we moved to the queyobject compiler, which has pretty much the same kind of work to be done related to the algebra compiler. Check out the code from the related branch for the proceedings.
Saturday, July 5, 2008
Project design
I looked in to the whole project design and implementation. I was able to identify the behaviour of the implementation using debugging. Did some modifications and looked at the deviations. Since I am still learning things related to Python language, referred to some Python books and clear ambiguities.
Friday, July 4, 2008
Week progress report from 27th June to 04th July
Previous week I did DB metadata and data provider, to provide class/object declaration to the engine. In early this week my implementations were reviewed and made the required adjustments. One important thing I learn was that to test all parts of the application after modification of one part. From my new implementation there were two failures in other parts where I didn't notice.
Then I moved to the algebra compiler as it seems more important over the other parts of the DB data and metadata provider. I need to complete two tasks (number 4 and 6) in OCQL TODO list [1].
I started with the sub-task 6, where I introduce interfaces to algebra operation classes and adapt them. All the implementation related to algebra compiler goes here[2]. During the implementation I needed to look the changes done by the mentor. I installed subclipse[3], to look in to revision histories and compare them. Then regarding the sub-task 4, I referred and used Zope.location to introduce parent, child relationship in the algebra object tree. I used remote debug option quite a lot to identify the execution and behaviour.
Finally, its again a interesting week with learning every bits and pieces and hope to continue on the same section in the next week too.
[1] http://spreadsheets.google.com/ccc?key=pqiTfcdeaKabBUy48qR0JTw&hl=en_GB - OCQL - TODO list
[2] svn://svn.zope.org/repos/main/Sandbox/adamg/ocql/branches/alg-compiler - SVN repository
[3] http://subclipse.tigris.org/
Tuesday, July 1, 2008
Algebra Compiler
In algebra compiler I need to do interface declarations to the algebra operation classes. So I just create interfaces and implement them in the appropriate classes.
I declare attribute and method definition in interfaces and use identified types using zope.schema module, such as Text(), Int(), etc.
This interface declaration is targeted on using the compile method using an adapter. Latest code managed in here[1] and dbprovider code is merged in the trunk.
[1] svn://svn.zope.org/repos/main/Sandbox/adamg/ocql/branches/alg-compiler