Skip to main content

Vramework has gone serverless 🚀

· 2 min read

Just in time for Christmas!

I know, the day before Christmas isn’t exactly the best day for announcements, but I’m about to put away my keyboard until next year and wanted one final blog entry before taking a break. And I’m excited to share that Vramework now has official support for serverless on AWS and Cloudflare — complete with examples!

This milestone has been really interesting. Different serverless solutions definitely don’t think alike, especially when it comes to websockets. My main goal was to prove Vramework can handle websockets (along with HTTP and scheduled tasks, which were a breeze) and do it all in a way that you can get up and running as quickly as possible.

After a few days of headbanging, we ended up with three new backends in the workspace-starter repo, each offering a different serverless approach:


1. Serverless (AWS Lambda)​

This is the classic Serverless setup using a yaml file to deploy Lambda functions in AWS. If you want your scheduled tasks and HTTP APIs running in no time, this one’s a solid pick. Just grab the template, follow the instructions, and you’re good to go.

2. Serverless Websocket (AWS)​

This is also powered by Serverless but kept separate since websockets aren’t everyone’s cup of tea. For those who do need websockets, this example includes a PostgreSQL subscription and channel store. (Normally, AWS suggests DynamoDB, but since we're already on PostgreSQL, why not stick with it?) I’ll share more documentation on these stores in the next release.

3. Cloudflare Workers​

Last but definitely not least: Cloudflare Workers. This lets us deploy HTTP, scheduled tasks, and websocket connections via Cloudflare—a more cost-efficient solution than AWS in many cases. They offer something called a Websocket server with Hibernation, which cuts down on costs by suspending the server when there are no connections. Combine that with Durable Objects, and there’s no need for an external database like on AWS.

I’ve only tested this in Wrangler (the offline Cloudflare runner), so it’s still in beta. Depending on feedback, we can also create adapters for other websocket solutions Cloudflare provides.


Wrapping Up​

That’s it for now! There are some other improvements (and a few breaking changes) coming soon, but they can wait until next year.

Have a wonderful holiday season, and see you all in the new year!

Announcing Vramework 0.3

· 4 min read

I'm thrilled to announce Vramework version 0.3!

This update comes shortly after version 0.2 and focuses primarily on improving the developer experience. It introduces better API validation and reduces boilerplate, making it easier and more intuitive to build powerful APIs.

Announcing Vramework 0.2

· 4 min read

We are thrilled to announce the release of vramework 0.2!

For the past few years, vramework has been quietly powering bespoke projects as a submodule. With version 0.2, we're transforming it into a fully-fledged set of libraries designed to streamline your development experience.

Why I haven't used nestJS

· 10 min read

Before I begin, today is 20220222 as an ISO date. I had to blog something!

This article aims to explain why I went with writing Vramework instead of using nestJS. It's mostly for my sanity; since I just took a few months off of development and after returning wondered why I decided to create my own solution 😅.

Service Lookup

· 10 min read

So I got some great feedback on hackernews on a couple of things and wanted to write a bit more of an opinion piece.

Service Lookup

· 6 min read

Quick intro, Vramework is a thin wrapper ontop of express / serverless / any request-response mechanism that hides away all the boiler plate. The goal is for a user to be able to be able to add an endpoint, with schemas, permissions and session management without actually having to do any boiler plate.

Hello!

· 2 min read

Hello!​

Welcome to the vramework blog!

The goal is of the blog is for me to share as much as I can about some design decisions I have taken whilst working on some of my projects/ideas. Once those are open for testing I'll be providing a lot more examples!