原文地址: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. 基于Spring Cloud和Netflix OSS 构建微服务-Part 1

    前一篇文章<微服务操作模型>中,我们定义了微服务使用的操作模型.这篇文章中,我们将开始使用Spring Cloud和Netflix OSS实现这一模型,包含核心部分:服务发现(Servic ...

随机推荐

  1. Hibernate 系列 02 - Hibernate介绍及其环境搭建

    引导目录: Hibernate 系列教程 目录 昨晚喝多了,下午刚清醒,继续搞Hibernate.走起. 觉得还行的话,记得点赞哈,给我这个渣渣点学习的动力.有错误的话也请指出,省的我在错误上走了不归 ...

  2. BizTalk开发系列(二十二) 开发自定义Map Functoid

    尽管 BizTalk Server 提供许多Functoid以支持一系列不同的操作,但仍可能会遇到需要其他方法的情况.<BizTalk开发系列 Map扩展开发>介绍了通过使用自定义 XSL ...

  3. projecteuler Problem 8 Largest product in a series

    The four adjacent digits in the 1000-digit number that have the greatest product are 9 × 9 × 8 × 9 = ...

  4. iOS中__block 关键字的底层实现原理

    在 <iOS面试题集锦(附答案)> 中有这样一道题目: 在block内如何修改block外部变量?(38题)答案如下: 默认情况下,在block中访问的外部变量是复制过去的,即:写操作不对 ...

  5. 使用Retrofit2+RxJava2+ProtoBuf实现网络请求

    引言 Retrofit 是一个用于 Android 和 Java 平台的类型安全的,底层使用OkHttp实现网络请求框架.Retrofit 通过将 API 抽象成 Java 接口而让我们连接到 RES ...

  6. Educational Codeforces Round 50

    1036A - Function Height    20180907 \(ans=\left \lceil \frac{k}{n} \right \rceil\) #include<bits/ ...

  7. seleniuim面试题1

    seleniuim面试题1 乙醇 创建于 4 个月 之前 最后更新时间 2018-09-11 selenium中如何判断元素是否存在? selenium中没有提供原生的方法判断元素是否存在,一般我们可 ...

  8. Java如何计数替换字符串中第一次出现的子字符串?

    在Java编程中,如何拆分正则表达式和字符串? 以下示例演示如何使用Matcher类的replaceFirst()方法替换字符中指定的子字符串的首次出现. package com.yiibai; im ...

  9. HBase安装与应用

    1.  参考说明 参考文档: https://hbase.apache.org/book.html 2.  安装环境说明 2.1.  环境说明 CentOS7.4+ Hadoop2.7.5的伪分布式环 ...

  10. Oracle数据库常见版本

    Oracle数据库常见版本 在Oracle数据库的发展中,数据库一直处于不断升级状态,有以下几个版本: Oracle 8,Oracle 8i:Oracle 8i表示Oracle正式向Internet上 ...