The Rise of Modern Transactional Stack

Rate this content
Bookmark
Slides

Databases and transactional backends are the heartbeats of our everyday lives - they power nearly every transaction in the modern world, from booking airplane tickets to ordering food on Doordash. The status quo of powering these transactions today is building on top of a microservices-heavy architecture -- by leveraging caches and queues to preserve transaction state and OLTP that guarantees idempotency and consistency. The next evolution of this stack is replacing cache/queues with a central orchestrator -- workflow engines like cadence and conductor. This all happened in what we traditionally call "the backend", but a new stack is emerging for the Javascript world: more and more greenfield projects are written only in Javascript/Typescript, and this group of projects share a unique stack unlike what we have seen previously. The presentation will dive into the history and evolution of platform shifts, and focus on the most exciting transactional problems presented in the modern monoliths world that's edge-native, 100% Javascript -- and argue why the word "serverless" is out of date :)

7 min
06 Jun, 2023

Video Summary and Transcription

Today's Talk explores architectural shifts in transactions, highlighting the dominance of JavaScript in the modern transactional stack and the elimination of the frontend-backend divide. The use of serverless and component-driven toolings allows for scalable infrastructure provisioning and removes the need for DevOps teams. Additionally, workflow engines play a crucial role in orchestrating async functions in the serverless native world.

Available in Español

1. Architectural Shifts in Transactions

Short description:

Today, I will share interesting architectural shifts in the context of transactions. JavaScript is winning in the old world architecture, where microservices are divided between the client and server. In the modern transactional stack, serverless and JavaScript alone power the whole application. There are no longer frontend and backend, and platforms like Superbase, Convex, and Upsash eliminate the need to manage backend infrastructure.

Hi, everyone. My name is Yoko. I'm a tech cartoonist, developer, product manager, and lastly partner at H16z investing in the JavaScript ecosystem and developer tools. So today I would like to share a few interesting architectural shifts I have seen after talking to hundreds of developers and tech companies. I'm putting the architectures in the context of transactions since they're so core to our daily lives. They power things from plane tickets building to getting food deliveries to our doors to booking cat sitters and dog sitters. And we're seeing a major shift in how developers use and reason about technologies here.

Well, spoiler alert, JavaScript always wins. So let's talk about why and how. Now, here is the architecture you will see in the old world. As you can see here, there are a bunch of microservices divided between client and the server because they're retaining different languages, also because front end and back end developers can't possibly agree with each other. So when you see the request path, when a request comes in, for example, placing an order. It gets authenticated and then sent to an API. The API endpoint will need to orchestrate hundreds of microservices to deliver a business transaction to the user. And then it will go through things like inventory management service, order processing service, payment processing service. This is when developers use queues and caches as you can see on the lower half of the picture to store what we call application states. Things like order received, order paid. The developers will also hand code the retry logic to get the data to the databases and cross their fingers and hope for the best. We found that as the system scales so does the complexity of managing queues and caches and corner cases. And now we actually see many companies start to build their own new projects very differently.

Now enter the modern transactional stack where you no longer need to provision and manage hundreds and thousands of microservices. Instead, we have got to a point that serverless and JavaScript alone is good enough to power the whole application. So you may be wondering what is the modern transactional stack? First, it's entirely JavaScript and backend is taken care of by a vendor. Sometimes the vendor is serverless. There's no longer what we call frontend and backend. Everyone is a full stack engineer and there are no longer APIs since it's written in the same programming language. And then, now you have things like server components and TRPC just calling a function. We are seeing more and more companies embracing this pattern as they go. What we traditionally call the backend, now we have platforms like Superbase, Convex, Upsash and others that can entirely eliminate the need for the app developers to directly manage backend infrastructure. Trust me, you don't want to work on AWS.

2. Modern Transactional Stack and Workflow Engines

Short description:

I used to provision infrastructure all the time and it's not fun. In this architecture, you will also utilize services that can scale down to 0 and scale up based on demand quickly. Removing the need for DevOps teams altogether. Another trait of the modern transactional stack is that it's powered by component-driven toolings. For authentication, you no longer need to deal with lower-level tools backend engineers traditionally use. Now you can just pick up tools like Clerc and use a signing React component. For object storage, you can use something called UploadThing natively in React instead of using AWS S3 directly. Lastly, as businesses use more APIs and accept more webhooks, they have to deal with async functions at scale. Workflow engines play a central role in the serverless native world, orchestrating async functions. If you want to chat more, feel free to send me a DM on Twitter at staff Yoko Draws. Thank you.

I used to provision infrastructure all the time and it's not fun. In this architecture, you will also utilize services that can scale down to 0 and scale up based on demand quickly. Removing the need for DevOps teams altogether. Upsash is a great example of this.

Second, another trait of the modern transactional stack is that it's powered by component-driven toolings. For authentication, you no longer need to deal with lower-level tools backend engineers traditionally use. Now you can just pick up tools like Clerc and use a signing React component. Another good example here is an open-source project called React Email. You no longer have to code vanilla HTML for transactional emails and now you can just use React and Tailwind directly in your email. For object storage, this is always something that a lot of engineers tell me and even myself, how to learn AWS for. But now you can use something called UploadThing natively in React instead of using AWS S3 directly.

Lastly, one highlight of this stack is that as businesses use more APIs, more functions and accept more webhooks, they essentially have to deal with async functions at scale. So when this happens, there needs to be a central place to orchestrate these things since handcrafted retries are hard. Now we start to see workflow engines playing a central role in the serverless native world. And the way to understand them is that they are the orchestrator of async functions. Here's the intuition. If your app handles hundreds of user signups and then sends a bunch of welcome emails to the users, you can use tools like ingest to write a few lines of TypeScript code to define what functions should be triggered when a signup event happens. It will also retry this part of the logic automatically with exponential backoff if that process fails. And on the client side, if you want, you can use the authoring layer of the state machine called xState. I hook it up with the workflow engine. It's a super cool project, makes things much easier to reason about compared to Redux which I used to use all the time.

There is probably hours and days of things to talk about in a stack we see over and over again here in the serverless era. If you want to chat more, feel free to send me a DM on Twitter at staff Yoko Draws. And that's all I have today. Thank you.

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

Remix Conf Europe 2022Remix Conf Europe 2022
23 min
Scaling Up with Remix and Micro Frontends
Top Content
Do you have a large product built by many teams? Are you struggling to release often? Did your frontend turn into a massive unmaintainable monolith? If, like me, you’ve answered yes to any of those questions, this talk is for you! I’ll show you exactly how you can build a micro frontend architecture with Remix to solve those challenges.
Remix Conf Europe 2022Remix Conf Europe 2022
37 min
Full Stack Components
Top Content
Remix is a web framework that gives you the simple mental model of a Multi-Page App (MPA) but the power and capabilities of a Single-Page App (SPA). One of the big challenges of SPAs is network management resulting in a great deal of indirection and buggy code. This is especially noticeable in application state which Remix completely eliminates, but it's also an issue in individual components that communicate with a single-purpose backend endpoint (like a combobox search for example).
In this talk, Kent will demonstrate how Remix enables you to build complex UI components that are connected to a backend in the simplest and most powerful way you've ever seen. Leaving you time to chill with your family or whatever else you do for fun.
React Advanced Conference 2022React Advanced Conference 2022
29 min
Understanding React’s Fiber Architecture
Top Content
We've heard a lot about React's Fiber Architecture, but it feels like few of us understand it in depth (or have the time to). In this talk, Tejas will go over his best attempt at understanding Fiber (reviewed by other experts), and present it in an 'explain-like-I'm-five years old' way.
React Finland 2021React Finland 2021
36 min
The Eternal Sunshine of the Zero Build Pipeline
For many years, we have migrated all our devtools to Node.js for the sake of simplicity: a common language (JS/TS), a large ecosystem (NPM), and a powerful engine. In the meantime, we moved a lot of computation tasks to the client-side thanks to PWA and JavaScript Hegemony.
So we made Webapps for years, developing with awesome reactive frameworks and bundling a lot of dependencies. We progressively moved from our simplicity to complex apps toolchains. We've become the new Java-like ecosystem. It sucks.
It's 2021, we've got a lot of new technologies to sustain our Users eXperience. It's time to have a break and rethink our tools rather than going faster and faster in the same direction. It's time to redesign the Developer eXperience. It's time for a bundle-free dev environment. It's time to embrace a new frontend building philosophy, still with our lovely JavaScript.
Introducing Snowpack, Vite, Astro, and other Bare Modules tools concepts!
React Summit 2022React Summit 2022
17 min
Composition vs Configuration: How to Build Flexible, Resilient and Future-proof Components
Top Content
There are many ways of authoring components in React, and doing it right might not be that easy, especially when components get more complex. In this talk, you will learn how to build future-proof React components. We will cover two different approaches to building components - Composition and Configuration, to build the same component using both approaches and explore their advantages and disadvantages.
Remix Conf Europe 2022Remix Conf Europe 2022
23 min
Remix Architecture Patterns
Top Content
Remix provides amazing flexibility and can be deployed anywhere where JavaScript is running. But how does Remix fit into the bigger application landscape of an organization? Remix provides great utility, but how to best take advantage of it? What things should be handled inside of Remix, and what things are better off done elsewhere? Should we use the express adapter to add a WebSocket server or should that be a standalone microservice? How will enterprise organizations integrate Remix into their current stacks? Let’s talk architecture patterns! In this talk, I want to share my thoughts about how to best integrate Remix into a greater (enterprise) stack.

Workshops on related topic

DevOps.js Conf 2024DevOps.js Conf 2024
163 min
AI on Demand: Serverless AI
Featured WorkshopFree
In this workshop, we discuss the merits of serverless architecture and how it can be applied to the AI space. We'll explore options around building serverless RAG applications for a more lambda-esque approach to AI. Next, we'll get hands on and build a sample CRUD app that allows you to store information and query it using an LLM with Workers AI, Vectorize, D1, and Cloudflare Workers.
React Summit 2022React Summit 2022
50 min
High-performance Next.js
Workshop
Next.js is a compelling framework that makes many tasks effortless by providing many out-of-the-box solutions. But as soon as our app needs to scale, it is essential to maintain high performance without compromising maintenance and server costs. In this workshop, we will see how to analyze Next.js performances, resources usage, how to scale it, and how to make the right decisions while writing the application architecture.