All Projects → dashersw → Cote Workshop

dashersw / Cote Workshop

Licence: mit
Microservices case study with cote.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Cote Workshop

Cote
A Node.js library for building zero-configuration microservices.
Stars: ✭ 2,180 (+886.43%)
Mutual labels:  microservices, zero-configuration
Meower
Social network for cats
Stars: ✭ 216 (-2.26%)
Mutual labels:  microservices
Nginx Link Function
It is a NGINX module that provides dynamic linking to your application in server context and call the function of your application in location directive
Stars: ✭ 197 (-10.86%)
Mutual labels:  microservices
Kubefwd
Bulk port forwarding Kubernetes services for local development.
Stars: ✭ 2,713 (+1127.6%)
Mutual labels:  microservices
Moleculer Web
🌍 Official API Gateway service for Moleculer framework
Stars: ✭ 198 (-10.41%)
Mutual labels:  microservices
Spring Cloud Vault
Configuration Integration with HashiCorp Vault
Stars: ✭ 210 (-4.98%)
Mutual labels:  microservices
Java Microservices Examples
Java Microservices: Spring Boot, Spring Cloud, JHipster, Spring Cloud Config, and Spring Cloud Gateway
Stars: ✭ 194 (-12.22%)
Mutual labels:  microservices
Jolie
The Jolie programming language
Stars: ✭ 203 (-8.14%)
Mutual labels:  microservices
Express Gateway
A microservices API Gateway built on top of Express.js
Stars: ✭ 2,583 (+1068.78%)
Mutual labels:  microservices
Prise
A .NET Plugin Framework.
Stars: ✭ 207 (-6.33%)
Mutual labels:  microservices
Pos
Sample Application DDD, Reactive Microservices, CQRS Event Sourcing Powered by DERMAYON LIBRARY
Stars: ✭ 207 (-6.33%)
Mutual labels:  microservices
Nameko Examples
Nameko microservices example
Stars: ✭ 203 (-8.14%)
Mutual labels:  microservices
Microservices On Cloud Kubernetes
Microservices demo application on cloud-hosted Kubernetes cluster
Stars: ✭ 213 (-3.62%)
Mutual labels:  microservices
Gramps Legacy
The core data source combination engine of GrAMPS.
Stars: ✭ 198 (-10.41%)
Mutual labels:  microservices
Goku Api Gateway
A Powerful HTTP API Gateway in pure golang!Goku API Gateway (中文名:悟空 API 网关)是一个基于 Golang开发的微服务网关,能够实现高性能 HTTP API 转发、服务编排、多租户管理、API 访问权限控制等目的,拥有强大的自定义插件系统可以自行扩展,并且提供友好的图形化配置界面,能够快速帮助企业进行 API 服务治理、提高 API 服务的稳定性和安全性。
Stars: ✭ 2,773 (+1154.75%)
Mutual labels:  microservices
Xian
reactive风格的微服务框架
Stars: ✭ 196 (-11.31%)
Mutual labels:  microservices
Flux
A simple CQRS Framework for go
Stars: ✭ 206 (-6.79%)
Mutual labels:  microservices
Hello Auth Grpc
two grpc microservices with mutual TLS and token authentication in Go
Stars: ✭ 208 (-5.88%)
Mutual labels:  microservices
Nodejs Microservice Starter
🌱 NodeJS RESTful API Microservice Starter
Stars: ✭ 220 (-0.45%)
Mutual labels:  microservices
Nstack
Type-safe, composable microservices for data analytics
Stars: ✭ 219 (-0.9%)
Mutual labels:  microservices

Microservices case study with cote.js

This project aims to show a microservices architecture built with cote.js, an auto-discovery mesh network framework for building fault-tolerant and scalable applications.

It's an example e-commerce application with a complete feature set from admin interface to end user interface, and 4 different microservices for dealing with payments, products, purchases and user management.

The admin interface is implemented on a REST server to demonstrate how cote.js would work within an existing express-based application. Product, user and purchase management is done via REST calls to the admin server, where they are then forwarded to respective microservices.

The client interface is implemented entirely in cote; the server only serves a single index.html. It's a breakthrough implementation, which basically means you can host your website statically (on for example, S3), and have all the benefits of a server and the microservices architecture.

Installation

Run the following commands:

git clone [email protected]:dashersw/cote-workshop.git
cd cote-workshop
npm install
node init-db.js

Getting the system up and running

There are four backend services, an admin interface and an end-user interface.

Quickstart

For the quickest start, have PM2 installed globally and then just type:

pm2 start cote-workshop.json

This will run all the 6 services you need, and you can monitor your services with pm2 monit or use any pm2 commands at your disposal.

Admin interface will be available in http://localhost:5000

End user interface will be available in http://localhost:5001

Monitoring will be available in http://localhost:5555

Navigate to the admin and (multiple) end user interfaces and add / delete / buy some products to see everything updating in real time!

Manual start

Run the admin interface:

node admin/server

Admin interface will be available in http://localhost:5000

Run the end user interface in a separate terminal window (or tab):

node end-user/server

End user interface will be available in http://localhost:5001

Now run the services in separate terminal windows (or tabs):

node services/payment-service
node services/product-service
node services/purchase-service
node services/user-service

Navigate to the admin and (multiple) end user interfaces and add / delete / buy some products to see everything updating in real time!

Monitoring

There's a built-in monitor service which lets you visualize the connections between microservices. The monitoring service is automatically started via pm2, or if you want to manually start it, run:

node monitor.js

It's a simple monitoring GUI, and will be available in http://localhost:5555

Running locally with host names

This repo includes a proxy service which binds on port 80 to host the application via certain host names.

The proxy supports these virtual hosts;

http://local-admin.cotejs.org for the admin interface and redirects requests to localhost:5000.

http://local-end-user.cotejs.org for the end user interface and redirects requests to localhost:5001.

http://local-monitoring.cotejs.org for the monitoring interface and redirects requests to localhost:5555.

Then you have to modify your /etc/hosts file to include 127.0.0.1 local-admin.cotejs.org local-end-user.cotejs.org local-monitoring.cotejs.org. Now when you visit either of these addresses in your browser, you will be redirected to the respective service.

Docker installation

This repository includes a full-featured docker-compose.yml to start all the necessary services including a PostgreSQL database via Docker.

Run the following to launch all services;

docker-compose up

This will build necessary local images and then launch a cluster of services. If you edit your /etc/hosts file to accomodate the given domain names, you can interact with the application via your browser.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].