Next Generation Code Architecture for Building Maintainable Node Applications


In today's fast-paced software development landscape, it's essential to have tools that allow us to build, test, and deploy our applications quickly and efficiently. Being able to ship features fast implies having a healthy and maintainable codebase, which can be tricky and daunting, especially in the long-run.

In this talk, we'll explore strategies for building maintainable Node backends by leveraging tooling that Nx provides. This includes how to modularize a codebase, using code generators for consistency, establish code boundaries, and how to keep CI fast as your codebase grows.


All right. Welcome to my lightning talk. And I'm going to talk about the database magic behind 40 million operations a second. It all starts with a company behind. So the clicker is clicking. Yeah. The company doing this is called Amadeus. You might have heard of this company. You might have heard not of this company. The company is doing business to business for travel agencies, for the airlines, everything around travel. Meaning if you go look for a ticket, let's say to fly from Berlin to, I don't know, New York. The Amadeus database underneath, by the way, it doesn't really matter whom you will be talking to a part of Expedia, Kayak, or it doesn't matter. Underneath it's always Amadeus database. It has to answer quite quickly like this because the traffic is growing. And if they don't answer in the right time, they're losing money. Now on the graph, you can see if it all started with the graph 2011, I would say it's roughly 600K availability requests per second. 2019, the presentation was created. It's by the way, not my slide. It's the slide directly from Amadeus. It was 15.2 million availability requests per second. And it has to go really, really, really quickly. By the time 2023, you can sum it up. It's give or take 40 million a second because each year they face a growth of 40% a year. Now to handle all of this, you need a good database, not only good, but reliable and also fast. And that database is Couchbase underneath. Couchbase is a distributed database, which was built with scaling out in mind and doing the requests really, really quickly. Normally in the normal landscape, you would have a lot of components such as relational database to run transactions. You would have a NoSQL database for the flexibility. You would cache everything. And then you would have a full text search engine, eventing, maybe analytics and some mobile database for your phone, laptop, and also the web browser. With Couchbase, you have everything in one hand. We have all of these capabilities. And that is a small list of what's possible with Couchbase. Flexible, because we use the JSON model. It's scalable. We can have up to 1024 nodes. It's really fast because you can talk to Couchbase key value or SQL++. It's our own version of SQL. And it's compatible with ANSI standard 2003. It's highly available. It's quite reliable because with Amadeus, they had not a single downtime with the time they use Couchbase. It's always on, always running, always scaling out, always serving the customer's traffic. So if you've been looking for the tickets, you probably know that normally it's answering times are quite low. We also have embedded caching inside. And we have a mobile database, really important. Deployment is quite flexible. You can run on your own premises with traditional old-fashioned binaries. You can use the kubernetes operator. And you can use our own cloud, which is called Capella. It's like right there on my T-shirt. And it runs on aws, Google, or Microsoft Asia. Go try it out. It's quite easy to use. There are always examples for node.js. And now I'm open to answer your questions. See? It was not even seven minutes. It was quite precisely four minutes. So questions? Yes. What is the mobile database? The mobile database, the question was, what is the mobile database? The mobile database is a light version of the database, which is installed on mobile devices, on Raspberry Pi, on web browser. And it's synchronizing the data with the main database in the cloud on your premises of a special component. This component is making sure that your device is getting only the data it's supposed to get. So it's lightweight database. Let's put it this way. It's designed to work offline first. The components with mobile databases can talk to each other peer-to-peer. Yes. What about the vector database? I'm not sure I would have answer to the question about vector database. Not really. We don't have support for vector database. Sorry. It's either JSON or binaries. Nothing else. Yes, please. Is there any special data model for... Well, it's JSON. So basically, we can digest all the JSON documents up to 20 megabytes. Okay, I see no more questions. So let's have a small break then.
30 min
14 Apr, 2023

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Workshops on related topic