65
سومین همایش ملیشرفتهای پیعماری م سازمانینشگاه دا صنعتی شریف مهجوریان امیررویس گ سازمانی سعماری آزمایشگاه مرفنی مدی راستم پویاز سیان کاریش بنییر شرکت دان مدرویس مایکروسعماری مMicroservices Architecture 22 آبانماه1398

سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

ملیهمایشسومین

سازمانیمعماریپیشرفتهای

شریفصنعتیدانشگاه

امیر مهجوریانرا مدیرفنی آزمایشگاه معماری سازمانی سرویس گ

مدیر شرکت دانش بنیان کاریز سیستم پویا

معماری مایکروسرویس

Microservices Architecture

1398آبانماه 22

Page 2: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

سرفصل مطالب

مایکروسرویسمعماری مفاهیم، تعاریف و اصول

تکنیک ها، فناوری ها و متدها

مقایسهMSA باSOA وWeb-Service

گراسرویسمعماری سازمانی ومایکروسرویس مایکروسرویس ها ای از تحلیل و طراحی نمونه

روند بازار مایکروسرویس

فایده-هزینهجمع بندی و تحلیل

Page 3: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

Definition, principle and Concept

Page 4: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

تاریخچه معماری مایکروسرویس4

افزارنرممعماریکارگاهیکدرو2011سالبه"هامایکروسرویس"واژهبهمستقیماشارهاولیناکنونهمبود؛2015و2014هایسالطیدرموضوعاینشدنداغاماگردد،میبر

ههرماوشودمیمحسوبمعماریوافزارنرمدنیایدرجذابموضوعاتازیکیهامایکروسرویس-یتجارسمینارهاییاهاکنفرانسدروشودمیمنتشرآنازجدیدیهایارایهوهاکتابمقاالت،

رشدمیزانازگوگلهایگزارشاساسبرکند؛میجذبخودبهرازیادیعالقمنداننیزعلمیعهتوسومعماریدرآنمحورینقشبهتوانمیهامایکروسرویسبامرتبطعباراتجستجوی

.بردپیهاسیستم

میملهجازکهاندبودهآناستقراروسازیپیادهپیشگاممطرحیهایشرکتنیزتجاریدنیایدر-

SoundوUber،Netflix،Amazon،Ebayهایشرکتبهتوان Cloudنموداشاره.

توسطکهمتفاوتیتحقیقاتیاساسبرForrester،RedhatوDimensional Research

وهتوسعبرایایبرنامهکهاندکردهاعالمشوندگانپرسشدرصد70ازبیشاست،شدهانجام.دارندمایکروسرویسمعماریسازیپیاده

Page 5: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

روند جستجوی مایکروسرویس در گوگل5

2014 2019

Page 6: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

تعاریف معماری مایکروسرویس6

ویسسرتعدادیازمتشکلافزارنرمیکتوسعهبرایرویکردیمایکروسرویسمعماریسبکطریقازوشدهاجراخودشزیرساختومنابعاتکاءبهسرویسهرکهاستمستقلوکوچک

هایقابلیتبراساسهاسرویساین.داردارتباطدیگرانباHTTPبرمبتنیسبکهایپروتکلقابلتلفیمخنویسیبرنامههایزبانبافناوریبسترهایبروشوندمیساختهوطراحیوکارکسب

دادهگاهپایسرویسهرودارندرامتمرکزمدیریتبهنیازحداقلهاسرویساین.هستنداستقرارMartin).کندمیمدیریتراخودبهمخصوص Fowler)

ریکدیگباکههستندخودمختاریوریزدانههایسرویسخالصهصورتبههامایکروسرویسدیگرییرتغبهمنجراینکهبدونکندتغییرمستقالبتواندبایدسرویسهر.کنندمیهمکاریSam).شودسرویسازکنندگاناستفادهیامرتبطهایسرویس Newman)

تکیهاماژولبهافزارنرمیکشکستبرمبتنیمهندسیرویکردیکمایکروسرویسمعماری-هاسرویسدیگرباتعریفخوشهایواسطباوشوندمیمستقروتولیدمستقالکهاستکارکردی

چرخهتمامازکهشوندمیپشتیبانیوتولیدکوچکیهایتیمتوسطهاسرویساین.دارندارتباط(IBM)کندمیپشتیبانیسرویسحیات

هرهکاستشدهتشکیلکوچکوخودمختارهایسرویسازایمجموعهازمایکروسرویسمعماری(Microsoft)نمایدمیسازیپیادهراوکارکسبقابلیتیکوبودهمستقلسرویس

Page 7: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

اصول معماری مایکروسرویس7

کهتاس(مسالهصورت)سیستمازشدهتعریفخوبیبهومشخصدامنهیکمسوولسرویسهر.یابدمی(Deploy)استقرارو(Build)تولیدمستقال

یکهایسرویسهمهنداردلزومیوبردمیبهرهخودمناسبابزارهایوهافناوریازسرویسهر.کننداستفادهپلتفرمیانویسیبرنامهزبانفناوری،یکازسیستم

ایدبسرویسهرخروجیدارند،تعاملیکدیگرباسبکوتعریفخوشهایواسطباهاسرویس.گیردقراردیگریهایسرویسورودیبتواند

ابزارهایانواعازتواندمیواستخودهایدادهمدیریتمسوولسرویسهرDBMSاستفاده.نماید

استصادقنیزمعماریایندرگراسرویسمعماریکلیاصول.

غیرهمزمانرسانیپیامروشازاستفادهترجیح(Asynchronous)همزمانبهنسبت

کاریگرافیهمکاریروشازاستفادهترجیح(Choreography)ارکستریشنبهنسبت

Page 8: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

عصاره مفهوم مایکروسرویس8

Page 9: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

معماری مایکروسرویس در برابر معماری یک تکه9

مولفه ها و محاسبات سیستم

مدیریت منابع داده

واسط کاربری

تکهمعماری یک معماری مایکروسرویس

(Monolithic)تکه-یکبا معماری در سیستم ها چنان در داده-هاسرویس-هامولفهمجموعه

نده های سازتوان بلوکهم آمیخته است که نمیا ها را مستقال از هم جدا کرده و یاین سیستم

.نمود( جایجا)تغییر

Page 10: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

معماری مایکروسرویس در برابر معماری سرویس گرا10

Page 11: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

مثالی از یک سیستم فروش اینترنتی مبتنی بر مایکروسرویس11

Page 12: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

نتایج و مزایای معماری مایکروسرویس12

:ابزار/فناوریانتخابحق

یادهپوطراحیهایتیمبرایابزارها-هافناوریازمتنوعیسبدانتخابحقمایکروسرویسمعماریدر-ازمختلفهایمایکروسرویسبرایسیستم،یکتولیدفراینددرتوانمیکهصورتیبهاستمهیاسازی

داشتهجودویکپارچگیبعدیمشکالتازنگرانیاینکهبدونکرداستفادهمختلفیابزارهایوهافناوری.باشد

:سیستمپایداری

در(هاسمایکروسروی)هاسرویسسایرفعالیتادامهامکانپایدارهایسیستماصلیهایویژگیازیکییامشابههنمونباافتادهازکارسرویسجایگزینینیازصورتدرو)استسرویسیکافتادنازکارصورت

محققهاسسرویوابستگیعدموخودمختاریدلیلبهمایکروسرویسمعماریدرموضوعاین،(پشتیبان.شودمی

:هدفمندوباالپذیریمقیاس

معماریدرامااست،هیچیاهمهصورتبهتکهیکهایسیستمدرسیستمپذیریمقیاسامکانازخشبهربنابراین.استمیسردلخواهسرویسهرازایبهموثرپذیریمقیاسامکانمایکروسرویس

گیرددراختیاریزنبیشترپردازشیمنابعتواندمیمتناسباباشد،داشتهبیشتریکاری(load)بارکهسیستم.شودانجامیکنواختپذیریمقیاسسیستمهایمولفههمهبراینیستنیازیو

:تغییراتوتوسعه

خودمختاریدلیلبههاسرویسسایردرمنفیتاثیراتازنگرانیبدونسرویسهرمنطقدرتغییرامکانسرویسطواسصورتیکهدرواستداخلیمنطقتغییربرایالبتهموضوعایناست،ترسادههاسرویس

.شوددادهاطالع(کنندگاناستفاده)هاسرویسسایربهبایدکندتغییر

Page 13: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

نتایج و مزایای معماری مایکروسرویس13

:مجدداستفاده

ازمجدداستفادهامکانها،سرویستوسعهازاصلیاهدافازیکیگراسرویسمعماریمانندبه.استجدیدهایسرویسایجادبرایموجودهایسرویس

:گراسرویسسازمانمعماریباتطابق

نمیصهخالمشتریانبهباکیفیتسرویسارایهومحوری-مشتریدرصرفاگراسرویسسازمان-

بیشترییپویابرایمنابعوعناصرچیدماننحوهوسازمانداخلیمعماریتر،مهمموضوعبلکهشودسازمانیمعماریبامنطبقمایکروسرویسمعماریاست،واحدهاسایرازواحدهراستقاللو

.استآنکنندهتسیهلوگراسرویس

:هاسرویسجایگزینیوجابجاییسهولت

هکراسرویسیکتوانمیسادگیبهها،سرویسفناوریوکارکردیخودمختاریبهتوجهباکیبهتنهاییبهراسرویسیکیانمودجایگزینبهترنمونهبانبودهمناسبآنعملکرد

نموداستفادهآنازونمودمنتقلدیگرسیستم/محیط

Page 14: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

Technics, Methods and Technologies

Page 15: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

15Domain Driven Design (DDD)

Domain Driven Design (DDD) is a software development approach first

introduced by Eric Evans(2003). DDD requires a good understanding of the

domain for which the application will be written. The necessary domain

knowledge to create the application resides within the people who understand

it — the domain experts.

1. Start with a ubiquitous language, a common vocabulary that is sharedbetween all stakeholders.

2. Identify the relevant modules in the monolithic application and apply thecommon vocabulary to them.

3. Define the domain models of the monolithic application. The domainmodel is an abstract model of the business domain.

4. Define bounded contexts for the models. A bounded context is theboundary within a domain where a particular domain model applies.

Page 16: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

16Microservices Domains

Page 17: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

17DevOps and Microservices

Chris Richardson:Understanding the Microservice Architecture Through Shapes

Page 18: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

18Conway’s Law

“Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure.”

Page 19: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

19API Gateway pattern

API Gateway:

Decoupling / Routing/ Traffic Management/ Translation/Security

Page 20: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

20API Gateway : Pros and Cons

Pros

o Unification in one place of common concerns

o Separation of Concerns

o Micro-Services focus on business features

o API Gateway provides protection/common feature layer

o Minimize/Isolate services’ change impacts

Cons

o Possibility of SPOF/bottleneck

o Performance tradeoff due to processing time in API Gateway and more network hops

o Need to manage routing rule or APIs

o Risk of management bottleneck

API Gateway is a good idea! For most Microservices-based applications, it makes sense to

implement an API Gateway, which acts as a single entry point into a system.

Page 21: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

21API Gateway Patterns

Page 22: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

22Request-reply and event-driven interaction

Interaction: synchronous

Highly coupled

Simplified model

Low tolerance to failure

Interaction: asynchronous

Decoupled

Complex model

High tolerance to failure

Page 23: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

23Asynchronous Communication for Microservices

Synchronous Asynchronous

Page 24: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

24EDA And Microservices

Microservices

A small problem domain

Built and deployed by itself and Runs in its own process

Uses the technology stack that is most suitable

Integrates via well-‐known interfaces

Owns its own data stores

EVENT-DRIVEN

EDA is aligned with the goals of domain-driven design (Enforce isolation and decoupling

between bounded contexts)

Asynchronous communication paradigm

Message-driven – asynchronous and non-blocking

Scalable – scaling out and embracing the network

Page 25: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

25Event Driven Thinking !

Page 26: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

26Containers

Page 27: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

27Docker

Docker is an open software development platform which

help you to Build, Ship and Run your applications along with

all its dependencies allowing portability among any system.

Standardized packaging for software and dependencies via

Containers.

Page 28: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

28Build, Ship, Run

Page 29: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

29Docker Vs VM

Virtual Machines• Each VM runs its own OS• Cannot run more than couple of VMs

Docker• Container is just a user space of OS• Can run many Docker containers

Page 30: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

30Microservices patterns

https://microservices.io/i/MicroservicePatternLanguage.pdf

Page 31: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

31Security Issues!

Identity and Access Management

Secure Communication Protocols

Security Monitoring

Service Discovery Mechanism

https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-204.pdf

Security Strategies for Microservices-based Application Systems

NIST Special Publication 800-204 (August 2019)

Page 32: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

32MSA: MicroServices Architecture

“An architecture pattern that allows you functionally decompose the software

into a manageable and independent deployable unit”

Make EACH program/service do one thing WELL

Microservices should be:

Independent deployment.

Independent Management

Independent technology stack.

Independent scalable.

Can you make a change to a service and deploy it by itself without

changing anything else?—Sam Newman, Building Microservices (O’Reilly)

Page 33: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

Microservices Vs SOA

Page 34: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

34SOA as a Superset of Microservices

Martin Fowler:We should think about SOA as a superset of microservices.

Page 35: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

35SOA Vs. Microservices vs Web-services

SOA

Microservices Web-Service

Autonomy Replaceability Scalability Decoupled

Interoperability Composability Cost-Effective Loosely Coupled

Reusability Flexibility Discoverability …

Page 36: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

36SOA: Why it will survive for many more years

SOA is obsolete. Not at all. Take a look to its primary goals. Is is actually an strong architecture to work

with. It is very well aligned to today’s needs.

SOA is very expensive If you build componentes instead of services, it is definitly as expensive as a the

traditional approaches

Where is my ROI? Again, that is on the Architects who “defines and design” services

SOA is nothing more than a Service Bus Enterprise Service Bus is a design pattern not a product

Microservices architecture are better than service oriented architecture. You may get surprised about the similarities of both architectures.

Page 37: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

37

Page 38: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

SOEA and Microservices

SOEA Realization: Looking behind

Page 39: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

39

Page 40: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

40

Page 41: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

41

Page 42: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

42

Page 43: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

43

Web-Services SOEA

Unmatched!

Page 44: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

MSA Case Study (BIAN)

Page 45: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

45BIAN : Banking Industry Architecture Network

Financial Institutions Software Vendors / Service Providers

Page 46: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

46BIAN Reference Architecture

Technology Architecture

Application Architecture

Information Architecture

Business ArchitectureService Domain

Definition

Service landscape

Business Scenario

Business Capability

Model

Wireframe Model

Business Object Model

Asset Decomposition

ModelControl Record

Application Capabilities

Logical System Messsage

FormatOpen API

Service Protocol

Standards

Page 47: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

47Service Landscape

Page 48: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

48BIAN Service Domain

The building block of the BIAN SOA is the Service Domain – it is a

conceptual specification of a functional partition.

A critical aspect of the Service Domain’s definition is to ensure

effective encapsulation.

Page 49: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

49Service Domain Design

BIAN Service Domain Designs are Suited to Highly Distributed Architecture

With service based designs each Service Domain ‘encapsulates’ its own data.

Page 50: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

50Functional pattern of Service Domain

Page 51: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

51Asset type decomposition

Page 52: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

52Design Method

Service Domain

AssetTypes

Functional Pattern

The Bank is made up of resources or “objects” that it can use…

And functions it performs on those resources/objects

A Service Domain is a discrete and ‘elemental’ business capability that exacts or creates value by

“doing something to something”

Page 53: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

53Implementation Architecture

Page 54: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

54

Let’s talk about Microservices MARKET!

Page 55: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

55Google Trends

Page 56: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

56Web Service and Microservices

Page 57: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

57BPM and SOA still on Top

Page 58: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

58Microservices Hype Cycle

Microservices(2019)

Page 59: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

Conclusion

Page 60: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

60Microservices are not a silver bullet

• Testing, logging, monitoring, security, versioning– all become much harder

• Distributed System is hard to maintain

• A lot of duplicated effort since each team is independent and goal is to minimize dependencies

• Most organizations are

organized around

horizontal technology

layers – need to build

small product-focused

teams

• Much higher skills

required

• Many developers will

not want to do

production support

• Microservices don't

eliminate complexity –

they simply moved it

and often add to it

• Monolithic applications

allow architects to deal

with complexity in one

body of code

• Microservices force the

move to distributed

computing

Architectural Challenges Organizational Challenges Delivery Challenges

Page 61: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

61Services are simple, surrounding architecture is not

Building services is rather straightforward using one of the multiple

frameworks currently available

However, there is a relatively large amount of concerns and capabilities, some

of them unique to microservices, that should be addressed before we decide

to build microservices

Inside Architecture

Data Access

Security

Business logic

Load Balancing

Service Discovery

DevOps

Shared State

OS Containers

Messaging

API Gateway

Telemetry

Monitoring

Outside Architecture

Page 62: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

62Common misconceptions about Microservices

62

“Microservices removes the need for an Enterprise Service Bus”

Don’t confuse the Integration pattern with the Architecture style

“Microservices solves the problems of SOA”

Don’t confuse improper SOA deployments as problems with SOA

“Companies like Netflix and LinkedIn use microservices, so we should too”

Netflix and LinkedIn are in the platform business. Is that your business too?

“We must choose microservices, or SOA” MSA is a realization of SOA

Page 63: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

63Microservices(Service-Oriented) Paradigm!

Legacy Apps SOA(Microservices)

New Apps

Page 64: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

64References

Martin Fowler: https://martinfowler.com/

Chris Richardson: https://microservices.io

Building Microservices, Sam Newman (2015)

Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

Vertically Integrated Architectures, Jos Jong (2019)

Building Microservices with ASP.NET Core, Kevin Hoffman (2017)

Building Evolutionary Architectures: Support Constant Change, Neal Ford, RebeccaParsons, and Patrick Kua (2017)

https://developer.ibm.com/technologies/microservices

https://www.redhat.com/en/topics/microservices

https://aws.amazon.com/microservices/

https://docs.oracle.com/en/solutions/learn-architect-microservice/index.html

https://wso2.com

https://camunda.com/learn/whitepapers/microservices-and-bpm

Page 65: سیو سو کیام یرامعمncaea2019.sharif.edu/images/Slides/Microservices_Mahjoorian.pdf · Microservices for the Enterprise, Kasun Indrasiri & Prabath Siriwardena (2018)

راآزمایشگاه معماری سازمانی سرویس گ

لوم دانشکده مهندسی و ع-دانشگاه شهید بهشتی

212اتاق –طبقه دوم –کامپیوتر

22424572، 22409609: تلفن

http://soea.sbu.ac.ir

با تشکر از وقت و حوصله شما عزیزانامیر مهجوریان

[email protected] , [email protected]