Hi @dzonekl,
that sounds really interesting!
Actually I’m also in the middle of a prototype (frontend prosemirror prototype and in the progress of defining backend infrastructure).
My goal is to be able to run completely cloud native on AWS. I really like the Serverless-first approach.
So far I found the following possible solutions for the client connections:
One way would be to use the API Gateway (with Websockets) or there would be the AppSync service (with the subscription feature through websockets) (although at AppSync I have to figure out how to get yjs with GraphQL working).
For computing I also thought about lambdas. Although I really like the concept I’m not sure if they are the best fit, because of the same reasons you mentioned. Although, to know it for sure, I think I just have to try and test it…
For the store options I also thought about the leveldb driver. The level community offers different storage options. Here I could find packages for AWS S3 and DynamoDB.
But to really use them I do have to take a closer look to those community packages. Here I question myself if this is really the best approach to understand level and then those community integrations or if it makes more sense to create a custom yjs provider for dynamodb, s3 or another aws database offering (or perhaps use the y-mongodb provider and use an aws database that supports the mongodb api).
At the moment I fear the impact that Yjs always needs the complete document in the cache to be able to update it. This might lead to sacrifices in scaling or could be a dealbreaker for serverless.
The new introduced subdocuments feature might compensated a bit through the ability to split data and load it async.
Those are my thoughts & ideas so far. I’m really curious which approach your team will take and sharing your learnings would be much appreciated!
Oh, potentially interesting articles I found about when you really need the big league of real-time collaboration with websockets:
@dmonad You posted some time ago an open source service solution that stores websocket connections and calls backend services via HTTP. I forgot the name and can not find the link anymore. Do you still know the name of the product or have to GitHub link?