Showing posts with label Patches. Show all posts
Showing posts with label Patches. Show all posts

Monday, August 16, 2010

Wrapping up GSoC 2010

CXF Release Build
After a fix for a missing module in revision 1314, CXF release-build was successful in the test server.

Test Server
Version 1317 and 1318 focused on fixing some bugs in the test code. In 1319,  Base64 tests were done, using org.apache.cxf.common.util.Base64Utilit as the implementation of Base 64 encoding for OGSA-DAI for cxf based layer [1]. The default Base64 implementation of OGSA-DAI is, org.apache.axis.encoding.Base64, as defined in Base64 class of OGSA-DAI.

Base64
Conversion of char[] to string, and mapping the encode and decode methods of Base64Utility, is handled by presentation/cxf/client/src/main/java/uk/org/ogsadai/client/toolkit/presentation/cxf/CXFBase64Mapper.java from the version 1322. This fixes the cxf base64 tests. Further, Base64Mapper interface will be in the core/common module, and  ogsadai.common.Base64 will have method public static synchronized void registerBase64Class(Base64Mapper mapper). Decode encode operations will use the instance of the interface, instead of the implementation itself. After 1322, cxf/server tests depend on the cxf/client module too. Hence adding it as a dependency in ant jarUnitTests for cxf/server in 1323. These changes made all the 13 tests of cxf/server module to run successfully [2], almost completing the development of the CXF - SOAP based layer for OGSA-DAI.

CXF/JAX-WS Layer
With the client toolkit for cxf, the pencils down date reached. Though we will continue with our projects, the changes we did to the code base after 16th of August 1900 UTC will not be counted as work under Google Summer of Code 2010.

ReSTful Layer CXF/JAX-RS
Version 1300 starts the presentation/rest for the ReSTful layer based on CXF/JAX-RS. XXXResource classes define the CRUDs, where the CRUD methods call XXX classes, the classes that calls the lower level implementation further. 1398 becomes the initial implementation of DataRequestExecutionResource for CXF-JAX/RS presentation layer. 

1399 provides a Simple ReST Server implementation. 1402 Lists resources for ReST resource types, while 1403 Gets and Deletes resources with the given resource ids. 1404 Sets the Lifetime, from the Request Service. ReST layer specific exceptions need to be written, and current error handling is very primitive for ReSTful layer.

CXF/JAX-RS Release Script
Commits 1406 and 1407 starts the release script of the ReSTful layer at trunk/release-scripts/ogsa-dai/rest, based on cxf/jax-rs. Needs more changes, and this script is still evolving. This becomes my final commit that comes under Google Summer of Code 2010 (Tonight 1900 UTC was the firm-pencils-down date).

Patches
Patches that cover my contribution towards the timeline can be retrieved by executing the below lines from the trunk.
svn diff -r 994:1407 presentation/cxf > gsoc2010.diff
svn diff -r 1274:1407 presentation/rest > gsoc2010Rest.diff
svn diff -r 1261:1407 release-scripts/ogsa-dai/cxf > gsoc2010Release.diff
svn diff -r 1406:1407 release-scripts/ogsa-dai/rest > gsoc2010ReSTRelease.diff
As the code is committed itself into trunk, the patches is practically not necessary, apart from the Google's requirements or for records.

Modules
Considering the modules, presentation/cxf, presentation/rest, release-scripts/ogsa-dai/cxf, and release-scripts/ogsa-dai/rest contain the code written during this Summer of Code. 1407 becomes the last commit that was done during the Summer, hence the later commits won't be counted for Google Summer of Code. 

The generated tarball of code for the code submission to Google can be downloaded from here.

Saturday, May 29, 2010

OGSA-DAI - Coding with enthusiasm

As summer of codes officially started, I did my second commit on May 26th midnight (Sri Lankan time). In this commit, I have created the build and properties files of the client and server module. And wow, this commit has become the 1000th commit of OGSA-DAI. As an open source project OGSA-DAI has reached many mile stones and success stories in a relatively short period. Though we, GSoCers develop remotely from the mentors and the other developers, the super-friendly private/developer irc of OGSA-DAI always gives us the feeling of working in the same environment as the other developers  are.

1026 and 1030 became my third and fourth commits respectively, where 1026 was a minor fix on the wsdls, while 1030 fixed the namespace to package mapping based on the cxf -p option in the build.xml, which was handled by NStoPkg.properties in the Axis presentation layer. Currently I am in the process of developing the client and the server, which will either be committed to the trunk as a huge commit or a huge list of tiny commits, in the upcoming week.

To get the patches of my progress so far, use the below command from ogsadai_home/presentation;
svn diff -r 994:${current} cxf > gsoc2010.diff
svn diff -r 1274:${current} rest > gsoc2010Rest.diff
svn diff -r 1261:${current} ../release-scripts/ogsa-dai/cxf > gsoc2010Release.diff
svn diff -r 1406:${current} ../release-scripts/ogsa-dai/rest > gsoc2010ReSTRelease.diff

or for Release Script, from ogsa-dai/trunk/release-scripts/ogsa-dai/
svn diff -r 1261:${current} cxf > gsoc2010Release.diff

gsoc2010.diff refers to the cxf/soap based layer patch, while gsoc2010Rest.diff refers to the ReSTful layer, where gsoc2010Release.diff refers to the release script.

Thursday, September 3, 2009

gsoc2009unicode.diff

Summary: Port AbiWord for Windows to Unicode

Initial revision: 26150
Final GSoC revision: 27718
I used the below command to create the diff file depicting my progress, in a single diff file named gsoc2009unicode.diff. Here abiword_home is the working folder (abiword source root) that is checked out.
Using this command from abiword_home;
svn diff -r 26150:27718 src > gsoc2009unicode.diff

The diff file can be downloaded here.
It has 13496 lines and 465.5 KB.
---------------------------------------------------------------------------
My Google Summer of Codes branch can be found at http://svn.abisource.com/abiword/branches/gsoc2009unicode/ which is the unicode branch for Abiword Windows. I continued working on this branch even after the Summer of Codes Firm Pencils Down date. So for further updates on the unicode port, you can simply checkout that branch instead of applying this patch.

To use the attached patch,
1. Check out Abiword from trunk as on revision 26150, the revision which was used to create my initial gsoc2009unicode branch.
svn co -r 26150 http://svn.abisource.com/abiword/trunk/

2. Go to the trunk folder you have just checked out and place the patch there.

3. Use the below command from the folder, to patch the working directory.
patch -p0 < gsoc2009unicode.diff 4. Now you have patched the trunk directory and you have the files in the status as that of my gsoc2009unicode branch on the final Google Summer of Codes version 27718. 5. Configuring, building, and other options have no difference from the usual Abiword building process. More details on my Google Summer of Codes 2009 progress can be found here: http://kkpradeeban.blogspot.com/search/label/gsoc2009unicode Kathiravelu Pradeeban kk.pradeeban@gmail.com

---------------------------------------------------------------------------

Summer of Codes 2009 Download List for Abiword can be found here.
Details for the code submission can be found here.

A few lines from the patch:
int XAP_Win32DialogBase::addItemToCombo(UT_sint32 controlId, LPCSTR p_str)
{
UT_ASSERT(IsWindow(m_hDlg));
- return SendDlgItemMessage(m_hDlg, controlId, CB_ADDSTRING, 0, (LPARAM)p_str);
+ UT_Win32LocaleString str;
+ str.fromUTF8 (p_str);
+ return SendDlgItemMessageW(m_hDlg, controlId, CB_ADDSTRING, 0, (LPARAM)str.c_str());
}


google-summer-of-code-2009-abiword submitted code zips can be downloaded here

The diff file including the work on the porting done after the GSoC timeline can be found here.