Chapter 5. Writing New Apps for PaaS
Legacy web applications tended to be monolithic and difficult to scale. As we saw in Chapter 4, it’s possible to move legacy applications to Platform-as-a-Service, but it can be tedious as the architecture is generally quite different. The true power of Platform-as-a-Service is realized when you start from scratch, writing new applications.
Before we take a look at creating new apps on PaaS, it will be useful to examine the monolithic nature of old-school applications.
Breaking Down the Monolith
Monolithic code is where you take one application and keep adding more capabilities to it, sticking on features and adding search functions, account management, and blog posts. It’s a Frankenstein monster. It’s a patchwork. You get memory leaks, and the app consumes more and more RAM.
Debugging these apps becomes a maze, whereas if each of your individual components is separate—i.e., if the search component is separate from the blog post component, which is separate from the user component, etc.—and each of those components can run and scale independently, you have much more flexibility. For example, if your service depends more highly on a search function than it does on managing and registering users, you can scale the search component up very high, giving it many resources, while on the other hand the user component can be a very small application. But if it’s a monolithic application, every component is part of the big app.
Even if you start trying to ...
Get Programming for PaaS now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.