ChannelDB2

Phorum Bulletin Board ported to IBM DB2

Phorum now runs on DB2

I ported Phorum Bulletin board from MySQL to IBM DB2 9.5.2 or higher. Now you can run PHP based bulletin board solution on your server backed by IBM DB2. It is fully working with exception that maximum message size is 32KB, which is more than enough for practical purposes because you can attach large files to message.

Porting was quite easy, exception was replacing MySQL fulltext search engine with db2 text search extender (now included in every db2 edition) and porting LIMIT, OFFSET MySQL feature. I used Oracle compatible ROWNUM. Rest was mere removing mysql specific sql such as query hints, USING clause in JOIN and remove of number quoting like '22'. DB2 PHP driver is quite similar to MySQL, so on PHP side there were no unexpected troubles.

Transactions, why?

Phorum as typical PHP application is not using transactions at all, so database writes are kinda slow in DB2 and you might run into data inconsistency (needs to be fixed from time to time via administrative interface). Explaining benefits of database transactions to average PHP coder is simply waste of time because these people care only about 1 thing: speed and as we know transactions often introduce locking which lowers database throughput.

DB2 phorum is downloadable here, feel free to report any remaining bugs.

Port to DB2 program

I have idea for port to DB2 program. IBM should sponsor people porting opensource software to run on DB2. It should start like bounty hunting: Port to DB2 software like Drupal, Wordpress, MediaWiki and get $500 reward. It will have great impact because people can try DB2 Express on application known to them. There is no need to port lot of applications, about 5-10 will be enough.

In my spare time, i will target Wordpress next.

Views: 242

Comment

You need to be a member of ChannelDB2 to add comments!

Join ChannelDB2

Comment by Radim Kolar on January 9, 2011 at 3:53pm
Wordpress 3.1RC2 porting is in good progress, most of admin interface works already, after more work will be done i could post some screenshots. Wordpress is way harder to port then phorum5. Work on media wiki will start next week after i will buy more memory because it is quite huge application for loading into Eclipse.
Comment by Leons Petrazickis on December 30, 2010 at 12:57am

If you can take a look at MediaWiki, it would be great. The DB2 support in it is unfortunately broken. There's an off-by-one error in the default data (the Text table references non-existent Revision 0 rather than 1, and I couldn't track down why).

The 1.17 release also added a new installer, which needs to be ported for DB2.

Comment by Radim Kolar on December 29, 2010 at 2:10pm
I sent maintainers email, you can sent them one too or reply to my linked message on phorum site. 32KB limit per message can be lifted by rewriting some queries, but i have no plans to do that unless someone will offer $$$ for few hours of my work needed. I currently exploring mediawiki 1.17.
Comment by Leons Petrazickis on December 27, 2010 at 8:32pm

Awesome! It's really good to see projects like these coming together.:-)

 

Have you tried asking about adding this in as a patch or getting commit access to official Phorum repository?

 

Also, can you work around the 32KB issue by using prepared statements?

Comment by Radim Kolar on December 27, 2010 at 5:36am
mysql compatibility breaks hibernate
Comment by Leon Katsnelson on December 26, 2010 at 11:31pm
Radim, this is great. I'd love to give it a try after the holidays. To your point of porting MySQL LIMIT and OFFSET, DB2 Express-C v9.7.2 now understands MySQL LIMIT and OFFSET natively so there is no need to change SQL when porting. All other editions of DB2 can just do
db2set DB2_COMPATIBILITY_VECTOR=MYS
In other wordswhen porting MySQL applications to DB2, you can leave SQL that contains LIMIT and OFFSET unchanged and it will just work with DB2.
I had a blog post on this topic http://freedb2.com/2010/07/14/top-3-ways-to-return-top-10-rows-by-a....

Featured Downloads

Try BLU Acceleration on Cloud

© 2019   Created by channeldb2.   Powered by

Badges  |  Report an Issue  |  Terms of Service