使用Java Servlet / JSP / JSF和Ajax组合构建论坛的最佳数据库/数据策略是什么?

时间:2022-02-22 20:07:46

Frequently for standard J2EE projects I use directly SQL constructs or ORM framework to manage data into forms and so on, but of course enterprise environments don't bother much about n-users access performances at the same time.

对于标准J2EE项目,我经常使用SQL构造或ORM框架将数据管理到表单等等,但当然企业环境不会同时关注n个用户访问性能。

So what could it be the most performance suited strategy for an user forum of up 50 users and more?

那么对于拥有50个以上用户的用户论坛来说,它最适合的策略是什么呢?

Have you any advice?

你有什么建议吗?

1) In my opinion I must keep a fast access index of all front/last messages at data level, but I am in doubt for using plain text file(s) or a database table?

1)在我看来,我必须在数据级别保留所有前/后消息的快速访问索引,但我对使用纯文本文件或数据库表有疑问?

2) Visually my idea is to build up all on a top of a message list linked only to the "fast access index", and then using Ajax to get message details and content, so I can divide the application flows into two separate channels, one aimed to serve fast content and the other to serve complex data (content message, user details and so on).

2)在视觉上我的想法是将所有内容构建在仅链接到“快速访问索引”的消息列表的顶部,然后使用Ajax获取消息详细信息和内容,因此我可以将应用程序流划分为两个单独的通道,一个旨在提供快速内容,另一个旨在提供复杂数据(内容消息,用户详细信息等)。

Important notice:

the forum application must fits well on any "poor" data and Java environment, please do not phpize my question ;-)

论坛应用程序必须适合任何“糟糕”的数据和Java环境,请不要php我的问题;-)

1 个解决方案

#1


Have a read on Hibernate and the second-level cache. You could cache all of your "fast access" stuff so the DB is not hit until more detail is requested about an entry.

阅读Hibernate和二级缓存。您可以缓存所有“快速访问”内容,以便在请求有关条目的更多详细信息之前不会命中数据库。

#1


Have a read on Hibernate and the second-level cache. You could cache all of your "fast access" stuff so the DB is not hit until more detail is requested about an entry.

阅读Hibernate和二级缓存。您可以缓存所有“快速访问”内容,以便在请求有关条目的更多详细信息之前不会命中数据库。