GithubHelp home page GithubHelp logo

imhuzi / spring-cloud-microservice-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from geoand/spring-cloud-microservice-example

0.0 2.0 0.0 3.15 MB

An example project that demonstrates an end-to-end cloud native application using Spring Cloud for building a practical microservices architecture.

Home Page: http://www.kennybastani.com/2015/07/spring-cloud-docker-microservices.html

License: Apache License 2.0

Java 100.00%

spring-cloud-microservice-example's Introduction

Spring Cloud Example Project

An example project that demonstrates an end-to-end cloud-native platform using Spring Cloud for building a practical microservices architecture.

Tutorial available here: Building Microservices with Spring Cloud and Docker

Demonstrated concepts:

  • Integration testing using Docker
  • Polyglot persistence
  • Microservice architecture
  • Service discovery
  • API gateway

Docker

Each service is built and deployed using Docker. End-to-end integration testing can be done on a developer's machine using Docker compose.

Polyglot Persistence

One of the core concepts of this example project is how polyglot persistence can be approached in practice. Microservices in the project use their own database, while integrating with the data from other services through REST or a message bus.

  • Neo4j (graph)
  • MongoDB (document)
  • MySQL (relational)

Movie Recommendations

This example project focuses on movies and recommendations.

Data Services

http://i.imgur.com/NXLHvjR.png

Domain Data

http://i.imgur.com/VlwSw2q.png

Microservice architecture

This example project demonstrates how to build a new application using microservices, as opposed to a monolith-first strategy. Since each microservice in the project is a module of a single parent project, developers have the advantage of being able to run and develop with each microservice running on their local machine. Adding a new microservice is easy, as the discovery microservice will automatically discover new services running on the cluster.

Service discovery

This project contains two discovery services, one on Netflix Eureka, and the other uses Consul from Hashicorp. Having multiple discovery services provides the opportunity to use one (Consul) as a DNS provider for the cluster, and the other (Eureka) as a proxy-based API gateway.

API gateway

Each microservice will coordinate with Eureka to retrieve API routes for the entire cluster. Using this strategy each microservice in a cluster can be load balanced and exposed through one API gateway. Each service will automatically discover and route API requests to the service that owns the route. This proxying technique is equally helpful when developing user interfaces, as the full API of the platform is available through its own host as a proxy.

License

This project is licensed under Apache License 2.0.

spring-cloud-microservice-example's People

Contributors

kbastani avatar oterrien avatar derekhe avatar

Watchers

Huzi.Wang avatar James Cloos 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.