J'ai pris ce livre, le seul que j'ai acheté sur MongoDB, et je dois avouer que ça me semble une bonne affaire même si je ne l'ai pas lu entièrement pour l'instant.
Ça me donne l'impression d'un livre en seconde place dans la litterature sur MongoDB. Pourquoi second ? * Parce qu'en première place, il y a pour moi toute la doc en ligne sur le site (ou peut être pour certains un autre Oreilly que je n'ai pas acheté, mais dont le sommaire me faisait à 100% penser à la doc du site MongoDB). * Et que ce livre permet réellement de revoir les concepts d'une autre façon, un peu plus appliquée, et qu'au final ça permet de bien assimiler.
Quelques remarques pour le prospect qui se demande s'il va acheter : * J'ai pris le livre en version originale, ne me parlez pas des traductions, je n'ai pas voulu essayer... * Tous les exemples du livres ne se valent pas en quantité d'explications : mais si l'on assimile bien les premiers, on comprend pourquoi la suite peut être plus courte... De toute façon je ne suis pas accro des livres qui tentent de se valoriser à la centaine de page de plus... Au moins ce livre est plutôt concis, tout en étant clair et en fournissant des explications précieuses. * Ça peut valoir le coup de garder un certain esprit critique : les solutions proposées sont très intéressantes, pas forcément parfaites. * Ça aborde le MapReduce, mais ça ne dit pas pour autant que MongoDB est la meilleure base NoSQL pour ça... Et pour cause... Par contre, de ce que j'ai lu, ça manque un peu d'aborder l'Aggregation Framework là où ça devrait. Dommage.Lire la suite ›
Commentaires client les plus utiles sur Amazon.com (beta)
15 internautes sur 15 ont trouvé ce commentaire utile
Detailed, well-thought-out designs for a range of applications26 mars 2013
A. Jesse Davis
- Publié sur Amazon.com
Disclosure: I was paid to critique an early draft.
There's a lot of bad advice out there regarding MongoDB. Even smart sources can encourage risky methods. Soon, I hope, there will be as much good MongoDB instruction from experts outside 10gen as there is good third-party SQL instruction. For now, know that you can trust Rick Copeland.
Copeland's intended audience has basic MongoDB competence and wants application examples that optimize either for scalability or maintainability, plus the principles to guide new designs. Copeland also assumes basic SQL knowledge, and presents most examples in contrast to conventional SQL solutions, a method I find distracting and irrelevant. He identifies some common application types (product catalog, CMS, analytics, etc.) and provides for each a schema and application logic. He goes far beyond prior works when he discusses performance, consistency guarantees, and sharding considerations for every application.
Copeland discusses the basic questions about MongoDB schemas. MongoDB requires optimization up front, more often than SQL schema design does. Most often the question is whether to embed or to link, and what data should be normalized or denormalized. Copeland uses an extensive description of disk seek times to explain the motivations for embedding and denormalization, better than prior MongoDB schema-design materials have. Many presentations have claimed that you can migrate your schema lazily with MongoDB: your application can start writing data in a new format, and read data in both new and old formats, while a batch job slowly migrates old data. *MongoDB Applied Design Patterns* finally presents a complete example of lazy migration, including example code (in Python) for reading data in both formats while the migration is in progress.
Without general-purpose transactions, MongoDB requires new techniques to guarantee that a series of changes is atomic: that is, to guarantee that in the long run your data either reflects all the changes or none of them. If there's no way to restrict your atomic operation to one document, your next best bet is optimistic concurrency control: try to complete the operation, check if another process overwrote your changes, and if so retry them. There are a number of examples of this in the wild; Copeland's contribution is unusually complete, with example code for handling every case that can arise.
Part 2 of the book is much longer, and covers six kinds of application in depth, both conventional (a social network) and unusual (a role-playing game). Here Copeland excels. Where he covers well-tread ground his designs are more detailed and better thought out than prior authors', and where he innovates he chooses interesting problems to solve. In the Operational Intelligence chapter he explains compound indexes clearly and correctly. He presents a complete design for an analytics application using the MongoDB aggregation framework, and covers the interactions between aggregation, indexes, and sharding.
The final example of the book is an online Zork-style game. This is less widely applicable than E-Commerce or content management, but way more fun. Copeland chooses to radically denormalize his schema: when a player enters a room, the room's entire data structure is copied into the player's document so the game can display the player's state without querying for the room again. As with the other examples, this application is considered in depth: each query is carefully indexed, and when a player picks up an item, Copeland's code prevents another player from picking it up concurrently. Most of the game's intelligence is expressed in Python code rather than in MongoDB queries. Developers using Oracle or Microsoft SQL Server tend to push all the logic and complexity into their schema, their queries, and stored procedures. With MongoDB's simpler feature-set, coders have to move more logic out of the database and into their application. If a SQL refugee hasn't yet learned this lesson, the gaming chapter will drive it home.
8 internautes sur 8 ont trouvé ce commentaire utile
Much Needed Pragmatic info on MongoDB5 avril 2013
- Publié sur Amazon.com
I have used MongoDB for a few smaller projects and I'm currently in the middle of creating a much larger application with it. I wanted to know what some best practices were about how to structure data in MongoDB vs. a traditional RDBMS. It feels like at first that you're completely free and can do whatever you want with MongoDB, but there are definitely costs associated with that freedom and I wanted realistic, non-hyped guidance for how to approach structuring data for things that I might not realize down the road until it is too late. I'm giving this background to share where I'm coming from when I read this book and what I was seeking in the book. I would say that this book definitely meets this need. It helps a traditional database programmer get up to speed on how to think about a document oriented datastore like MongoDB. I appreciated that there was little fluff in the book. Very pragmatic, to the point and helped give me an understanding of some best practices when using MongoDB. This book is definitely *not* for the MongoDB beginner, you should have at least some basic understanding of working with MongoDB, through its shell and working with it through a programming language. Once you have that though you'll likely start having the questions that this book can answer. I especially appreciated the use cases in the second half of the book. The first half struck me as fairly close to what I've heard other people say (such as "should you embed or reference documents? It depends" which is not all that helpful beyond letting you know that there is more to it than you think). The second half helped show in practice both in some light python code and through the suggested schema how to approach and think about many common problems. Definitely a timely book for me and definitely recommend it to anyone else who has a basic understanding of MongoDB but wants to start using it in a meaningful way for projects.
3 internautes sur 3 ont trouvé ce commentaire utile
Worth More Than One Read11 juillet 2013
- Publié sur Amazon.com
MongoDB Applied Design Patterns is a book that I will read again. I generally don't say that about technical books, but the strengths of this work are such that many parts merit a second reading.
This book is for folks with some experience using MongoDB. If you've never worked with MongoDB before, you should start with another book. Python developers, in particular, will benefit from studying this book, as most of the code examples are in that language. As long as you have some object-oriented programming experience and have worked with the MongoDB shell, though, you'll have little difficulty following the code examples.
Another group of people who will strongly benefit from this book are those with only relational database experience. The author does a thorough job, particularly in the early sections of the book, of comparing MongoDB with traditional relational database management systems.
I particularly liked the author's discussion of transactions, in chapter 3. The example is complex, and not a simple debit-credit discussion. You understand through this example that you must write your own transaction management when you give up using a relational database system. To me, this is an important point, and I'm glad that the author spends so much time on this example.
Some of the use cases presented are similar to those in the MongoDB manual, in particular chapters four, five, and six. The remaining use cases go beyond what is described in that manual. All of the discussion in these use cases is thorough. There is typically an explanation of the data model (schema design) and then of standard CRUD operations. The author also goes into not-so-typical operations, like aggregation. I was particularly pleased that each use case includes sharding concerns.
In summary, I highly recommend this book. It's great to see MongoDB being adopted for so many different uses.
1 internautes sur 1 ont trouvé ce commentaire utile
Great MongoDB book16 juin 2013
- Publié sur Amazon.com
In part 1 (3 chapters) Copeland explores various designs for MongoDB's documents. In small examples he explains the advantages for embeding objects or reference them by ID (chapter 1), modeling polymorphic schemas (chapter 2) and how you use atomic update operations to maintain consistency (chapter 3). In all chapters he has performance, flexibility and complexity in mind which is really helpful and he explains the performance impacts really well.
In the second part (6 chapters) Copeland shows some example Applications and the application of MongoDB patterns to solving domain-specific problems. Here he uses the patterns from part 1 and you can see them in action on real world use cases. Each application has different use cases and for each use case he explains the schema design and how to work with the schema on the application level. I think you can see this part a bit like a cook book to find solutions to typical problems even thought it won't have the typical structure like the normal O'Reilly cook books have.
Overall the book is very comprehensive and Copelands gets to the point really fast which is what I like on this book.
4 internautes sur 6 ont trouvé ce commentaire utile
Not bad, but not in-depth10 mai 2013
- Publié sur Amazon.com
Format: Format Kindle
Everyone knows MongoDB is big. Its an important skill and doing it right isn't always easy and great documentation is hard to come by so this book is nice however, this isn't in-depth and there is a lot of surface here.
I feel that the book would have been better focusing on less use cases and really excelling in drilling out the use cases. I would have liked to see the ecommerce (something i am working on) case study more in-depth.
So, not a bad book. Good information, just a little light for me. Maybe i misunderstood the target audience. As a Safari reader this book is good but I wouldn't recommend the kindle version at $24