liveBook · Manning

NoSQL database

As explained in Troubleshooting Java: Read, debug, and optimize JVM applications

A database that uses a nonrelational data model rather than the relational model.

A NoSQL database uses a nonrelational data model. Applications may choose one when they need a different persistence technology from a relational database; examples include MongoDB, Cassandra, Redis, and Neo4j. section 5.2.1 section 8.4

For log storage, NoSQL databases can favor performance over consistency: messages may be missed or stored out of chronological order. Include a timestamp in each message so its timing remains available. ELK and Splunk are examples of engines used to store, retrieve, search, and analyze logs. section 5.2.1 section 5.2.1

Inspecting MongoDB operations

A small app writes a product to MongoDB and reads the product list. JProfiler can intercept these operations and show invocation counts, execution times, and the stack traces leading to them. section 8.4 section 8.4

Figure 8.21 JProfiler can intercept the operations an app applies to a NoSQL database. In this example, JProfiler intercepts two events: an update and a read on a document named “product.” This way, you can monitor the interaction between your app and a NoSQL database and consider the number of invocations for specific operations and the execution time. The profiler also gives you the complete stack trace for a particular operation so you can quickly find the code that caused a specific event.

See the intercepted MongoDB update and read events, including the profiler details available for each operation. section 8.4

How Troubleshooting Java: Read, debug, and optimize JVM applications covers it

How deep it goes
Explains log-storage tradeoffs and demonstrates profiled MongoDB operations without detailing NoSQL data models.
Examples
Uses log storage and a MongoDB product app with monitored write and read operations.
What it assumes
Requires a locally installed MongoDB server to reproduce the profiled application example.
What you can do after
Diagnose MongoDB interactions by inspecting operation counts, execution times, and stack traces in JProfiler.
How it connects
Connects NoSQL databases with logging, consistency, MongoDB, Cassandra, and application profiling.

Also explained in

Compare how 9 books explain NoSQL database →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Troubleshooting Java: Read, debug, and optimize JVM applications. The section links point to the parts of the book it draws on.