How to monitor internal data structures

Hey, what’s the best practice for monitoring internal data structures? E.g. I have an application where I track orders, deliveries, and clients. I guess the way to go here is to have a database as persistent storage and have my application store the data there. However, every read and write must go through the database now. For latency and performance, storing the data in built in Maps, Sets and Lists is faster. However, how do I monitor this? I was thinking of serializing the data I process, i.e. duplicating it to a sql database, and then monitor it using some established database UI. However, here comes the question of database and my application data consistency. Since I essentially duplicate all that.

I think normally the application would commit all the data into its persistent storage (the SQL database) and monitor it there. The goal would be to have as little of the data as possible in working memory.

1 Like