
Serverless at compile time
From HN:
I’m surprised none of the big 3 cloud providers have come out with a cloud native language where modules or even classes gets deployed as micro services that scales horizontally. Then you can have a mono repo that deploys to multiple micro services / cloud functions / lambdas as needed depending on code changes and programmers don’t have to worry about RPC or json when communicating between modules and can just call the damn function normally.
My take:
Module LoginSystem
export def post createUser(string username, string password):
code to create a user
export def post login(string username, string password):
return user login details
export def get info(uuid userId):
return user info
Module PostFeed
export def loadHome:
LoginSystem.login
Load user posts from database
Module X creates a microservice for X and exposes any exports as HTTP endpoints Compile time wraps each module in a container, swapping imports for api calls and updating serverless deployment code.
Pipeline: Source code -> Deployed on serverless
Serverless is very hard to test locally, this project would need to reduce the fustration to make it worthwhile:
- Ephemeral clusters but still pretty heavy?
- With well-tested compiler could compile as monolith, test as a monolith then deploy as microservices - a diaster waiting to happen?
- Need to have ability to categorise errors as TCP/IP related or actual broken code