How light weighted Dexterity-base contenttype can be

妖精的绣舞 提交于 2019-12-10 17:15:40

问题


I'm trying to write a light weight content type that work similar to Facebook's post.

  • The whole content schema is just a text field. There's no title, description.

  • It must be Contentish and is managed by CMFCore: It must have an FTI, a portaltype so that we can create/browse content through standard method; it is catalog-aware.

  • They will have relation/reference within each others.

  • The number of objects is gonna be huge, say 10-100M.

The most similar things to this is the comment object (plone.app.discussion). While I've looked through the plone.app.discussion, I found the content implementation is really complicated, with too much low level base classes. In most of the parts, I either don't understand it at all or it can't be reused outside the comment use case, and have little referenced/sample value to me.

So I want to ask is how much overhead it will be if I go the high level framework path compare to the low level one that plone.app.discussion went through ?


回答1:


I don't think p.a.discussion is right for you.

A Dexterity type may be fine, but you'll need to tune the performance. If performance is going to be an issue, it'll be because of the things that make types contentish (e.g. an FTI, the CMF base classes), so nothing will be lighter than Dexterity and meet your requirements, but you may want to think about whether you actually want to store everything in a relational database or something else instead. It shouldn't be strictly necessary, though.

Martin




回答2:


Plone will not scale to 10 M items in its catalogue (the largest I've heard of is something like 400 k). I would suggest building your application with a light weight framework like Pyramid.



来源:https://stackoverflow.com/questions/7732934/how-light-weighted-dexterity-base-contenttype-can-be

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!