What is about performance?

32 views
Skip to first unread message

Michael Sivolobov

unread,
Jun 4, 2014, 4:47:20 AM6/4/14
to phpcr...@googlegroups.com
Why should I use PHPCR instead of Mongo DB? Is there any performance issue or what? I don't need versioning of my documents. What would be the best for me and why?

David Buchmann

unread,
Jun 4, 2014, 5:17:05 AM6/4/14
to phpcr...@googlegroups.com
hi michael,

welcome to this mailing list.

the interest of the php content repository is to provide a vendor
neutral api to access content. you could implement phpcr with mongodb as
storage (somebody actually started doing that but abandoned a while ago
[1]). when using phpcr, you can switch backends and for example develop
with a sqlite database locally but use jackrabbit (or mongodb if that
connector gets finished by somebody) in the production system.

the other difference between phpcr and raw mongo / couch / whatever is
expressivness. phpcr provides a tree oriented data model. the phpcr
implementation handles all the tree things for you, and the application
can just rely on the tree being consistent. for content management
systems, trees are a natural data structure. raw mongo/couch are not
good at trees. you can do nested documents, but then you can not access
children directly. or you can put meta information somewhere to emulate
the tree on top of them - and then you are implementing your own
alternative to phpcr which is not a sustainable approach.

when you ask about raw performance of reading and writing data, i would
expect mongodb to be more performant than any of the phpcr
implementations available. with jackalope-jackrabbit, you can scale
pretty decently however, load balancing the http based protocol to
several jackrabbits and do caching on your database layer.

cheers,david

[1] https://github.com/jackalope/jackalope-mongodb/
> --
> You received this message because you are subscribed to the Google
> Groups "PHPCR User Group Mailinglist" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to phpcr-users...@googlegroups.com
> <mailto:phpcr-users...@googlegroups.com>.
> To post to this group, send email to phpcr...@googlegroups.com
> <mailto:phpcr...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/phpcr-users.
> For more options, visit https://groups.google.com/d/optout.

--
Liip AG // Agile Web Development // T +41 26 422 25 11
CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch
Reply all
Reply to author
Forward
0 new messages