原文地址: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. jinja模版

    实现不同机器的差异化配置                 把apache监听的端口统一改为8080     把配置文件files/httpd.conf 文件做成模版         修改lamp.sl ...

  2. Android View事件传递机制

    ViewGroup dispatchTouchEvent onInterceptTouchEvent onTouch View dispatchTouchEvent onTouch 假设View的层级 ...

  3. 九度OJ 1512 用两个栈实现队列 【数据结构】

    题目地址:http://ac.jobdu.com/problem.php?pid=1512 题目描述: 用两个栈来实现一个队列,完成队列的Push和Pop操作. 队列中的元素为int类型. 输入: 每 ...

  4. ASP.NET Web API中的Routing(路由)

    [译]Routing in ASP.NET Web API 单击此处查看原文 本文阐述了ASP.NET Web API是如何将HTTP requests路由到controllers的. 如果你对ASP ...

  5. lzo压缩格式文件查看

    使用lzop命令解压并查看 :lzop -cd xxx.lzo |more 附压缩命令:lzop xxx.log (生成xxx.log.lzo) 其它参数: # lzop -v test # 创建te ...

  6. JavaScript对象创建的几种方式

    1 工厂模式 1.1 创建 function createFruit(name,colors) { var o = new Object(); o.name = name; o.colors = co ...

  7. 使用cURL尝试ElasticSearch

    测试环境:debian 9官网提供了 deb,rpm,源码下载 官方下载地址:https://www.elastic.co/downloads/elasticsearch 通过源码安装会遇到一些小问题 ...

  8. 微信跳转之WAP跳转微信公众号关注页面链接weixin://dl/business/?ticket=

    本文整理了部分微信 URL Schemes,经过本人测试,所有url在微信 6.3.22 版本下都可正常工作.大家可以在 Safari 中打开链接进行尝试.(部分链接仅允许在微信内部浏览器中打开,已用 ...

  9. 第一条:了解Objective-C语言的起源

    第一条:了解Objective-C语言的起源 Objective-C使用的消息结构而非函数调用. Objective-C的重要工作都由"运行组件(runtime component)&quo ...

  10. python pip常用命令

    pip安装命令: pip install packagename pip显示模块版本号: pip show packagename pip卸载模块: pip uninstall packagename ...