• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Database preference?

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the info! I didn't see any mention of it, but, is JForum compatible with IBM DB2?
[originally posted on jforum.net by Didas]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nope, DB2 is not supported.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rafael,
In your experience, which database works the best with jForum? I've been using hsql for testing jforum 2.02, but am not that familiar with it. Is it stable enough to support hundreds of users? Or is there a more suitable solution you would recommend? (Btw, I just downloaded 2.1 and plan to begin testing the upgrade today.)

Thanks
[originally posted on jforum.net by Didas]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I recomend you to use MySQL. It's faster and easier to maintain.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rafael, is there a compatibility issue with the Essential MySQL 4.1 package (it features only the essential components one needs to run the MySQL server on a Windows machine) and JForum 2.1???
[originally posted on jforum.net by Didas]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can't say precisely. I guess it will work fine.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
any thought of using a database library like hibernate that supports practically every database known to man? that way users could use whatever database they want, and it's hibernate not jforums problem to integrate with them correctly.
[originally posted on jforum.net by wireframe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hibernate integration was discussed many times here in the board. A quick search will show you the topics

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rafael Steil wrote:Hibernate integration was discussed many times here in the board. A quick search will show you the topics

Rafael



Hibernate sucks. And MySQL sucks for everything but small websites.

I am using sqlmaps, which lets me use my own queries, and achieve full database portability, in the way that i just have a config file with the database name i am using, and it loads the respective file for that database. Once you port the queries, you are done.

Some of the code in jforum is very cryptic. You are implementing the connection pools yourself, and doing lots of stuff you could have done way simpler.

I decided to go with jndi datasources for the databases. It's faster and requires no implementation..

For example, to do a query, i just have to do:
Object = sqlmap.queryForObject("query",parameter);

That's it. I can do it in a transaction if i want to, the jndi datasource will take care of the connection pool.

Other things i have saw is your i18n code. It is simple, yet not so simple as i wanted. I did a simple templatemodel with freemarker, and use it from a filter. Freemarker does it all, with no code rather than the 2-3 lines of the template model. Then i can call any property key with ${i18n.keyname} but i am getting offtopic.

I would recommend the original poster to use postgresql.

Last thing, i saw in an old version of jforum (haven't checked the newest one) that you don't use foreign keys. Good lord man, your database is just flawed. You think that just because you are the one that calls your queries, that you can keep the database integrity.

For my project i intend to use no triggers, just foreign keys and some constraints.

Cheers everyone!
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Hibernate sucks. And MySQL sucks for everything but small websites.



Although I prefer to do queries myself, Hibernate is a very good and successfull project. Also, "MySQL sucks for everything but small websites" is the typical statement from postgresql / oracle guys. But anyway, I'll not enter in this area, since people should use the best for their requirements. For JForum I let people choose the implementation they want to use, and everyone gets happy.


I am using sqlmaps, which lets me use my own queries, and achieve full database portability, in the way that i just have a config file with the database name i am using, and it loads the respective file for that database. Once you port the queries, you are done.



That's what I have in JForum, but using my own implementation, which I consider better than Ibatis, for my purposes.


Some of the code in jforum is very cryptic. You are implementing the connection pools yourself, and doing lots of stuff you could have done way simpler.



Could you please point to the code you refer to? Please note that I'm not questioning the truth of your allegations, since I know that there are code in JForum which needs to be improved, and I would like to know what you think that can be better.

About the connection pool, yes, I have my own one, which works much better than many of the connection pools out there. And, if someone don't want to use it, all they have to to is to extend DBConnection and wrap to the library they want.


I decided to go with jndi datasources for the databases. It's faster and requires no implementation..

For example, to do a query, i just have to do:
Object = sqlmap.queryForObject("query",parameter);

That's it. I can do it in a transaction if i want to, the jndi datasource will take care of the connection pool.



Well, as you may have seen, JForum has a DataSourceConnection, which is a very simple code, since it delegates to the JNDI resource.


Other things i have saw is your i18n code. It is simple, yet not so simple as i wanted. I did a simple templatemodel with freemarker, and use it from a filter. Freemarker does it all, with no code rather than the 2-3 lines of the template model. Then i can call any property key with ${i18n.keyname} but i am getting offtopic.



In fact, the I18n code was simpler in previous versions, but for some reasons I put some more "utility" methods. You need to have in mind that almost all configurations files in JForum can be reloaded at runtime, merged with user spefic settings and so on, and that's one of the reasons there is a bit more of code.


Last thing, i saw in an old version of jforum (haven't checked the newest one) that you don't use foreign keys. Good lord man, your database is just flawed. You think that just because you are the one that calls your queries, that you can keep the database integrity.



I aggree that this is a flaw. I started coding JForum when mysql 4 series was just in beta and now, with 20k lines of code, to maintain JForum is not exactly a simple task, since I do it in my free time. In some future version I plan to improve database schema.

That's it. Thanks for the comments about the project.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Although I prefer to do queries myself, Hibernate is a very good and successfull project. Also, "MySQL sucks for everything but small websites" is the typical statement from postgresql / oracle guys.



I know that that is the common conception about criticism to mysql.
Most of these come from the time when mysql didn't support transactions, or foreign keys, or triggers, or subqueries. I believe the current production version 4 doesn't support some of these. All but triggers i use in my own forum, so i am not targetting mysql


Could you please point to the code you refer to?



I meant that i thought you were making jforum more complex than needed, and making it more difficult to introduce new databases. For what i have seen, you are a very skilled coder whom i can't compare to.


In fact, the I18n code was simpler in previous versions, but for some reasons I put some more "utility" methods. You need to have in mind that almost all configurations files in JForum can be reloaded at runtime, merged with user spefic settings and so on, and that's one of the reasons there is a bit more of code.



Feel free to see my implementation, after all my forum will also be open source (more on that below)


I aggree that this is a flaw. I started coding JForum when mysql 4 series was just in beta and now, with 20k lines of code, to maintain JForum is not exactly a simple task, since I do it in my free time. In some future version I plan to improve database schema.



My database is based on yours, but i enhanced it. This proved a heavy task, since by definition, you can't have a post without having a topic, and you can't have a topic without creating a post either, so the referencial integrity gets stuck in a loop. I had to use deferrable options in some attributes to achieve this, but seems to work.

On the other hand, most of my queries are very very long and complex.

How many queries do you use to render the mainpage? I use only one, but am still working on it since i need to do outer joins to be able to show basic information when a category is created and no forums/topics/posts exist yet.

My project is called "mortiforo", coming from the spanish word mortifero, which means deadly. We are neighbors, i am in Venezuela.

You can find it in sourceforge.
I am not a lawyer so i dont know what license the project will be since i don't know the licenses from all the libraries and such, but it will be either gpl or bsd.
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I believe the current production version 4 doesn't support some of these. All but triggers i use in my own forum, so i am not targetting mysql



Starting from version 4.1, mysql supports constraints / foreign keys / subqueries. Seems to works, but migrating from previous versions is a bit painful.


I meant that i thought you were making jforum more complex than needed, and making it more difficult to introduce new databases.



That's true. It is more complex than I wanted (well, of course I never wanted it to be complex ;) ), and that's why I'm going to focus on code refactoring (aka, I'll stop adding new features for a while)


My database is based on yours, but i enhanced it. This proved a heavy task, since by definition, you can't have a post without having a topic, and you can't have a topic without creating a post either, so the referencial integrity gets stuck in a loop.



Yep.. When working with the Oracle implementation I ended in this problem. topic_first_post_id and topic_last_post_id cannot have foreign keys.


On the other hand, most of my queries are very very long and complex.

How many queries do you use to render the mainpage? I use only one, but am still working on it



For category / forum listing is a single query too, but I probably will try to improve, since if you have an huge board, the query will not perform very well (there are 4 or 5 tables in the join, and big tables, which is not good).


My project is called "mortiforo", coming from the spanish word mortifero, which means deadly. We are neighbors, i am in Venezuela.

You can find it in sourceforge.



Cool, I'll take a look.


I am not a lawyer so i dont know what license the project will be since i don't know the licenses from all the libraries and such, but it will be either gpl or bsd.



If you want people to use your system, any but GPL. For my own experiencie with open source projects, if you have a gpl project, you'll get many emails saying ".. I like your project but I cannot use it on my company because it's gpl...".

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey, I have seen in your PDF's thesis that you say that JForum only supports MySQL. Tha't so not true . It also suports hsqldb, oracle, sqlserver and postgresql ;)

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, when i started it that was true :P

Will update it once i finish mine :P

Ironically, the thesis main idea is to do the ldap authentication, but if i would start today i would have chosen jforum because my tutor wanted servlets with freemarker, and jforum is already feature complete.

Mine will be very basic, want to do the ldap authentication in 1-2 months or so...
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, it would be nice if you could join us sometime . It would be great to have ldap support.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Personally, I feel that mysql is good enough to be used in a forum application. 8)
[originally posted on jforum.net by jamesyong]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rafael Steil wrote:Nope, DB2 is not supported.

Rafael



What a pity! I'm writing a web app based on DB2 so I'm searching for a forum that can use the same DBMS. Furthermore my app is in Italian and I'm searching a forum that supports Italian, but JForum doesn't support it.

It seems very nice but it's not for me.

[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well,

One of the beautiful things of open source is that what "it's not there", you can add.

Not saying that it is easy or that you have to do it yourself (if it's a business project, you could hire someone to do it) but having broswed the code a bit, I would say it must not be tremendoulsy difficult to add support to new databases that have a good JDBC driver available.

I could be wrong though, I never tried doing so, as all the DBs I need are already there ;).

Good luck with your project
[originally posted on jforum.net by GreenEyed]
 
In the renaissance, how big were the dinosaurs? Did you have tiny ads?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic