Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
September 9, 2021 03:35 pm GMT

HarperDB is Collapsing the Stack: Introducing Custom Functions

Introducing the newest innovation from HarperDB: HarperDB Custom Functions. With the release of HarperDB 3.1 users are able to define their own API endpoints within HarperDB. What does that mean for you? HarperDB grows from a distributed database to a distributed application development platform with integrated persistence - one that can serve as a single solution for all of your backend needs. Were collapsing the stack!

Alright, alright, whats the big deal? Up until 3.1, in order to power an application you would need to deploy and host your backend API code on additional servers, then have them call out to HarperDB for database needs. This is a pretty typical software stack, but at HarperDB, were far from typical. Were constantly innovating and changing the game. Custom Functions enable developers to build their entire application backend in one place. Oh yeah, and its faster, significantly faster! Traditional architectures naturally introduce latency as data moves across multiple servers through a local network or potentially even the Internet. HarperDB is collapsing the stack onto a single server, which eliminates any and all network latency. This frees up headroom for achieving higher throughput from a single server. Capitalizing on HarperDBs already powerful horizontal scalability, this means you can now distribute both your APIs and your database to the edge.

For those familiar with modern cloud architectures, Custom Functions are just like AWS Lambda functions. For those familiar with relational databases, theyre like Stored Procedures. You define your logic and choose when to execute it. At a high level its as simple as that! Theyre low maintenance and easy to develop. You can develop HarperDB Custom Functions in the Studio or in your own IDE and Version Management System. HarperDB Custom Functions can be maintained like any other development project, in fact, the sample Custom Functions provided in the Studio are generated from our public GitHub repository. That means you can develop, maintain, and deploy your HarperDB Custom Functions code just like any other development project, so you dont have to deviate from your existing development practices. Thats great news!

HarperDB Studio Functions EditorHarperDB Studio Functions Editor

What makes Custom Functions so powerful? They leverage the full power of Node.js and Fastify. HarperDB Custom Functions projects are effectively just Node.js projects, which means you can leverage the npm ecosystem, opening the doors to fast and efficient development. Fastify serves as the basis for the webserver, which means you can define and build a fully functional REST API with all the bells and whistles youd expect. The key differentiator is that these Fastify routes have direct access to HarperDB core methods, bypassing the HarperDB API, and instead interacting directly with HarperDB on the same machine.

WebStorm IDE with HarperDB Functions ProjectWebStorm IDE with HarperDB Functions Project

By collapsing the stack, we deliver unparalleled performance and efficiency out of the box. Lets take a look at some different ways Custom Functions can be used. Im not going to cover everything here, in fact, Im sure there are plenty of options that I havent even thought of.

  • Integrate with third-party apps and APIs: Seamlessly connect third-party/external data with data stored in HarperDB within a single function.
  • Utilize third-party authentication: Tightly integrate with third-party application providers to validate user requests within your API.
  • Define your own database functionality: HarperDB is always adding features, but lets say theres a feature you need thats missing. Build a HarperDB Custom Function to solve the problem. For example, if you need to enforce row-level security based on a user account, write a function!
  • Serve a website: Custom Functions can serve static content and serve as backend APIs, which means you can fully power a website or web app all with HarperDB.

These are just some of the ideas were kicking around with HarperDB Custom Functions. Well be hosting a livestream event next week (September 14th at 6pm MT) where you can watch a live product tour! We look forward to hearing what the HarperDB community can build. Please share any ideas you have in the comments, Im eager to hear what the community has to say!

Since this will be the initial release of HarperDB Custom Functions, please let us know what else youd like to see in future releases. You can submit your ideas to our feedback board here: feedback.harperdb.io.


Original Link: https://dev.to/jacob_b_cohen/harperdb-is-collapsing-the-stack-introducing-custom-functions-3j4k

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To