Serverless database server over HTTP websocket
services:
web:
build: .
environment:
DATABASE_SOCKET: ws://db:8080/database
db:
image: "marekm43/database"
By default, it uses port 8080
, this can be changed by setting up PORT
env. Dumps are stored at /app/database.txt
.
See websocket_test.go for more examples.
list user
select username
update username john
increment money 100
append orders pizza
It's a database server that is adapted to run as a low cost "stateless" web service in the cloud.
Most cloud providers allow you to run HTTP stateless service for free, but database servers, even cheapest ones, are at least a few $ per month.
- On startup, it downloads database files from cost-efficient storage, like S3
- Then it runs database engine on it
- When service is going to be redeployed files are send back to S3
For now it's GCP Cloud Run only, AWS and Azure are on the way.
Unfortunately not for now. However, it should be straightforward to implement a basic client.
No.