Microservices using Go, RabbitMQ, Docker, WebSocket, PostgreSQL, React

Microservices

A basic example of microservice architecture which demonstrates communication between a few loosely coupled services.

  • Written in Go
  • Uses RabbitMQ to communicate between services
  • Uses WebSocket to talk to the front end
  • Stores data in PostgreSQL
  • Uses React for front end development
  • Builds and runs with Docker

Usage

To run the example, clone the Github repository and start the services using Docker Compose. Once Docker finishes downloading and building images, the front end is accessible by visiting localhost:8080.

git clone https://github.com/ebosas/microservices
cd microservices
docker-compose up

Back end

To access the back end service, attach to its docker container from a separate terminal window. Messages from the front end will show up here. Also, standart input will be sent to the front end for two way communication.

docker attach microservices_backend

Database

To inspect the database, launch a new container that will connect to our Postgres database. Then enter the password demopsw (see the .env file).

docker run -it --rm \
    --network microservices_network \
    postgres:13-alpine \
    psql -h postgres -U postgres -d microservices

Select everything from the messages table:

select * from messages;

RabbitMQ

Access the RabbitMQ management interface by visiting localhost:15672 with guest as both username and password.

Development environment

For development, run the RabbitMQ and Postgres containers with Docker Compose.

docker-compose -f docker-compose-dev.yml up

Generate static web assets for the server service by going to web/react and web/bootstrap and running:

npm run build-server

React

For React development, run npm run serve in web/react and change the script tag in the server's template to the following:

<script src="http://127.0.0.1:8000/index.js"></script>
Similar Resources

Sample cloud-native application with 10 microservices showcasing Kubernetes, Istio, gRPC and OpenCensus.

Sample cloud-native application with 10 microservices showcasing Kubernetes, Istio, gRPC and OpenCensus.

Online Boutique is a cloud-native microservices demo application. Online Boutique consists of a 10-tier microservices application. The application is

Dec 31, 2022

TinyHat.Me: Microservices deployed with Kubernetes that enable users to propose hat pictures and try on hats from a user-curated database.

TinyHat.Me: Microservices deployed with Kubernetes that enable users to propose hat pictures and try on hats from a user-curated database.

Click here to see the "buggy" version 🐛 The Scenario TinyHat.Me is an up and coming startup that provides an API to allow users to try on tiny hats v

Jun 17, 2022

Box is an incrementally adoptable tool for building scalable, cloud native, microservices.

Box is a tool for building scalable microservices from predefined templates. Box is currently in Beta so if you find any issues or have some ideas

Feb 3, 2022

Best microservices framework in Go, like alibaba Dubbo, but with more features, Scale easily.

Best microservices framework in Go, like alibaba Dubbo, but with more features, Scale easily.

Best microservices framework in Go, like alibaba Dubbo, but with more features, Scale easily.

Dec 30, 2022

Access to b2c microservices through this service

Access to b2c microservices through this service

API service Access to b2c microservices through this service Config file Create config file with services addresses. Services: vdc - get camera inform

Nov 8, 2021

Goya circuit is a circuit breaker mechanism implementation in microservices.

Goya-Circuit: 类似于Hystrix的熔断器实现 Goya circuit is a circuit breaker mechanism implementation in microservices. It can prevent the whole link avalanche ca

Mar 8, 2022

Example golang microservices deployed on kubernetes.

Example golang microservices deployed on kubernetes.

Tech Stack Golang RabbitMQ Docker K8S MongoDB Services There are two services which communicate via http(sync) and rabbitmq(async). Services opened to

Sep 6, 2022

A microservices-demo service that provides catalogue/product information.

A microservices-demo service that provides catalogue/product information. This service is built, tested and released by travis.

Nov 22, 2021

A microservices-demo service that provides catalogue/product information.

A microservices-demo service that provides catalogue/product information. This service is built, tested and released by travis.

Nov 28, 2021
Go-kit-microservices - Example microservices implemented with Go Kit

Go Kit Microservices Example microservices implemented with go kit, a programmin

Jan 18, 2022
Elastic Stack Docker + Sample Go AppElastic Stack Docker + Sample Go App
Elastic Stack Docker + Sample Go AppElastic Stack Docker + Sample Go App

?? Elastic Stack Docker + Sample Go App Test Elastic Stack which includes Elasticsearch, Kibana, Filebeat and Metricbeat. It comes with a very simple

Jan 14, 2022
Go gRPC RabbitMQ email microservice

Go, RabbitMQ and gRPC Clean Architecture microservice ?? ??‍?? Full list what has been used: GRPC - gRPC RabbitMQ - RabbitMQ sqlx - Extensions to data

Dec 29, 2022
Go microservices with REST, and gRPC using BFF pattern.
Go microservices with REST, and gRPC using BFF pattern.

Go microservices with REST, and gRPC using BFF pattern. This repository contains backend services. Everything is dockerized and ready to

Jan 4, 2023
This is an example to demonstrate implementation golang microservices using domain driven design principles and sugestions from go-kit

go-kit DDD Domain Driven Design is prevelent and rising standard for organizing your microservice code. This design architecture emphasis on Code orga

Feb 9, 2022
This is demo / sample / example project using microservices architecture for Online Food Delivery App.

Microservices This is demo / sample / example project using microservices architecture for Online Food Delivery App. Architecture Services menu-servic

Nov 21, 2022
A standard library for microservices.

Go kit Go kit is a programming toolkit for building microservices (or elegant monoliths) in Go. We solve common problems in distributed systems and ap

Jan 1, 2023
Zeebe.io - Workflow Engine for Microservices Orchestration

Distributed Workflow Engine for Microservices Orchestration

Jan 2, 2023
Design-based APIs and microservices in Go
Design-based APIs and microservices in Go

Goa is a framework for building micro-services and APIs in Go using a unique design-first approach. Overview Goa takes a different approach to buildin

Jan 5, 2023
goTempM is a full stack Golang microservices sample application built on top of the Micro platform.
goTempM is a full stack Golang microservices sample application built on top of the Micro platform.

goTempM is a full stack Golang microservices sample application built on top of the Micro platform.

Sep 24, 2022