Is Zotonic my best option for this project?

50 views
Skip to first unread message

Juan Jose Comellas

unread,
Aug 11, 2011, 10:21:01 PM8/11/11
to zotoni...@googlegroups.com
I will start working on a project soon that will require me to gather and store lots of JSON-encoded documents (with nested values). My original plan was to use Nitrogen for the web interface and CouchDB to store the data, but after looking a little bit at Zotonic I really liked what I saw. The project has several parts: one is a web interface and the other one is a group of gen_servers/gen_fsms that connect to external servers to gather the data, process and store it (sometimes sending email alerts). What I need to know is whether it's possible to use Zotonic more as a web framework than a CMS.

Would anybody that knows more about Zotonic choose it for something like this? Would I be forced to store everything in Postgres? How would I store or access a tree-like JSON document in Zotonic? My other gripe is that I'm a bit wary of the inverted database model (pivot tables) that Zotonic seems to be using. I've already worked on a project that used something similar to this and we had problems with large numbers of documents (data/index bloat, slow accesses, etc.).

I would appreciate any comments/tips you may give me.

Thanks,

Juanjo

Andreas Stenius

unread,
Aug 12, 2011, 4:41:22 AM8/12/11
to zotoni...@googlegroups.com
Hi,

You may cook-up whatever storage you want. The core zotonic parts are
tightly coupled with postgres, but any custom models you write are
free to use whatever storage suits you.

The model is a "water proof" wall between your use of the data, and
the storage in use. You access the model from your templates (or other
erlang code), and the model is responsible for storing and retrieving
the data.
Some functionality (search) may be at a loss if the data isn't stored
according to zotonics data model in postgres, but that may as well be
a non-issue (I'm not very familiar with mod_search, so it's more of a
hunch, Arjan or Marc will be able to give a more precise answer).

I wouldn't hesitate to use zotonic for any project that needs a web presence.

//Andreas

2011/8/12 Juan Jose Comellas <jcom...@gmail.com>:

Marc Worrell

unread,
Aug 12, 2011, 5:07:10 AM8/12/11
to zotoni...@googlegroups.com

On 12 aug 2011, at 10:41, Andreas Stenius wrote:
> Some functionality (search) may be at a loss if the data isn't stored
> according to zotonics data model in postgres, but that may as well be
> a non-issue (I'm not very familiar with mod_search, so it's more of a
> hunch, Arjan or Marc will be able to give a more precise answer).

You can add your own search observers and perform searches on your own data store.
This enables you to use m.search with your own models.
Check mod_search how to observe the search notifications.

It might also be possible to store your JSON documents in a special resource category (or categories).
Then you can add additional admin templates to edit or view the contents of your documents.
And you can easily mix/match between the different resources in your system, enabling atom feeds, search, presentation etc.
You can also hook the pivot routines to get a good full text index of your documents.

This is what I mostly do when I receive documents.

- Marc

Reply all
Reply to author
Forward
0 new messages