Warning: Can't synchronize with the repository (Unsupported version control system "bzr": Can't find an appropriate component, maybe the corresponding plugin was not enabled? ). Look in the Trac log for more information.

Oracle Storm

Project to create an Oracle backend for Storm.

Oracle Documentation

SQL Translation

Take a look our page that discusses translation from the SQL written by storm to the one oracle needs to receive.

Dependencies

Unfortunately we seem to need to use the proprietary Oracle client libraries. Our best option seems to be cx_Oracle. We also need an Oracle install to build that extension and to test. Oracle provides an APT repository:

deb http://oss.oracle.com/debian unstable main non-free

The GPG key can be added to APT by doing this:

# wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle  -O- | sudo apt-key add -

Now, install the oracle-xe-universal and oracle-xe-client packages. After you're done installing the package, don't forget to run /etc/init.d/oracle-xe configure to finish up the setup:

# /etc/init.d/oracle-xe configure

Oracle Database 10g Express Edition Configuration
-------------------------------------------------
This will configure on-boot properties of Oracle Database 10g Express
Edition.  The following questions will determine whether the database should
be starting upon system boot, the ports it will use, and the passwords that
will be used for database accounts.  Press <Enter> to accept the defaults.
Ctrl-C will abort.

Specify the HTTP port that will be used for Oracle Application Express [8080]:8989

Specify a port that will be used for the database listener [1521]:

Specify a password to be used for database accounts.  Note that the same
password will be used for SYS and SYSTEM.  Oracle recommends the use of
different passwords for each database account.  This can be done after
initial configuration:
Confirm the password:

Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:n

Starting Oracle Net Listener...Done
Configuring Database...Done
Starting Oracle Database 10g Express Edition Instance...Done
Installation Completed Successfully.
To access the Database Home Page go to "http://127.0.0.1:8989/apex"

To build cx_Oracle using that package you need to have cx_Oracle version 4.4, or setup.py will complain that the oracle home you have is not a valid oracle home. When you've obtained all those, do this inside the unpacked cx_Oracle source:

$ export LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib/
$ export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/
$ python setup.py build
running build
running build_ext
building 'cx_Oracle' extension
creating build
creating build/temp.linux-i686-2.5-10g
[...]
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-i686-2.5-10g/cx_Oracle.o -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/ -lclntsh -o build/lib.linux-i686-2.5-10g/cx_Oracle.so
$ python setup.py install --prefix=/home/kov/.local/install/
running install
running build
running build_ext
running install_lib
copying build/lib.linux-i686-2.5-10g/cx_Oracle.so -> /home/kov/.local/install//lib/python2.5/site-packages
running install_egg_info
Writing /home/kov/.local/install//lib/python2.5/site-packages/cx_Oracle-4.4.egg-info
$ python
Python 2.5.2 (r252:60911, May 15 2008, 17:59:19) 
[GCC 4.3.1 20080501 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle
>>> 

Notice that I install my 'development' stuff on ~/.local/install, and that I have /home/kov/.local/install//lib/python2.5/site-packages on my PYTHONPATH.

Getting the code

As in Storm project, we're using bzr version control, so to get the code use the following command:

$ bzr branch bzr://labs.alfaiati.net/storm