Summary
In this chapter, we've covered a lot to do with databases. We started by creating a plain connection to PostgreSQL. After that, we added a pool of connections with the r2d2 crate and used the rayon crate to execute SQL statements in parallel. We created a tool to manage our users database, and reimplemented it for our MySQL database.
We have also mastered some ways of interacting with NoSQL databases, in particular, Redis and MongoDB.
The last database we explored was DynamoDB, which is part of Amazon Web Services and can be scaled very easily.
For all examples, we run database instances in containers, because it's the simplest way to test interactions with databases. We haven't use database connections in microservices yet, because ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access