How do Morphia, Mongo4j and Spring data for MongoD

2019-01-23 14:46发布

I'm interested in how to they compare to each other, what's more mature, has more features, better for some use cases.

My own use case is to create a real-time monitoring service (think Chartbeat) but if you can talk about other use cases please do it - after all this Q&A might be of interest for others.

4条回答
闹够了就滚
2楼-- · 2019-01-23 15:20

Morphia is the way to go. Pretty stable, very good Play integration and offers access to all Mongo driver features if you need more torque. Reference resolution, entity embedding are working as expected. You get lifecycle annotations too, which are pretty useful for boilerplate persistence code (timestamps?)

查看更多
Evening l夕情丶
3楼-- · 2019-01-23 15:26

https://github.com/impetus-opensource/Kundera/wiki/Kundera-Mongo-performance A performance sheet is compiled over here. Kundera is complete JPA2.0 compliant solution and provide much stronger interface, ease of implement and set of features.

-Vivek

查看更多
三岁会撩人
4楼-- · 2019-01-23 15:31

Morphia may be the most stable of the three. I have not heard much of Mongo4j lately- probably abandoned. I personally like spring-data because of the hades project... You don't need to implement the DAOs. You just write the interface and spring data automatically provides it to you. However Spring Data Mongodb implementation seems a little buggy in my initial trial. If you have hard dates and is working on a production quality product, probably it is wise to choose Morphia.

查看更多
倾城 Initia
5楼-- · 2019-01-23 15:31

Kundera is another alternative if you're looking for ease of development and good performance. It's JPA compliant.

查看更多
登录 后发表回答