bluesky-social / feed-generator

ATProto Feed Generator Starter Kit
MIT License
919 stars 329 forks source link

Serverless architecture + multi-tenancy #82

Open eric-burel opened 7 months ago

eric-burel commented 7 months ago

Hi, I've been playing around the generator and I must admit I haven't been that enthusiastic about technology in a while.

The architecture is simple to host on a traditional server, however it would be interesting to evaluate a serverless alternative:

I plan to investigate relying on Vercel architecture specifically, which I know as a Next.js dev and that seems to provides all the required primitives (KV database, serverless hosting, API for a multi-tenant system).

However the part that I don't fully grasp yet is the websocket that receives the hose. Is it doable to have a serverless consumer? Or maybe I need a "serverful" architecture just for this part? It's not doing intensive work so that could do as long as we move the database + the feed algorithm to serverless.

Some services seem to offer stateful serverless systems that could work with websockets: https://sunilpai.dev/posts/the-future-of-serverless/