concept oplog in category mongoDB

This is an excerpt from Manning's book MongoDB in Action, Second Edition: Covers MongoDB version 3.0.
At the heart of MongoDB’s replication stands the oplog. The oplog is a capped collection that lives in a database called local on every replicating node and records all changes to the data. Every time a client writes to the primary, an entry with enough information to reproduce the write is automatically added to the primary’s oplog. Once the write is replicated to a given secondary, that secondary’s oplog also stores a record of the write. Each oplog entry is identified with a BSON timestamp, and all secondaries use the timestamp to keep track of the latest entry they’ve applied.[5]
How does this appear in the oplog?
myapp:PRIMARY> use local myapp:PRIMARY> db.oplog.rs.find({op: "u"}) { "ts" : Timestamp(1384128758, 1), "h" : NumberLong("5431582342821118204"), "v" : 2, "op" : "u", "ns" : "bookstore.books", "o2" : { "_id" : ObjectId("527bc9aac2595f18349e4154") }, "o" : { "$set" : { "author" : "Dickens" } } } { "ts" : Timestamp(1384128758, 2), "h" : NumberLong("3897436474689294423"), "v" : 2, "op" : "u", "ns" : "bookstore.books", "o2" : { "_id" : ObjectId("528020a9f3f61863aba207e7") }, "o" : { "$set" : { "author" : "Dickens" } } } { "ts" : Timestamp(1384128758, 3), "h" : NumberLong("2241781384783113"), "v" : 2, "op" : "u", "ns" : "bookstore.books", "o2" : { "_id" : ObjectId("528020a9f3f61863aba207e8") }, "o" : { "$set" : { "author" : "Dickens" } } }As you can see, each updated document gets its own oplog entry. This normalization is done as part of the more general strategy of ensuring that secondaries always end up with the same data as the primary. To guarantee this, every applied operation must be idempotent—it can’t matter how many times a given oplog entry is applied. The result must always be the same. But the secondaries must apply the oplog entries in the same order as they were generated for the oplog. Other multidocument operations, like deletes, will exhibit the same behavior. You can try different operations and see how they ultimately appear in the oplog.
To get some basic information about the oplog’s current status, you can run the shell’s db.getReplicationInfo() method: