原文地址: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. HttpURLConnection使用getInputStream无法执行

    url = new URL(urlStr); urlConn = (HttpURLConnection) url.openConnection(); // 设置请求方式为"GET" ...

  2. 解决web中的乱码

    统一使用utf-8进行编码数据库的编码格式也是utf-8 对于页面post传过来的不会出现乱码 对于页面get 传过来值解决乱码 方法一:在业务层:userName = new String(user ...

  3. Replication的犄角旮旯(六)-- 一个DDL引发的血案(上)(如何近似估算DDL操作进度)

    <Replication的犄角旮旯>系列导读 Replication的犄角旮旯(一)--变更订阅端表名的应用场景 Replication的犄角旮旯(二)--寻找订阅端丢失的记录 Repli ...

  4. 集合的扩展方法ForEach的使用

    List<, , , , }; list.ForEach(p => Console.WriteLine(p)); 或者 List<, , , , }; list.ForEach(p ...

  5. NoSQL学习二:MongoDB基本管理命令

    MongoDB命令学习  一.MongoDB命令帮助 在安装MongoDB后,启动服务器进程(mongod),可以通过在客户端命令mongo实现对MongoDB的管理和监控: 这是MongoDB最上层 ...

  6. 如何通过自定义注解实现AOP切点定义

    面向切面编程(Aspect Oriented Programming, AOP)是面向对象编程(Object Oriented Programming,OOP)的强大补充,通过横切面注入的方式引入其他 ...

  7. 作业三:PSP记录个人项目耗时情况

    PSP2.1        Personal Software Process Stages Time Planning  计划    20min              Estimate 估计开发 ...

  8. TDD(测试驱动开发)培训录

    2014年我一直从事在敏捷实践咨询项目,这也是我颇有收获的一年,特别是咨询项目的每一点改变,不管是代码质量的提高,还是自组织团队的建设,都能让我们感到欣慰.涉及人的问题都是复杂问题,改变人,改变一个组 ...

  9. [ZigBee] 14、Zigbee无线通信前奏——BasicRF 简单无线点对点传输协议

    本工程不带zigbee协议栈,作为过渡 实验现象: 一个EB2530(终端A)定义为发射模块,另一个EB2530(终端B)定义为接收模块. 按EB2530(终端A)上的按键,无线控制另一个EB2530 ...

  10. [专业名词·硬件] 2、DC\DC、LDO电源稳压基本常识(包含基本原理、高效率模块设计、常见问题、基于nRF51822电源管理模块分析等)·长文

    综述先看这里 第一节的1.1简单介绍了DC/DC是什么: 第二节是关于DC/DC的常见的疑问答疑,非常实用: 第三节是针对nRF51822这款芯片电源管理部分的DC/DC.LDO.1.8的详细分析,对 ...