Giter Site home page Giter Site logo

thabach / microservice-atom Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ewolff/microservice-atom

0.0 1.0 0.0 45 KB

Demo to show how Atom can be used for communication between microservices

License: Apache License 2.0

Java 79.62% HTML 20.38%

microservice-atom's Introduction

Microservice Atom Sample

This is a sample to show how the Atom protocol can be used for the communication between microservices. Atom is originally designed to let users subscribe to feeds like blogs. Any new blog post is published in the feed. However, this approach can be used for data such as order information, too.

The project creates Docker containers.

It uses three microservices:

  • Order to create orders. This services exposes an Atom feed with all orders.
  • Shipment polls the feed every thirty seconds and extract the information needed to ship the items.
  • Invoicing polls the feed, too. It extracts all information to send out an invoice.

Technologies

  • Spring Boot
  • Rome to produce and parse Atom feeds.
  • Docker Compose to link the containers.

How To Run

The demo can be run with Docker Machine and Docker Compose.

Once you create an order in the order application, after a while the invoice and the shipment should be shown in the other applications.

Remarks on the Code

The microservices are:

  • microservice-atom-order to create the orders
  • microserivce-demo-shipping for the shipping
  • microservice-demo-invoicing for the invoices

The microservices have an Java main application in src/test/java to run them stand alone. microservice-demo-shipping and microservice-demo-invoicing both use a stub for the other order service.

The data of an order is copied - including the data of the customer and the items. So if a customer or item changes in the order system this does not influence existing shipments and invoices. It would be odd if a change to a price would also change existing invoices. Also only the information needed for the shipment and the invoice are copied over to the other systems.

microservice-atom's People

Contributors

vondeetzen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.