Login

mvnForum

mvnForum Homepage Welcome Guest
  Search  
  Index  | Recent Threads  | Unanswered Threads  | List Polls  | Public Albums  | Who's Online  | Help


Quick Go »


No member browsing this thread
Thread Status: Active
Total posts in this thread: 15
Posts: 15   Pages: 2   [ Previous Page | 1 2 ]
Post new Thread
Author
Previous Thread This topic has been viewed 2820 times and has 14 replies Next Thread
Male minhnn
mvnForum Developer
Member's Avatar

Vietnam
Joined: Oct 16, 2002
Post Count: 2956
Status: Offline
Reply to this Post  Reply with Quote 
Re: food for thought

Hi, Minh:

Did you check the phpBB's schema, one thing I found that the additional field [permissionLevel] in the forum table would be quite useful. Thus, before query any info related to any forum, it only needs to compare the forum's permission level with the current user's permission level, then do things accordingly. That makes the permission checking and setting much simpler and I believe this will also increase the performance in the runtime. The current mvnforum's permission schema is too complex and very confusing, and very difficult to use.

Please note that the mvnForum is not finished yet, I plan to add an option to the forum that is PrivateForum option, when it is true, then the forum ignore the global permission.
mvnForum's permission system is generic and could be extended easily, and Cord are helping me on the docs, especially permission system.
----------------------------------------
Minh Nguyen
mvnForum Developer
Want a free, open source Java Jsp/Servlet forum, get mvnForum at http://www.mvnForum.com

http://www.DienDanLinux.org
[Feb 6, 2004 2:42:20 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest    http://www.MyVietnam.net    minhnn_mvn [Link] Report threatening or abusive post: please login first  Go to top 
Male minhnn
mvnForum Developer
Member's Avatar

Vietnam
Joined: Oct 16, 2002
Post Count: 2956
Status: Offline
Reply to this Post  Reply with Quote 
Re: food for thought

I am not suggesting that fields that are often used such as thread count should be extended properties. But, mvnForumUser table has 40 or more columns. I am pretty sure that not every field in this table is needed for everybody. And also, if someone wants to extend mvnForum with some new property (that is part of core mvnForum) he would need to change db schema and to add new column, which is not that good.

Actually the extendable property feature is in to TODO.txt for a long time. But since I consider other tasks higher priority, this feature is plan in later 1.1.0 (please see TODO.txt)
----------------------------------------
Minh Nguyen
mvnForum Developer
Want a free, open source Java Jsp/Servlet forum, get mvnForum at http://www.mvnForum.com

http://www.DienDanLinux.org
[Feb 6, 2004 2:45:55 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest    http://www.MyVietnam.net    minhnn_mvn [Link] Report threatening or abusive post: please login first  Go to top 
Male golthar
Newbie




Joined: Apr 24, 2005
Post Count: 33
Status: Offline
Reply to this Post  Reply with Quote 
Re: food for thought

Yes, I agree that Jive is more extendable, but it also hurt the performance of the forum if user add some extended properties. For example, add a property to store the Thread view count in Jive is not easy without hurting the performance smile


Sorry to bump this old post.

When I was foolish and wanted to create my own forum, I was also thinking of using a HashMap of properties for each user to keep extra information.
It would make it easier to add modifications (for example, storing gender)

The performance really isn't a problem since you would load this data from the database once and cache it into memory.
Of course some stuff will be common on all forums (like usernames, your email adress..etc) and thus you should include those as a default in your domain objects.
But anything else could be turned into a property.
The database can hold a posterproperty table that looks like this:
PosterID (integer) Value (String)
You'd query on the integer.

Am I making sense?
(PS: Hibernate supports this)
[Apr 27, 2005 3:23:43 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Male minhnn
mvnForum Developer
Member's Avatar

Vietnam
Joined: Oct 16, 2002
Post Count: 2956
Status: Offline
Reply to this Post  Reply with Quote 
Re: food for thought

Thanks golthar for your discussion, actually I also would like to support extention property. Currently I think of 2 solution:

1. a table as in Jive
2. a text field that store all data in xml format

How do you think about the second solution.

ps: I agree that we could improve performace with caching, especially when mvnForum 1.0 GA_dev uses Whirly cache to improve performance. (The member hit rate is about 60% and post hit rate is about 20%)
----------------------------------------
Minh Nguyen
mvnForum Developer
Want a free, open source Java Jsp/Servlet forum, get mvnForum at http://www.mvnForum.com

http://www.DienDanLinux.org
[Apr 28, 2005 2:48:22 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest    http://www.MyVietnam.net    minhnn_mvn [Link] Report threatening or abusive post: please login first  Go to top 
Male golthar
Newbie




Joined: Apr 24, 2005
Post Count: 33
Status: Offline
Reply to this Post  Reply with Quote 
Re: food for thought

Thanks golthar for your discussion, actually I also would like to support extention property. Currently I think of 2 solution:

1. a table as in Jive


My favorite as it's very easy to implement and any Java programmer with some sense in Java Properties will understand how to use it.
And new components can save extra data without needing to change the database schema.
If I wanted to add information about the kind of pet a poster has (humor me) I could go several ways:

1 Make an extra table with the user ID as a key (somewhat messy, you need to setup the tables correctly)
2 Change the user table and add another collumn (even more messy)
3 Make a seperate table to house properties (as in Jive) and make the Poster object have a function like: putProperty(String name, String value) which does all the work (basically insert a row in a simple table)


2. a text field that store all data in xml format

How do you think about the second solution.


I'm the wrong person to ask, I hate how XML is abused for everything these days.
However... it sounds like a nice idea. biggrin
You could add a properties collumn to every record (for example Poster) and store as much as you need in XML.

There are some downsides though.. the performance will be terrible as you will be editing the XML for every change and thus will be updating larger fields (you could pretty quickly fill up 30 kb per user on bigger forums with lots of data)
However with proper caching and handling, this could work out just like using a seperate properties table as I mentioned.
Your idea does sound very interesting to me and I'll think about it some more it might even work out better than my idea.

Perhaps we could think of making an API that allows both ideas and we could then implement both and see which ones work best?


ps: I agree that we could improve performace with caching, especially when mvnForum 1.0 GA_dev uses Whirly cache to improve performance. (The member hit rate is about 60% and post hit rate is about 20%)


Caching if done properly is a great boost.
Don't be afraid to use statistics to dynamically improve the cache settings. cool
[Apr 28, 2005 3:00:33 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 15   Pages: 2   [ Previous Page | 1 2 ]
Show Printable Version of Thread  Post new Thread