Having a grasp of common architectural patterns is essential to designing software architecture at scale. Using them saves not only time but also ensures a reliable implementation of your design. Thereโ€™s no need to reinvent the wheel when thereโ€™s an architectural pattern available that applies to an architecture youโ€™re developing.

The following is a brief overview of the Event Sourcing architectural pattern.

Understanding the Event Sourcing pattern

The Event Sourcing pattern involves sending a continuous stream of messages to an authoritative storage target. Each message describes an event in the system. Examples include: A write to the database, request to a web server, or logging activity from within an application. Services and applications then query the event store for interesting events in a way that is particular to the purpose of the given service or application.

Event sourcing

Pros

  • Great for fail-safety. If the downstream source fails, its data can be reconstituted from the event store.
  • Extremely flexible. Any type of message can be stored. Any consumer can access the event store as long as appropriate access rights are granted.
  • Excellent for real-time data reporting, especially when used with an event-driven message broker such as Kafka.

Cons

  • Requires an extremely efficient network infrastructure given the inherent time sensitivity of the pattern and the susceptibility to potential latency issues.
  • Requires a reliable way to control message formats, for example, using a schema registry.
  • Different events will contain different payloads. There needs to be a single source of truth for defining and determining message formats for a particular event.

Putting it all together

Event Sourcing is gaining popularity as more applications need real-time data delivered in an asynchronous yet ordered manner, for example, ride-share applications. Also, Event Sourcing is gaining wide acceptance as a way to consume and manage applicationsโ€™ log data at web-scale. As mentioned above, an event source can serve as a common point of truth for applications regardless of how the given application intends to process the data.


์ €์ž ์†Œ๊ฐœ

Bob Reselman is a nationally known software developer, system architect, industry analyst, and technical writer/journalist. Over a career that spans 30 years, Bob has worked for companies such as Gateway, Cap Gemini, The Los Angeles Weekly, Edmunds.com and the Academy of Recording Arts and Sciences, to name a few. He has held roles with significant responsibility, including but not limited to, Platform Architect (Consumer) at Gateway, Principal Consultant with Cap Gemini and CTO at the international trade finance company, ItFex.

UI_Icon-Red_Hat-Close-A-Black-RGB

์ฑ„๋„๋ณ„ ๊ฒ€์ƒ‰

automation icon

์˜คํ† ๋ฉ”์ด์…˜

๊ธฐ์ˆ , ํŒ€, ์ธํ”„๋ผ๋ฅผ ์œ„ํ•œ IT ์ž๋™ํ™” ์ตœ์‹  ๋™ํ–ฅ

AI icon

์ธ๊ณต์ง€๋Šฅ

๊ณ ๊ฐ์ด ์–ด๋””์„œ๋‚˜ AI ์›Œํฌ๋กœ๋“œ๋ฅผ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋„๋ก ์ง€์›ํ•˜๋Š” ํ”Œ๋žซํผ ์—…๋ฐ์ดํŠธ

open hybrid cloud icon

์˜คํ”ˆ ํ•˜์ด๋ธŒ๋ฆฌ๋“œ ํด๋ผ์šฐ๋“œ

ํ•˜์ด๋ธŒ๋ฆฌ๋“œ ํด๋ผ์šฐ๋“œ๋กœ ๋”์šฑ ์œ ์—ฐํ•œ ๋ฏธ๋ž˜๋ฅผ ๊ตฌ์ถ•ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ณด์„ธ์š”

security icon

๋ณด์•ˆ

ํ™˜๊ฒฝ๊ณผ ๊ธฐ์ˆ  ์ „๋ฐ˜์— ๊ฑธ์ณ ๋ฆฌ์Šคํฌ๋ฅผ ๊ฐ์†Œํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•œ ์ตœ์‹  ์ •๋ณด

edge icon

์—ฃ์ง€ ์ปดํ“จํŒ…

์—ฃ์ง€์—์„œ์˜ ์šด์˜์„ ๋‹จ์ˆœํ™”ํ•˜๋Š” ํ”Œ๋žซํผ ์—…๋ฐ์ดํŠธ

Infrastructure icon

์ธํ”„๋ผ

์„ธ๊ณ„์ ์œผ๋กœ ์ธ์ •๋ฐ›์€ ๊ธฐ์—…์šฉ Linux ํ”Œ๋žซํผ์— ๋Œ€ํ•œ ์ตœ์‹  ์ •๋ณด

application development icon

์• ํ”Œ๋ฆฌ์ผ€์ด์…˜

๋ณต์žกํ•œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์— ๋Œ€ํ•œ ์†”๋ฃจ์…˜ ๋” ๋ณด๊ธฐ

Virtualization icon

๊ฐ€์ƒํ™”

์˜จํ”„๋ ˆ๋ฏธ์Šค์™€ ํด๋ผ์šฐ๋“œ ํ™˜๊ฒฝ์—์„œ ์›Œํฌ๋กœ๋“œ๋ฅผ ์œ ์—ฐํ•˜๊ฒŒ ์šด์˜ํ•˜๊ธฐ ์œ„ํ•œ ์—”ํ„ฐํ”„๋ผ์ด์ฆˆ ๊ฐ€์ƒํ™”์˜ ๋ฏธ๋ž˜