原文地址:https://www.linkedin.com/pulse/microservices-reference-architecture-spring-boot-cloud-anil-allewar

What is "Microservices"?

Microservices is the "new kid" on the block; a new paradigm that seeks to replace monolithic enterprise applications with a suite of small services that use lightweight mechanism like REST to communicate with each other. These services are built around business capabilities and independently deployable by fully automated deployment machinery.

The crux of microservices can be epitomized by this illustration as defined byMartin Fowler.

Frameworks

There are couple of frameworks available in different software ecosystems that make it easy to create distributed applications using microservices architecture.

  1. Java - Spring Cloud using Netflix OSS
  2. Node.js - Seneca

The reference architecture developed by us builds on the Spring Cloud ecosystem.

There are number of components available within the Spring Cloud and Netflix OSS ecosystem that solve common problems for distributed applications (e.g. configuration management, service discovery, circuit breakers, intelligent routing etc).

Target Architecture and Components

The application consists of 8 different services that are available in Synerzip GitHub repository.

  1. config-server - setup external configuration
  2. webservice-registry - Eureka server
  3. auth-server - OAuth2 authorization server
  4. user-webservice - User microservice
  5. task-webservice - Task microservice
  6. comments-webservice - Comments for task microservice
  7. api-gateway - API gateway that proxies all the microservices
  8. web-portal - Single Page Application that provides the UI

All the different services lend themselves to the following target architecture.

While there are existing samples available for using the different Spring cloud/Netflix OSS components, we did not find anything that merged all of them together to provide an enterprise architecture. Additionally the documentation is sporadic and widely distributed so it becomes hard to understand how the components interact with each other.

This reference architecture can be used as a starting point to understand the Microservices paradigm and then expand to scale to your architecture needs.

Considerations for building production-ready systems

The thought process for the reference architecture revolved around 2 concepts

  1. Making it easy enough so that beginners can understand
  2. Making it complete enough so that it can serve as the starting point of enterprise applications.

When you are ready to build your application with this reference architecture, keep the following things in mind

  1. The application uses an endpoint to check if the user is authenticated; this leads to a very chatty application. When building your system instead use the Json Web Token (JWT) wherein the token itself contains enough information for the resource server to do simple user authentication.
  2. The Single Page Application that provides the UI is part of the reference architecture, whereas applications might be better off having the SPA as separate application that just needs to interact with your distributed system and not be part of the distributed system.
  3. There are additional Netflix OSS components like Turbine, Feign and SideCar that might be applicable to your architecture.

Codebase

  1. https://github.com/Synerzip/spring-boot-microservices
  2. https://github.com/anilallewar/sample-config

Microservices Reference Architecture - with Spring Boot, Spring Cloud and Netflix OSS--转的更多相关文章

  1. Building microservices with Spring Cloud and Netflix OSS, part 2

    In Part 1 we used core components in Spring Cloud and Netflix OSS, i.e. Eureka, Ribbon and Zuul, to ...

  2. 使用Spring Boot,Spring Cloud和Docker实现微服务架构

    https://github.com/sqshq/PiggyMetrics     Microservice Architecture with Spring Boot, Spring Cloud a ...

  3. spring Boot+spring Cloud实现微服务详细教程第二篇

    上一篇文章已经说明了一下,关于spring boot创建maven项目的简单步骤,相信很多熟悉Maven+Eclipse作为开发常用工具的朋友们都一目了然,这篇文章主要讲解一下,构建spring bo ...

  4. spring Boot+spring Cloud实现微服务详细教程第一篇

    前些天项目组的大佬跟我聊,说项目组想从之前的架构上剥离出来公用的模块做微服务的开发,恰好去年的5/6月份在上家公司学习了国内开源的dubbo+zookeeper实现的微服务的架构.自己平时对微服务的设 ...

  5. Cola Cloud 基于 Spring Boot, Spring Cloud 构建微服务架构企业级开发平台

    Cola Cloud 基于 Spring Boot, Spring Cloud 构建微服务架构企业级开发平台: https://gitee.com/leecho/cola-cloud

  6. spring boot、cloud v2.1.0.RELEASE 使用及技术整理

    2018年10月30日 springboot v2.1.0.RELEASE 发布: https://github.com/spring-projects/spring-boot/releases/ta ...

  7. Spring Boot/Spring Cloud、ESB、Dubbo

    如何使用Spring Boot/Spring Cloud 实现微服务应用spring Cloud是一个基于Spring Boot实现的云应用开发工具,它为基于JVM的云应用开发中的配置管理.服务发现. ...

  8. 新书上线:《Spring Boot+Spring Cloud+Vue+Element项目实战:手把手教你开发权限管理系统》,欢迎大家买回去垫椅子垫桌脚

    新书上线 大家好,笔者的新书<Spring Boot+Spring Cloud+Vue+Element项目实战:手把手教你开发权限管理系统>已上线,此书内容充实.材质优良,乃家中必备垫桌脚 ...

  9. Java面试题(Spring Boot/Spring Cloud篇)

    Spring Boot/Spring Cloud 104.什么是 spring boot? SpringBoot是一个框架,一种全新的编程规范,他的产生简化了框架的使用,所谓简化是指简化了Spring ...

随机推荐

  1. [XAF] How to set List View Columns Title Customization align center?

    https://www.devexpress.com/Support/Center/Question/Details/T423138

  2. CardView

    CardView继承至FrameLayout类,可以在一个卡片布局中一致性的显示内容,卡片可以包含圆角和阴影.CardView是一个Layout,可以布局其他View. CardView常用属性: c ...

  3. 安装 webpack

    安装 webpack看好webpack 对自动压缩和文件名自动md5更名,可解决客户端缓存问题.我的安装环境为 centos linux,root用户 1.安装Node及NPM.到NodeJS官网安装 ...

  4. unity初始篇 选择游戏对象

    之前两任社长都在一直强调要写博客,一直没有写过,现在我已经踏上了博客的道路! 首先声明:本人才疏学浅,对unity认识不深,有错误的地方欢迎大家指出,在此谢过! 本文所说的选择对象,是指在游戏过程中动 ...

  5. Java IO3:字节流

    流类 Java的流式输入/输出是建立在四个抽象类的基础上的:InputStream.OutputStream.Reader.Writer.它们用来创建具体的流式子类.尽管程序通过具体子类执行输入/输出 ...

  6. 讲讲HashCode的作用

    前言 Object提供给我们了一个Native的方法“public native int hashCode();”,本文讲讲Hash是什么以及HashCode的作用 Hash 先用一张图看下什么是Ha ...

  7. Javascript定时器学习笔记

    掌握定时器工作原理必知:JavaScript引擎是单线程运行的,浏览器无论在什么时候都只且只有一个线程在运行JavaScript程序. 常言道:setTimeout和setInterval是伪线程. ...

  8. 使用Struts 拦截namespace进行权限控制

    有时候我需要在几个包下都需要进行同一个权限控制.如在购物网站中,我们需要进入个人中心.下订单.评价商品等等都需要进行登录权限控制,但是这几个模块并不是位于同一个package下.Struts提供的拦截 ...

  9. 手把手搭建WAMP+PHP+SVN开发环境

    一:WAMP 这款软件在安装的过程中就已经把Apache.MySQL.PHP继承好了,而且也做好了相应的配置,除此之外,还加上了SQLitemanager和Phpmyadmin,省去了很多复杂的配置过 ...

  10. 趣味C程序-HelloWord

    说明:刚才写了一个基础的helloWord程序(很早以前从其他地方收集的.),本以为群里面的人是可以答对了,但是我错了,没有人.他们的错误往往被程序的外表给蒙蔽了. 很多人的回答是0.如果你仔细看的话 ...