Exploring the Evolution and Trends of Databases for Serverless and Edge Computing

As developers build applications with serverless and edge computing, there is a need for innovative tools to support this transformation. This article focuses particularly on databases that support this paradigm shift. The focus will be more on transactional workloads rather than analytical workloads, considering how massive the “backend” space is, including search, analytics, data science, and more.

The following are the criteria for this overview:

  • Services which pair exceptionally well with serverless and edge computing
  • Services that support JavaScript and TypeScript codebases

New Programming Models for Modern Applications

Traditional relational databases have been around for years, but serverless-first solutions require a new programming model. This new model should ideally leverage connectionless solutions, be web native and lightweight. Developers now prefer thin client libraries and an infrastructure that abstracts complexities like connection pooling or caching.

For a bonus, developers now favor databases or libraries which provide tooling to enable type-safe access to your data. Examples of such tools are Prisma, Kysely, Drizzle, Contentlayer, and Zapatos.

Solutions like Neon and Supabase have emerged to abstract connection management for databases like Postgres, providing developers with a simplified means to query and mutate data. The process involves using a client library that works with an HTTP API for Supabase or a special proxy for Neon.

While using WebSockets might introduce additional latency, they are faster for subsequent requests. Connection management, rather than going away, is now being handled by the vendor. Take PlanetScale for example, they can handle up to a million connections, effectively taking connection management worries off developers’ hands.

Emerging Trends for Database Companies

The evolving programming model has spurred the following key trends in the database industry:

  • Data Platforms – Databases are increasingly transitioning into data platforms to accommodate adjacent solutions like full-text search and analytics.
  • Decoupling of Storage and Compute – Inspired by companies like Snowflake, an increasing number of players in the industry like Neon, are decreasing the cost of a “database at rest” by decoupling storage and compute.
  • Infinite Scaling Solutions – Solutions like DynamoDB have made it possible to scale infinitely without the need to adjust memory, storage, CPU, clusters, and instances.
  • Global Data – The availability of specialized data APIs and user-specific data stores have made global data a reality.
  • Serverless Solutions – More databases are embracing serverless; however, what “serverless” means to various companies varies somewhat.

To help you better understand your options, I have categorized the solutions based on whether they are “established” or “rising”, whether they are serverless/serverful, as well as their level of maturity (i.e., whether they are generally available (GA) or pre-GA). Below are some examples:

Established

Firestore – a well-adopted document database with built-in support for authentication, real-time workloads, and cross-platform support for mobile.
MongoDB Atlas Serverless – has an entire data platform, including search / analytics / etc.

Rising

Convex – very useful for real-time workloads, but also has a simple, type-safe interface for querying/mutating data.
Grafbase – If you love GraphQL, Grafbase is worth exploring.
Neon – Provides Postgres with separation of storage and compute.

Other Solutions

  • Caching Engines: Stellate, Prisma Accelerate, ReadySet.
  • Cloud Provider Offerings: AWS Dynamo, Azure SQL, Azure CosmosDB, Google Cloud SQL, Google BigTable, and more.
  • Content Management (Headless CMS): These can still act as a database, just a different domain-specific solution. Sanity, Contentful, Sitecore, and more.

Feedback is very much welcome. Who have I missed? Of these services, which ones have you tried and liked?

Special Thanks

A special thanks to Guillermo Rauch, Paul Copplestone, Fredrik Björk, Anthony Shew, Craig Kerstiens, Jamie Turner, Nikita Shamgunov, Yoko Li, Pratyush Choudhury, Stas Kelvich, Enes Akar, and Steven Tey for reviewing this post.

Subscribe to Optimism (for the web) to learn more about tech and web development insights.

Tags: #Databases, #Serverless, #EdgeCompute, #ProgrammingModels

Reference Link