Zephyrnet Logo

PlanetScale introduces serverless driver for JavaScript: Databases are moving to the edge

Date:

  • PlanetScale just released serverless driver for JavaScript to enhance database accessibility from serverless edge deployments.
  • It was created with the intention of creating a universally functional, simple-to-configure mechanism for edge services.
  • The actual driver for the new PlanetScale service makes advantage of the JavaScript Fetch API standard to support HTTP connections.

In order to improve database accessibility from serverless edge deployments, PlanetScale recently launched serverless driver for JavaScript.

Using serverless edge services, such as Cloudflare Workers, Vercel Edge Functions, and Netlify Edge Functions, is an emerging deployment paradigm for apps. These services, which let businesses execute applications at the edge of a network, are mostly built on JavaScript.

Table of Contents

PlanetScale serverless driver can undertake intense workloads

The database layer has been a problem for the edge services up to this point, which is where the PlanetScale serverless driver, which was published on August 18, comes into play. With the help of the driver, the PlanetScale database gains a new layer that supports JavaScript queries and can be integrated with edge deployment platforms.

A growing portion of PlanetScale’s focus is on developer-driven database deployment, where it competes with FaunaDB, a provider of serverless databases that can also be accessed via JavaScript.

Online sports and pop culture news provider Barstool Sports is one of the customers of the PlanetScale database looking to use the serverless driver.

Planetscale Introduces Serverless Driver For Javascript
You have the option of employing Cloudflare Workers, Vercel Edge Functions, or Netlify Edge Functions to extract the F1 data from a PlanetScale database

According to Andrew Barba, head of engineering at Barstool Sports, the company faced scaling and performance issues while using Amazon Aurora to operate its MySQL database workloads.

Like PlanetScale, Amazon Aurora is designed to work with MySQL. After the database provider introduced its fully managed database-as-a-service (DBaaS) product in 2021, Barstool switched to PlanetScale.


Qudit computers open endless possibilities by exceeding the binary system


For Barstool, the new PlanetScale serverless driver is a particularly noteworthy advancement. Organizations are increasingly moving to compute to the edge, or as near to users as feasible, in recent years. As Barstool develops and optimizes its processes, Barba explained that Barstool has been anticipating the PlanetScale serverless driver for JavaScript.

“Similar to how compute is moving the edge, it’s time for databases to move to the edge as well,” stated Barba.

JavaScript API

A developer would have access to a complete set of APIs with a standard application stack that runs on a server, allowing connections to any database.

The runtimes used by serverless edge services, JavaScript and WebAssembly, do not have the same level of access as those used by conventional application stacks. According to Nick Van Wiggeren, vice president of engineering at PlanetScale, the serverless edge environments have given up complete API access in exchange for speed and security.

Planetscale Introduces Serverless Driver For Javascript
The runtimes used by serverless edge services, JavaScript and WebAssembly, do not have the same level of access as those used by conventional application stacks

Van Wiggeren stated that users have had to utilize relatively complex workarounds to connect to various types of databases using edge services, such as Cloudflare Workers. The goal of PlanetScale was to develop an easy-to-configure mechanism for edge services that will operate with any edge service.


Analog deep learning paves the way for energy-efficient and faster computing


The most challenging aspect of developing the serverless driver for PlanetScale was figuring out how to expose every feature of the database through an API that connects via HTTP. It was a process that took PlanetScale around six months to complete as it developed the platform architecture and database capabilities.

Planetscale Introduces Serverless Driver For Javascript
The hardest part for PlanetScale was figuring out how to expose every feature of the database through an API that connects via HTTP

“We started out and realized what we actually needed is a new load balancer, a new front door into the database that can serve queries over HTTP. We weren’t willing to compromise on security or functionality, so we actually built and architected from the ground up, our very own HTTP load balancer for MySQL databases,” explained Van Wiggeren.

How does PlanetScale serverless driver work with JavaScript?

JavaScript is the other essential component of allowing serverless edge capabilities; the new load balancer for handling HTTP database requests is simply one component.

The JavaScript Fetch API standard is used by the actual driver for the new PlanetScale service to support HTTP connections. Van Wiggeren stated that the PlanetScale serverless driver is just a wrapper around the Fetch API that handles all database query components, using Fetch to connect to the database through HTTP. PlanetScale uses Fetch because it is cross-platform.

Planetscale Introduces Serverless Driver For Javascript
There are still certain areas in terms of API connectivity that PlanetScale may try to solve in the future

“The reason we’re so specific about Fetch is because that’s what’s cross-platform — whether you’re using JavaScript in the browser, whether you’re using JavaScript on the Cloudflare Worker or a Vercel Edge function, Fetch is the standard for how you make that request,” he said.


P-computers are the future for developing efficient AI and ML systems


There are still certain areas in terms of API connectivity that PlanetScale may try to solve in the future. GraphQL, another API strategy for linking and querying data, might be one of these areas.

GraphQL is “an area that we’re really interested in. It’s definitely an attractive and, I think, very interesting way that people are leveraging their databases,” according to Van Wiggeren.

spot_img

Latest Intelligence

spot_img

Chat with us

Hi there! How can I help you?