DelusionalOptimist / pastebean

A pastebin clone implemented in microservices architecture style.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

pastebean 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

About

A pastebin clone implemented in microservices architecture style.

License:GNU General Public License v3.0


Languages

Language:Go 55.9%Language:HTML 17.6%Language:Makefile 17.4%Language:Dockerfile 7.4%Language:Shell 1.7%