pastebean
Implementing a pastebin clone as a microservice architecture.
Written using go-gin and gorm alongwith many other awesome open source Go libaries. Served using envoy proxy. Containerized and orchestrated using docker and docker-compose.
Try it out
Run using:
docker-compose -f docker-compose.yaml up
Create a paste:
curl -XPOST localhost:8000/create --data-raw '{"name": "paste1", "body": "This is a big paste body."}'
Retrieve the above created paste using the returned uuid:
curl localhost:8000/<16-digit-uuid>
Services
- Create: A service that creates paste.
- Read: A service that reads created paste.
Architecture
Development
-
Requirements:
- make
- go 1.17
- docker
- docker-compose
-
Build and run on your host and be ready for being haunted by cloud native evangelists:
make pastebean-dirty
-
Build and run it in containers using docker compose:
make pastebean-dc-dev
TODO
- Blog/tutorial series
- Polygot services using different protocols
- Users and authorization and authentication
- Dyanmic Envoy configuration and service discovery
- More container orchestrators
- Service mesh