原文地址: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. android简单登陆和注册功能实现+SQLite数据库学习

    最近初学android,做了实验室老师给的基本任务,就是简单的登陆和注册,并能通过SQLite实现登陆,SQlLite是嵌入在安卓设备中的 好了下面是主要代码: 数据库的建立: 这里我只是建立了一个用 ...

  2. 拾遗——java多线程

    由于sleep()方法是Thread类的方法,因此它不能改变对象的机锁.所以当在一个Synchronized方法中调用sleep()时,线程虽然休眠了,但是对象的机锁没有被释放,其他线程仍然无法访问这 ...

  3. hosts文件的一个小发现

    今天才发现原来同一个ip可以在hosts文件中配置多个域名.之间老是换一个网站就改一下,现在终于不用这么麻烦了 127.0.0.1 gg.pclady.com.cn 127.0.0.1 gg.pcon ...

  4. SQL入门经典(十) 之事务

    事务是什么?事务关键在与其原子性.原子性概念是指可以把一些事情当作一个执行单元来看待.从数据库角度看待.他是指应该全部执行或者全部不执行一条或多条语句的最小组合.当处理数据时候经常确保一件事发生另一件 ...

  5. 【原创】.NET之我见

    最近在准备面试,自己也顺带巩固了下基础,加上自己对码农的一些理解都写在这里了,水平不行,欢迎吐槽 //.NET基础 1.Class 和struct 区别 类是一种“引用类型”.创建类的对象时,对象赋值 ...

  6. nodejs安装/运行脚本

    本文主要介绍nodejs在windows下安装及运行脚本. 安装nodejs 先从nodejs官网:http://nodejs.org/下载对应的系统的安装包,比如用于64位系统的最新0.10.21的 ...

  7. [转]C#调用FFMPEG,并异步读取输出信息的代码

    http://www.cnblogs.com/Leo_wl/archive/2011/12/31/2308841.html

  8. objective-c(代码块)

    objective-c代码块(block)对写惯C语言的人非常熟悉,就类似一个函数指针,指向一个代码段的首地址: 给出简单例子如下: int main(int argc, const char * a ...

  9. Spring中Ordered接口简介

    目录 前言 Ordered接口介绍 Ordered接口在Spring中的使用 总结 前言 Spring中提供了一个Ordered接口.Ordered接口,顾名思义,就是用来排序的. Spring是一个 ...

  10. [.net 面向对象程序设计进阶] (5) Lamda表达式(一) 创建委托

    [.net 面向对象程序设计进阶] (5) Lamda表达式(一)  创建委托 本节导读: 通过学习Lambda表达式,学会创建委托和表达式目录树,深入了解Lambda的特性,让你的代码变的更加清晰. ...