InterviewSolution
| 1. |
What is the significance of the “as” field in $graphLookup? |
|
Answer» First, we have the MongoDB QUERY language. This is the set of instructions and commands that we have to use to interact with MongoDB.All CRUD operations and the documents that we send back and forth in MongoDB are managed by this layer. They translate the incoming BSON wire protocol messages that MongoDB uses to communicate with the client side application libraries that we call drivers into MongoDB operations. Then, we have the MongoDB Data Model Layer. This is the layer RESPONSIBLE for applying all the CRUD operations defined in the MongoDB query language and how they should result in the data structures managed by MongoDB. Management of namespaces, database names, and collections, which indexes are defined per namespace and which interactions need to be performed to respond to the incoming requests are all managed here. This is ALSO the layer where a REPLICATION mechanism is defined. This is where we define WriteConcerns, ReadConcerns that applications may require. Next, we have the storage layer. At this layer, we will have all the persistence in physical medium calls, how data is stored on disk, what kind of files does it use, what levels of compression amongst other settings can be set. MongoDB has several different types of storage engines that will persist data with different properties, depending on how the system is configured. WiredTiger is the default storage engine. At this layer, all the actions regarding flushers to this, journal commits, compression operations, and low-level system access happens.
Shards themselves are replica sets-- highly availability in units. Where we have other components as well, like:
|
|