Skip to content

This repository shows a simple example of an offer generation system. This is implemented using both RESTful and Eventing styles of microservice architecture.

Notifications You must be signed in to change notification settings

braidenjudd/microservices-by-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Microservices by Example

This repository shows a simple example of an offer generation system. This is implemented using both RESTful and Eventing styles of microservice architecture.

The Brief

As a consumer I want to receive the best flight offers between Melbourne and Brisbane available to me. These offers should be personalised depending on my preferences. I can enter the following preferences

  • Collect name and email - for marketing spam
  • Level of Service (Full/Budget)
  • If they are frequent flier
  • Time of day

The Implementations

Eventing

Alt text

Restful

Alt text

Running the app

Requirements

Get all the dependencies

  • cd ./frontend && bower install
  • cd .. && cd ./backend/event && npm install
  • cd ../.. && ./backend/restful && npm install

Make sure docker is up and running

  • boot2docker start
  • export DOCKER_HOST=tcp://192.168.59.103:2376
  • export DOCKER_CERT_PATH=/Users/braiden.judd/.boot2docker/certs/boot2docker-vm
  • export DOCKER_TLS_VERIFY=1

Run Rabbit MQ

  • docker run -d -p 5672:5672 -p 15672:15672 -v :/data/log -v :/data/mnesia dockerfile/rabbitmq

Start the two backends (you may have to chmod 700 the scripts)

  • ./backend/event/startEvent.sh
  • ./backend/event/startEvent.sh

Host the frontend folder (you need to run a bower install first)

  • cd ./frontend && python -m "SimpleHTTPServer"

NOTE: You might need to change the IP in the services for event to your boot2docker ip. Use the command boot2docker ip to find your IP.

About

This repository shows a simple example of an offer generation system. This is implemented using both RESTful and Eventing styles of microservice architecture.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published