BT

广东今晚36选7开奖结果:QCon NY: Jonas Bonér on Designing Events-First Microservices

| by Srini Penchikala Follow 36 Followers on Jul 05, 2018. Estimated reading time: 2 minutes | NOTICE: The next QCon is in San Francisco Nov 5 - 9, 2018. Save an extra $100 with INFOQSF18!

深圳风采开奖号码 www.ljvch.cn Events-first domain-driven design (DDD) and event streaming are critical in a microservices based architecture, said Jonas Bonér, founder and CTO of Lightbend, who spoke at the QCon New York 2018 Conference last week about using events-first design to create a resilient and scalable architecture.

He stated that when you start with a microservices journey you should take care not to end up with "microliths" because you may bring bad habbits from monolithic design to microservices, which creates a strong coupling between services. A DDD approach without the events-first perspective can easily lead you down the wrong path. You shouldn't focus on things (the Nouns, like domain objects) but instead focus on what happens in the system (the Verbs, like events).

A microservice architecture based on events and commands helps with resilience, scalability, traceability, and loose coupling in the system. Events represent facts of information about something that has happened in the past (for example, OrderCreated, ProductShipped). Events can be disregarded but they cannot be retracted or deleted. Also, new events/facts arrive in the system that can invalidate the existing facts. Commands, on the other hand, are the object form of a method/action. They are imperative. Examples of commands are CreateOrder and ShipProduct.

Bonér suggested that we use the events to define bounded contexts in the system. Event-driven services receive and react to facts that are coming their way and then publish new facts to other services in the system. He also talked about the Aggregate design pattern which is used to maintain integrity and consistency of the domain data. It's also the unit of failure, and is fully autonomous. Event streaming plays a vital role in the microservices architecture and can be used as the communication fabric between the services. It can also be used as the fabric for capabilities like integration, replication, consensus, and persistence.

Regarding data persistence, CRUD services are fine for totally isolated data, but achieving consistency is very challenging across CRUD services. You will have to rely on eventual consistency from the beginning of application design and use strong consisency only where needed instead of the other way around. He also discussed the importanace of modeling our systems to address the uncertainty. The management of uncertainty must be implemented in the business logic. Events can help us manage failure instead of trying to avoid it. Use CRUD services together with event streams to get an internally consistent material view.

Event logging and event sourcing are also critical in realizing scalable microservices architectures. Just like a transaction log is used in relational databases, the event log is the bedrock and helps with scalability, reliability, and consistency. Event sourcing also helps with eventual consistency between the microservices, and can help with recovering from failure by "rehydrating" events from the event log. It also allows others to subscribe to state changes. You can also use the CQRS design pattern to untangle the read and write models. Reads in the system may have completely different characteristics compared to the writes.

Bonér concluded the presentation saying that events-first design helps create a resilient and scalable architecture and the design of autonomous microservices. Event logging allows you to avoid CRUD and ORM, and take control of your system's history, and balance between strong and eventual consistency models.

Akka framework is a good solution for implementing these patterns. For more information on events-first microservices, you can check out his mini book titled Reactive Microsystems.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT
  • 小龙虾走俏催生新职业“品虾师” 2018-12-15
  • 女子痴迷鹿晗 商场门口对人形立牌拭泪亲吻 2018-12-14
  • 成都:共享办公受追捧 助力写字楼“去库存” 2018-12-14
  • 回复@老老保老张工:伪高工想回到那种你生产的产品再水都有人买单都不会倒闭的日子?没门儿! 2018-12-12
  • 习近平:深入实施创新驱动发展战略 为振兴老工业基地增添原动力 2018-12-12
  • 昆明母婴室地图出炉啦!公众场合喂奶不再羞答答 春城壹网 七彩云南 一网天下 2018-12-10
  • 南昌市新建区司法局深入湖区渔船宣传法律 2018-12-09
  • 银白配色更高贵-热门标签-华商网数码 2018-12-08
  • 超美雾凇冰挂奇观   豫北最大瀑布群变冰帘 2018-12-07
  • 台东“孩子的书屋”:撑起偏乡学童翻转命运的机会 2018-12-07
  • 实验室里“种植”钻石,这样的人造钻戒你能接受吗? 2018-12-06
  • 新赛季CBA联赛常规赛分组 吉、辽、深、广、青同组 2018-12-05
  • 【网络中国节】端午遇上足球杯 平陆交警夜查全力保平安 2018-12-05
  • 法学教育 要离生活更近些 2018-12-04
  • 写“平乐镇”前,小说家颜歌的光怪陆离 2018-12-03
  • 580| 310| 850| 434| 913| 641| 247| 426| 455| 122|