What is an event-driven architecture, what can it do for your architecture, and is it a prerequisite for microservices?
In this talk, we'll see what events are and how they can solve many of the coupling and integration problems that you will experience in a distributed (micro)service landscape.
We'll get into the different usages for events and showcase them based on real world projects.
After this talk, you will know what events are, how they can be used and some of the requirements they put on your design and the way you thinking about software design.
Should you be using an event driven architecture - IDA IT (short version)Jeppe Cramon
What is an event-driven architecture, what can it do for your architecture, and is it a prerequisite for microservices?
In this talk, we'll see what events are and how they can solve many of the coupling and integration problems that you will experience in a distributed (micro)service landscape.
We'll get into the different usages for events and showcase them based on real world projects.
After this talk, you will know what events are, how they can be used and some of the requirements they put on your design and the way you thinking about software design.
What 5 years of implementation microservices has taught meJeppe Cramon
This is a sum up of what 15 year of implementation distributed systems has taught me, because many of the mistakes that I see people make with microservices are essentially a repetition of the mistakes that were made more than 10 years ago with layered SOA. We will look at the challenges experienced with poorly designed service boundaries, bad UI integration and what a solution to these challenges may look like in the form of logical services aligned with business capabilities, autonomous components and composite UI's
Alternative microservices - one size doesn't fit allJeppe Cramon
A different look at microservices. Is there only one way to approach microservices, what are the pit falls, what protocols and communication patterns should we use. How do we discover service boundaries? What role does applications and the UI play?
Should you be using an event driven architecture - IDA IT (short version)Jeppe Cramon
What is an event-driven architecture, what can it do for your architecture, and is it a prerequisite for microservices?
In this talk, we'll see what events are and how they can solve many of the coupling and integration problems that you will experience in a distributed (micro)service landscape.
We'll get into the different usages for events and showcase them based on real world projects.
After this talk, you will know what events are, how they can be used and some of the requirements they put on your design and the way you thinking about software design.
What 5 years of implementation microservices has taught meJeppe Cramon
This is a sum up of what 15 year of implementation distributed systems has taught me, because many of the mistakes that I see people make with microservices are essentially a repetition of the mistakes that were made more than 10 years ago with layered SOA. We will look at the challenges experienced with poorly designed service boundaries, bad UI integration and what a solution to these challenges may look like in the form of logical services aligned with business capabilities, autonomous components and composite UI's
Alternative microservices - one size doesn't fit allJeppe Cramon
A different look at microservices. Is there only one way to approach microservices, what are the pit falls, what protocols and communication patterns should we use. How do we discover service boundaries? What role does applications and the UI play?
Not all the WEB APIs are RESTful, some are just plain RPC.
REST is an architecture style.
The video attached to these slides.
https://www.youtube.com/watch?v=M28aBbtdWj4
We have identified issues related to composition of a business process and discussed the requirements for event-driven composition and event-driven service-oriented architecture.
CQRS and what it means for your architectureRichard Banks
A session on the CQRS pattern (Command Query Responsibility Separation) with C# code samples, and a discussion of what it means for your architecture and when and why you should use it. First presented at the Sydney Alt.Net group in June 2016.
In this presentation, I will explain event driven architecture, describe the different types of events, demonstrate how events can be related and orchestrated, and provide a basic understanding of how this method can drive the architecture of enterprise systems. In addition to understanding the concepts of event driven architecture, we will explore a working sample built using an open-source .NET messaging framework called MassTransit.
Walmart proves the obvious, devknob wonders why people don't understand why page speed matters. This has been true and known to be true since the beginning of the internet. Do you think people won't get distracted easily and bounce when they're surfing on 2g, 3g and even 4g connections? Page speed matters, devknob is probably the best page speed optimizer in the world so if you need conversion optimization, you may want to visit devknob online at devknob.com
JavaScript Frameworks and Java EE – A Great MatchReza Rahman
The sea change in JavaScript frameworks is shifting the pendulum away from today's thin-client based server-side web frameworks like Spring MVC and JSF to JavaScript powered rich clients. With strong support for REST, WebSocket and JSON, Java EE is well positioned to adapt to this landscape.
In this heavily code driven session, we will show you how you can utilize today's most popular JavaScript frameworks like AngularJS and React to utilize the core strengths of Java EE using JAX-RS, WebSocket, JSON-P, JSON-B, CDI and Bean Validation.
Updated: Should you be using an Event Driven ArchitectureJeppe Cramon
What is an event-driven architecture, what can it do for your architecture, and is it a prerequisite for microservices?
In this talk, we'll see what events are and how they can solve many of the coupling and integration problems that you will experience in a distributed (micro)service landscape.
We'll get into the different usages for events and showcase them based on real world projects.
After this talk, you will know what events are, how they can be used and some of the requirements they put on your design and the way you thinking about software design.
Building React Applications with Redux
with Yuri Takhteyev
OVERVIEW
Since React is just a “view framework”, it leaves you with lots of options for how to architect the deeper parts of your stack. The best way to handle those deeper layers is by using Redux – a state container that allows you to write much of your application in the form of pure functions. Using Redux helps you write applications that are much easier to test and understand and to achieve more thorough separation between your views and your business logic. Redux also unlocks the possibility of using amazing tools.
OBJECTIVE
Introduce the audience to Redux, a state container that can be used together with React to achieve sanity deeper down in your stack.
TARGET AUDIENCE
Developers familiar with core React and looking for a better way to architect their applications.
ASSUMED AUDIENCE KNOWLEDGE
Core React knowledge is assumed. Familiarity with basic Flux concepts would help, but I’ll review those quickly.
FIVE THINGS AUDIENCE MEMBERS WILL LEARN
Why pure functions make your code easier to maintain.
How unidirectional data flows help you sleep better at night.
How Redux helps you manage state better via reducers.
How to use Redux together with React.
How to test Redux applications.
EPM environments are generally supported by a Data Warehouse, however, we often see that those DWs are not optimized for the EPM tools. During the years, we have witnessed that modeling a DW thinking about the EPM tools may greatly increase the overall architecture performance.
The most common situation found in several projects is that the people that develops the data warehouse does not have a great knowledge about EPM tools and vice-versa. This may create a big gap between those two concepts which may severally impact performance.
This session will show a lot of techniques to model the right Data Warehouse for EPM tools. We will discuss how to improve performance using partitioned tables, create hierarchical queries with “Connect by Prior”, the correct way to use Multi-Period tables for block data load using Pivot/Unpivot and more. And if you want to go ever further, we will show you how to leverage all those techniques using ODI, which will create the perfect mix to perform any process between your DW and EPM environments.
Not all the WEB APIs are RESTful, some are just plain RPC.
REST is an architecture style.
The video attached to these slides.
https://www.youtube.com/watch?v=M28aBbtdWj4
We have identified issues related to composition of a business process and discussed the requirements for event-driven composition and event-driven service-oriented architecture.
CQRS and what it means for your architectureRichard Banks
A session on the CQRS pattern (Command Query Responsibility Separation) with C# code samples, and a discussion of what it means for your architecture and when and why you should use it. First presented at the Sydney Alt.Net group in June 2016.
In this presentation, I will explain event driven architecture, describe the different types of events, demonstrate how events can be related and orchestrated, and provide a basic understanding of how this method can drive the architecture of enterprise systems. In addition to understanding the concepts of event driven architecture, we will explore a working sample built using an open-source .NET messaging framework called MassTransit.
Walmart proves the obvious, devknob wonders why people don't understand why page speed matters. This has been true and known to be true since the beginning of the internet. Do you think people won't get distracted easily and bounce when they're surfing on 2g, 3g and even 4g connections? Page speed matters, devknob is probably the best page speed optimizer in the world so if you need conversion optimization, you may want to visit devknob online at devknob.com
JavaScript Frameworks and Java EE – A Great MatchReza Rahman
The sea change in JavaScript frameworks is shifting the pendulum away from today's thin-client based server-side web frameworks like Spring MVC and JSF to JavaScript powered rich clients. With strong support for REST, WebSocket and JSON, Java EE is well positioned to adapt to this landscape.
In this heavily code driven session, we will show you how you can utilize today's most popular JavaScript frameworks like AngularJS and React to utilize the core strengths of Java EE using JAX-RS, WebSocket, JSON-P, JSON-B, CDI and Bean Validation.
Updated: Should you be using an Event Driven ArchitectureJeppe Cramon
What is an event-driven architecture, what can it do for your architecture, and is it a prerequisite for microservices?
In this talk, we'll see what events are and how they can solve many of the coupling and integration problems that you will experience in a distributed (micro)service landscape.
We'll get into the different usages for events and showcase them based on real world projects.
After this talk, you will know what events are, how they can be used and some of the requirements they put on your design and the way you thinking about software design.
Building React Applications with Redux
with Yuri Takhteyev
OVERVIEW
Since React is just a “view framework”, it leaves you with lots of options for how to architect the deeper parts of your stack. The best way to handle those deeper layers is by using Redux – a state container that allows you to write much of your application in the form of pure functions. Using Redux helps you write applications that are much easier to test and understand and to achieve more thorough separation between your views and your business logic. Redux also unlocks the possibility of using amazing tools.
OBJECTIVE
Introduce the audience to Redux, a state container that can be used together with React to achieve sanity deeper down in your stack.
TARGET AUDIENCE
Developers familiar with core React and looking for a better way to architect their applications.
ASSUMED AUDIENCE KNOWLEDGE
Core React knowledge is assumed. Familiarity with basic Flux concepts would help, but I’ll review those quickly.
FIVE THINGS AUDIENCE MEMBERS WILL LEARN
Why pure functions make your code easier to maintain.
How unidirectional data flows help you sleep better at night.
How Redux helps you manage state better via reducers.
How to use Redux together with React.
How to test Redux applications.
EPM environments are generally supported by a Data Warehouse, however, we often see that those DWs are not optimized for the EPM tools. During the years, we have witnessed that modeling a DW thinking about the EPM tools may greatly increase the overall architecture performance.
The most common situation found in several projects is that the people that develops the data warehouse does not have a great knowledge about EPM tools and vice-versa. This may create a big gap between those two concepts which may severally impact performance.
This session will show a lot of techniques to model the right Data Warehouse for EPM tools. We will discuss how to improve performance using partitioned tables, create hierarchical queries with “Connect by Prior”, the correct way to use Multi-Period tables for block data load using Pivot/Unpivot and more. And if you want to go ever further, we will show you how to leverage all those techniques using ODI, which will create the perfect mix to perform any process between your DW and EPM environments.
Systems Monitoring with Prometheus (Devops Ireland April 2015)Brian Brazil
Monitoring means many things to many people. This talk looks at Systems Monitoring, that is how to keep an eye on a given system and use this as part of overall management of a system. This talk will cover Why one monitors, What to monitor, How to monitor, the general design of a monitoring system and how Prometheus is a good fit for this in terms of instrumentation, consoles, alerts, general system health and sanity.
Prometheus is a next-generation monitoring system publicly announced earlier this year, developed by companies including SoundCloud, locals Boxever and Docker. Since launch there has been wide-spread interest, and many community contributions.
For more information see http://prometheus.io or http://www.boxever.com/tag/monitoring
Profit and loss is a website for online accounting, which enables individuals and entrepreneurs, who required a simple system that help them in calculating their earning during a particular time period. It allows the user to maintain accounts and see the result with having trouble of accounting definitions and confusions. The system only need to enter the transactions in a simple way and rest of the things will be done by the System itself. By this system the individuals and entrepreneurs can maintain the accounts and access them from anywhere in the world with using an internet connection and a PC.
OTHER INFORMATION
Programming language
ASP .net 2005(Frontend)
Microsoft SQL server 2005(backend)
Software requirements:
Web browsers any
Optimum System requirement
Processor: any
RAM: any
Hard disk: any
Internet: connection with good speed can work
Operating system: any
Additional software: .web browser
Monitor resolution: 1024X768(min)
AtlasCamp 2015: Damn you Facebook - Raising the bar in SaaSAtlassian
Greg Warden, Atlassian
Facebook (and others) have raised the bar on what people expect in SaaS – performance, availability, dev-speed. Unfortunately a lot of what we learned as on-premises server developers needs to be un-learned to get to this level. In this talk we'll explore some of the learnings Atlassian has had on its journey from World Class server software to proper SaaS.
No software engineer is exempt from writing batch jobs, its just part of every software app stack. Lack of a standards and a reusable batch architecture in the Java platform has resulted in the proliferation of many one-off in-house batch solutions.
In this talk I presented about Spring Batch Framework, how it could help an organization to standardize their batching needs. I also talked about a Real World Use Case in Dealer dot com. How we used Spring Batch along with Spring Integration to solve our job concurrency, data flow control, job resiliency & additional requirements - thus enabling us to build beautiful batch jobs.
In the ever-evolving landscape of technology, enterprise software development is undergoing a significant transformation. Traditional coding methods are being challenged by innovative no-code solutions, which promise to streamline and democratize the software development process.
This shift is particularly impactful for enterprises, which require robust, scalable, and efficient software to manage their operations. In this article, we will explore the various facets of enterprise software development with no-code solutions, examining their benefits, challenges, and the future potential they hold.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
Recreation management software streamlines operations by automating key tasks such as scheduling, registration, and payment processing, reducing manual workload and errors. It provides centralized management of facilities, classes, and events, ensuring efficient resource allocation and facility usage. The software offers user-friendly online portals for easy access to bookings and program information, enhancing customer experience. Real-time reporting and data analytics deliver insights into attendance and preferences, aiding in strategic decision-making. Additionally, effective communication tools keep participants and staff informed with timely updates. Overall, recreation management software enhances efficiency, improves service delivery, and boosts customer satisfaction.
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Shahin Sheidaei
Games are powerful teaching tools, fostering hands-on engagement and fun. But they require careful consideration to succeed. Join me to explore factors in running and selecting games, ensuring they serve as effective teaching tools. Learn to maintain focus on learning objectives while playing, and how to measure the ROI of gaming in education. Discover strategies for pitching gaming to leadership. This session offers insights, tips, and examples for coaches, team leads, and enterprise leaders seeking to teach from simple to complex concepts.
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaYara Milbes
Discover the transformative power of the WhatsApp API in our latest SlideShare presentation, "Top 7 Unique WhatsApp API Benefits." In today's fast-paced digital era, effective communication is crucial for both personal and professional success. Whether you're a small business looking to enhance customer interactions or an individual seeking seamless communication with loved ones, the WhatsApp API offers robust capabilities that can significantly elevate your experience.
In this presentation, we delve into the top 7 distinctive benefits of the WhatsApp API, provided by the leading WhatsApp API service provider in Saudi Arabia. Learn how to streamline customer support, automate notifications, leverage rich media messaging, run scalable marketing campaigns, integrate secure payments, synchronize with CRM systems, and ensure enhanced security and privacy.
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Mind IT Systems
Healthcare providers often struggle with the complexities of chronic conditions and remote patient monitoring, as each patient requires personalized care and ongoing monitoring. Off-the-shelf solutions may not meet these diverse needs, leading to inefficiencies and gaps in care. It’s here, custom healthcare software offers a tailored solution, ensuring improved care and effectiveness.
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
8. @jeppec
public class OrderService {
public void save(Order order) {
orderRepository.add(order);
if (inventoryService.areOrderItemsInStock(order)) {
order.setStatus(OrderStatus.ItemsInStock);
shippingService.startPackagingOrder(order);
emailService.send(generateOrderOrderItemsInStockEmail(order));
} else {
order.setStatus(OrderStatus.NotAllItemsInStock);
emailService.send(generateOrderItemsNotInStockEmail(order));
executeMethod(OrderService::checkOrderInventoryStatus, Period.ofDays(1));
}
}
public void checkOrderInventoryStatus(OrderId orderId) {
Order order = orderRepository.load(orderId);
if (inventoryService.areOrderItemsInStock(order)) {
order.setStatus(OrderStatus.ItemsInStock);
shippingService.startPackagingOrder(order);
emailService.send(generateOrderOrderItemsInStockEmail(order));
} else {
executeMethod(OrderService::checkOrderInventoryStatus, Period.ofDays(1));
}
}
Side effect. What happens if we call save() twice?
9. @jeppec
public class OrderService {
public void save(Order order) {
orderRepository.add(order);
if (inventoryService.areOrderItemsInStock(order)) {
order.setStatus(OrderStatus.ItemsInStock);
shippingService.startPackagingOrder(order);
…
10. @jeppec
Let’s decouple Order- and
Inventory Service further
public class OrderService {
public void save(Order order) {
orderRepository.add(order);
if (inventoryService.areOrderItemsInStock(order)) {
order.setStatus(OrderStatus.ItemsInStock);
shippingService.startPackagingOrder(order);
11. @jeppec
public class OrderService {
public void save(Order order) {
orderRepository.add(order);
List<ProductId> productIdsOutOfStock = inventoryService.checkProductStockStatus(
order.orderLines.toMap(OrderLine::productId, OrderLine::quantity));
if (productIdsOutOfStock.isEmpty()) {
order.setStatus(OrderStatus.ItemsInStock);
shippingService.startPackagingOrder(order);
emailService.send(generateOrderOrderItemsInStockEmail(order));
} else {
order.setStatus(OrderStatus.NotAllItemsInStock);
emailService.send(generateOrderItemsNotInStockEmail(order, productIdsOutOfStock));
executeMethod(OrderService::checkOrderInventoryStatus, Period.ofDays(1));
}
}
13. @jeppec
public class OrderService {
public void save(Order order) {
orderRepository.add(order);
List<ProductId> productIdsOutOfStock = inventoryService.checkProductStockStatus(
order.orderLines.toMap(OrderLine::productId, OrderLine::quantity));
if (productIdsOutOfStock.isEmpty()) {
order.setStatus(OrderStatus.ItemsInStock);
shippingService.startPackagingOrder(order);
emailService.send(generateOrderOrderItemsInStockEmail(order));
} else {
order.setStatus(OrderStatus.NotAllItemsInStock);
emailService.send(generateOrderItemsNotInStockEmail(order, productIdsOutOfStock));
executeMethod(OrderService::checkOrderInventoryStatus, Period.ofDays(1));
}
}
14. @jeppec
public class OrderService {
public void save(Order order) {
orderRepository.add(order);
List<ProductId> productIdsOutOfStock = inventoryService.reserveProductsForOrder(order.orderId,
order.orderLines.toMap(OrderLine::productId, OrderLine::quantity));
if (productIdsOutOfStock.isEmpty()) {
order.setStatus(OrderStatus.ItemsInStock);
shippingService.startPackagingOrder(order);
emailService.send(generateOrderOrderItemsInStockEmail(order));
} else {
order.setStatus(OrderStatus.NotAllItemsInStock);
emailService.send(generateOrderItemsNotInStockEmail(order, productIdsOutOfStock));
executeMethod(OrderService::checkOrderInventoryStatus, Period.ofDays(1));
}
}
Introduces an additional side effect
15. @jeppec
Essential complexity of 2 way integration
Inventory
Service
Order
Service
Shipping
Service
UI
Start-
Packaging
Save-Order
Order:Save-Order()
call Inventory:Reserve-Products()
call Shipping:Start-Packaging()
commit()
Reserve-
Products
Local transaction between the 3
“Services”
17. @jeppec
Accidental complexity from distributed service integration
Inventory
Service
Order
Service
Shipping
Service
UI
Start-
Packaging
Save-Order
Reserve-
Products
Local transaction between 2 local
“Services”Remote call
21. @jeppec
Synchronous calls lower our tolerance for faults
• When you get an IO error
• When servers crash or restarts
• When databases are down
• When deadlocks occurs in our databases
• Do you retry?
With synchronous style Service interaction we can loose business data if there’s no automatic retry
Or we risk creating data more than once if the operation isn’t idempotent*
Client Server
Duplicated Response
Duplicated Request
Processing
Response
Request Processing
The same message can be
processed more than once
*Idempotence describes the quality of an operation
in which result and state does not change if the
operation is performed more than 1 time
25. @jeppec
What’s wrong with distributed transactions?
• Transactions lock resources while active
• Services are autonomous
• Can’t be expected to finish within a certain time interval
• Locking keeps other transactions from completing their job
• Locking doesn’t scale
• X Phase Commit is fragile by design
27. @jeppec
Order:Save-Order()
call Inventory:Reserve-Products()
call Shipping:Start-Packaging()
if (Shipping:Call-Failed:Too-Busy?)
Wait-A-While()
call Shipping:Start-Packaging()
if (Shipping:Call-Failed:Too-Busy?)
Wait-A-Little-While-Longer()
call Shipping:Start-Packaging()
if (Shipping:Call-Failed:IO-Error?)
Save-We-Need-Check-If-Call-Shipping-Succeded-After-All
AND We-Need-To-Retry call Order:Save-Order and call Inventory:Reserve-Products
AND Tell-Customer-That-This-Operation-Perhaps-Went-Well
if (Shipping:Call-Went-Well?)
commit()
Accidental complexity from distributed service integration
Inventory
Service
Order
Service
Shipping
Service
UI
Start-
Packaging
Save-Order
Reserve-
Products
Local transaction between 2
Components
28. @jeppec
“A distributed system is one
where a machine I’ve never heard
of can cause my program to fail”
— Leslie Lamport
35. @jeppec
We need to shift focus from pure data
towards intent and process automation
This means a change from CRUD style application design, where the
process was implicit and stored in the minds of the users
First I need to
enter the
employee in
this screen
Then I need to press
a button in the user
system so they’re
properly created
And the I need to
add their access
card to this screen
and press Activate
36. @jeppec
We need to capture User Intent at the UI
CRUD style
Task based style
Intent
37. @jeppec
Task-based/Inductive UI
• Traditional CRUD UI is what I would call a WHAT UI
• Task based UI’s focuses on HOW the user wants to use the
application
• Guides users through the work process
• The UI becomes an intrinsic part of the design
• The UI design directly affects our commands and thereby our
transactional boundaries
38. @jeppec
Capturing intent in the form of a Command
A Command is prescriptive of what should happen, and its primary goal is to capture USER
INTENT
A Command
supports a single usecase and
targets a single business object
within a single Transaction
Commands always carry a name in its imperative form:
• AcceptOrder
• ShipOrder
• CancelOrder
• ReimburseCustomer
• Etc.
“A command describes a Task that you want someone else to carry out
for you and where the recipient can choose to reject the Command”
39. @jeppec
Let’s capture the intent of the customer
public class OrderService {
public void handle(AcceptOrder cmd) {
orderRepository.add(new Order(cmd.orderId,
cmd.orderLines));
????
}
41. @jeppec
Life Beyond Distributed Transactions
by Pat Helland
1. How do we split our data
2. How do we identify our data
3. How do we communicate between our services
42. @jeppec
1. How do we split our data
Data must be collected in pieces called aggregates.
These aggregates should be limited in size (but not smaller), so that,
after a transaction they are consistent.
Rule of thumb:
One transaction involves only one aggregate.
44. @jeppec
Aggregates
Invoice
InvoiceLine
*
Account *
What:
• Cluster coherent Entities and Value Objects, with
complex associations into Aggregates with well
defined boundaries.
• Choose one entity to be root and control access to
objects inside the boundary through the root.
Motivation:
Control invariants and consistency through the aggregate root.
Ensuring consistency & transactional boundaries for Distributed scenarios!
Root
*
*
45. @jeppec
2. How do we identify our data
According to Pat Helland we need to be able to uniquely identify each
Aggregate using an ID.
• This ID will usually a UUID/GUID
{21EC2020-3AEA-4069-A2DD-08002B30309D}
2122 (approximately 5.3×1036) combinations
47. @jeppec
Services/Bounded Contexts and Aggregates
Order
Product
Customer
customerId
…
Order
orderId
customerId
…
OrderLine
orderId
productId
quantity
price
ProductCategory
productCategoryId
…
Product
productId
productCategoryId
name
tag
...
48. @jeppec
3. How do we communicate between our services
What do we do when our process involves more than
one aggregate and therefore likely more than one
service?
49. @jeppec
Synchronous calls are the crystal meth of programming
At first you make good progress but then the sheer horror
becomes evident when you realise the scalability limitations
and how the brittleness holds back both performance and
development flexibility. By then it is too late to save.
http://www.infoq.com/news/2014/10/thompson-reactive-manifesto-2
We need the reactive properties and then apply protocols
for the message interactions. Without considering the
protocols of interaction this world of micro-services will
become a coordination nightmare.
Martin Thompson
51. @jeppec
Coupling matrix*
* Modified version of Ian Robinson’s matrix: http://iansrobinson.com/2009/04/27/temporal-and-behavioural-coupling/
Behavioral
coupling
Temporal
coupling
Low High
Low
High
Reactive/
Event oriented
Command oriented
Emergency services Distributed 3 layer
52. @jeppec
We need to change focus from short
technical transactions
To long running business transactions supporting
business processes
53. @jeppec
Using Business Events to drive Business Processes
Order Service
Shipping
Billing
Sales
Customers
MessageChannel
Online Ordering System
Web Shop
(Composite UI)
Inventory Service
Shipping Service
Order
Accepted
AcceptOrder
The sales
fulfillment
processing can
now begin…
54. @jeppec
Events
An Event is non-prescriptive of what should happen in other parts of the system.
An event will typically be published to multiple consumers/subscribers:
• The publisher of the event does not know who the subscribers are
• And the publisher doesn’t know what the subscribers intend to do with the event
Events always carry a name in its past-tense form:
OrderWasAccepted
OrderHasShipped
CustomerWasReimbursed
“An Event describes something that HAS happened”
55. @jeppec
Push model
• Event based integration follows a push based model that breaks
temporal coupling and avoids cascading failures
• Events can be exchanged between services over a message channel
(that can be implemented using a push or pull protocol)
Sender
Address Changed Event
Receiver
Address Changed Event
Channel
Asynchronous Communication – A.k.a. Messaging
56. @jeppec
Smart pipes and “dumb” endpoints – Push protocol
Service X
Publish
Topic
Data and flow direction
Message infrastructure
(e.g. Kafka, RabbitMQ, QBus)
Service Z
Subscribe
Service Y
Subscribe
Service M
Subscribe
57. @jeppec
Service X
Publish
Service Z
Consume
Service Y
Consume
Service M
Consume
Atom File based Feed
generator
Oldest
Feed
Older
Feed
Old
Feed
Feed
Head Previous feed link
HTTPEndpoint
Next feed link
Next feed link
Previous feed link
HTTP Reverse
Proxy
HTTP Reverse
Proxy
Cache
Cache
Atom Pub Feed
as a JSON/XML
file
Dumb pipes and smart endpoints (Pull Protocol)
Data and flow direction
60. @jeppec
Different uses for Events
• Master data management and Data duplication
• Data replication / migration
• Notification
• Service autonomy and Loosely coupled workflows/business processes
across Services
• UI component integration
64. @jeppec
System A
Update Customer
Contact Info
Update
Customer
ContactInfo
Process
”UpdateCustomerContactInfo”
command
Event Publisher
”CustomerContactInfoUpdated” Event
Customer View
Customer
local/cached replica
System D
BI/And other parties
System B
Customer Master
65. @jeppec
Event channel based migration
New UI Old UI
Command Action
SQL
D
E
<<Read replica>>
C
Publishes Events
Event Publisher Channel
SQL
A
B
C
66. @jeppec
Example of Event based notification
TrainPositionChanged
TrainStopped
TrainStarted
…
Every 5 ms.
Subscriber A
Subscriber B
Subscriber C
68. @jeppec
Eventual consistency
• Consistency is with each Service
• Eventual consistency is between Services
• Like in the real world
Sales Invoicing
Inventory Shipping
Order
Accepted
Invoice Customer
Checks Inventory for availability Books truck driver
Order
Packaged
Fetch Package from Inventory
Customer
Invoiced
71. @jeppec
Choreographed Event Driven Processes
Sales Service
Order
Accepted
Billing Service
Order Fulfilment
(Saga/
Process-Manager)
Shipping Service
Online Ordering System
MessageChannel(e.g.aTopic)
Order
Accepted
Order
Accepted
Customer
Billed
Customer
Billed
Order
Approved
Order
Approved
Works as a Finite
State Machine
(WorkFlow)
handling the life
cycle of Shipping and
thereby forms a very
central new
Aggregate in the
System
72. @jeppec
Process Managers
• Process Managers are essential to the coordination and
monitoring of long running business
processes/transactions
• They work as a Finite State Machines (WorkFlow) which
handling the life cycle of Process (e.g. Shipping an Order)
and thereby forms a very central new Aggregate in the
System
• They can include manual steps/person intervention
• Sometimes these Process Managers belong naturally
within a specific Business capability and other times they
are truly and thing by themselves and often form new
business capabilities that way
Many companies derive their competitive advantages from their Processes.
A Process Manager allows you coordinate Business Processes on the basis of Events
74. @jeppec
Choreographed Event Driven Processes
Order Service
Order
Accepted
Inventory Service
Shipping Service
Online Ordering System
MessageChannel(e.g.aTopic)
Order
Accepted
Inventory
Products
Reserved
Inventory
Products
Reserved
Order Ready
For
Shipping
Order
Ready For
Shipping
75. @jeppec
Accept Order flow
public class OrderService {
public void handle(AcceptOrder cmd) {
orderRepository.add(new Order(cmd.orderId,
cmd.orderLines));
publish(new OrderAccepted(
cmd.orderId,
cmd.orderLines.toMap(OrderLine::productId,
OrderLine::quantity))
);
}
76. @jeppec
Inventory flow
public class InventoryService {
public void on(OrderAccepted e) {
List<ProductId> productIdsOutOfStock = reserveProductsForOrder(e.orderId,
e.productsToReserve);
if (productIdsOutOfStock.isEmpty()) {
publish(new InventoryProductsReserved(e.orderId, e.productsToReserve));
} else {
publish(new InventoryProductsOutOfStock(e.orderId, e.productsToReserve,
productIdsOutOfStock));
}
}
77. @jeppec
Message Handling and Idempotence
public class OrderShippingProcess {
private void on(OrderPaid orderPaid, ProductsReserved productsReserved) {
ShippingDetails shippingDetails = getShippingDetailsForOrder(orderPaid.orderId);
….
printShippingLabel(orderPaid.orderId, shippingDetails.address);
}
…
} Must also be idempotent
78. @jeppec
There are only two hard
problems in distributed
systems
2. Exactly Once Delivery
1. Guaranteed Order of Messages
2. Exactly Once Delivery
@mathiasverraes
79. @jeppec
Things are not quite the same
In a distributed systems the order in which messages arrive is not
guaranteed
In a distributed systems message delivery can and will fail!
Messages can depending on guarantees be delivered:
• At Most Once – If you don’t care about loosing messages
• Page visits
• Ad views
• Other types of notifications
• Exactly Once
• Not really possible
• At Least Once
• For everything else – which is why:
Everything that can handle messages must be built with idempotency in mind!
80. @jeppec
Event coordination
• Do NOT copy data from incoming event to outgoing event – instead use
Event coordination from the next slide
Service C Event C
Data:
X
Data: Y
Data:
C, Y
Service D
This form of data copying from incoming
event to outgoing event is prohibited
81. @jeppec
Event coordination continued
• Rule: If Service D also needs data from Event B, then Service D should
also listen for Event B instead of having Service C copy data from Event
B to Event C
Service C Event C
Data:
X
Data: Y
Data:
C
Service
D
Data: Y
82. @jeppec
What should our Events look like?
• Keep Events Small
• Only include relevant metadata (such as sequence) and business data
• If possible, don’t include unnecessary id’s for aggregates in other services
• Think Inverse relationships based on what feels most natural
• Order doesn’t need to know the Shipping Id, but Shipping can know the Order Id
• Anchor Events to Time
• Include information about how long you can trust the Event’s change
• E.g. a price is valid until 8pm tomorrow night
• Reveal the intention and time anchoring as part of the Events name
84. @jeppec
Avoid using Events for generic services
When ever a new Service is introduced
the Generic Service (X) needs to be changed.
This creates an unnecessary degree of coupling
Service
A
Service
B
Service
C
Service X
Service
D
Event X
85. @jeppec
Use Commands for generic services
Instead of having Service X listen for MANY different events, let
Service X expose a command interface that other services can
use instead
Service
A
Service
B
Service
C
Service X
Service
D
Event X
86. @jeppec
When to prefer a Pull based model?
• You want to have Authority (as opposed to Autonomy)
• Such as with a bank account
• GDPR compliance
• So sensitive data is only stored in one place (avoid data duplication)
• Orchestration of processes
• Sometimes events result in too much ceremony
• You have large amounts of data and your queries only involve a small set of
this data
• Example a Google search
• Most UI to backend interactions
• Loading data from the backend
• Pressing a button to send a Query or issue a Command
94. @jeppec
Service
Service - 1
Service - 2Service - 2
Service - 3
Service - 3Service - 4
Broker
Broker
(Kafka,
RabbitMQ,
JMS)
Service - 1Service - 1
Service - 1
Service - 2
Service - 2
Service - 3
Service - 3
Service - 4
Service - 4
Service - 4
95. @jeppec
Service
Service - 1
Service - 1Service - 1
Service - 1
Service - 2
Service - 2
Service - 2
Service - 2
Service - 3
Service - 3
Service - 3
Service - 3
Service - 4
Service - 4
Service - 4
Service - 4
QBus
97. @jeppec
Topics
Bus features
• Decouples publisher from subscribers
• Provides temporal decoupling
• If a subscriber is unavailable it will receive its messages when it comes
online
Service - 4
Service - 1
Service - 3
99. @jeppec
Topics
Bus features
But how do we handle:
• Coding errors in Subscribers?
• New Subscribers that didn’t exist when the events were originally
published?
Service - 4
Service - 1
Service - 3
104. @jeppec
Commands & Events
Commands mutate Write model state
which results in
one or more Events being published.
Command Event(s)
AcceptOrder OrderAccepted
ShipOrder OrderShipped
AddComment CommentAdded
QuarantineReview ReviewQuarantined
UnquarantineReview ReviewUnquarantined
107. @jeppec
Read model
Read model
Commands, Events and Query Models
Events
UI
Write modelView models
”AcceptOrder”
command
”OrderAccepted”
event
”Find all Accepted Orders”
Query
Commands are Imperative: DoStuff
Events are Past tense: StuffDone
110. CRUD
There’s no reason to delete data or update data.
We only need to append and read Events from our Event Store
111. @jeppec
Event Replaying
Type Aggregate
Identifier
Sequence
Number
Timestamp Event
Identifier
EventType SerializedEvent
Order 14237 0 2014-01-06 7:39 {Guid-1} OrderCreated <serialized event>…
Order 14237 1 2014-01-06 7:40 {Guid-2} ProductAdded <serialized event>…
Order 14237 2 2014-01-06 7:41 {Guid-3} ProductAdded <serialized event>…
Order 14237 3 2014-01-06 7:45 {Guid-4} ProductRemoved <serialized event>…
Order 14237 4 2014-01-06 7:46 {Guid-5} ProductAdded <serialized event>…
Order 14237 5 2014-01-06 7:50 {Guid-6} OrderAccepted <serialized event>…
Order
Accepted: true
Orderline
Orderline
112. @jeppec
Full CQRS with EventSourcing
UI Domain
Event
Store
Commands – Change data
Commands Events
SQL DB Document DB Graph DB
UI Data
Queries – Ask for data
Events
Query Build
Our single source
of truth
113. @jeppec
And we can use the
EventStore to support event
replays for new subscribers
114. @jeppec
Client handled subscriptions
• Highly resilient pattern for an Event Driven Architecture that’s backed by
Event-Sourced services
• In this model the publisher of the Events is responsible for the durability of
all its Events, typically to an EventStore/EventLog.
• Each client (subscriber) maintains durable information of the last event it has
received from each publisher.
• When ever the client starts up it makes a subscription to the publisher
where it states from which point in time it wants events published/streamed
to it.
• This effectively means that publisher can remain simple and the client
(subscriber) can remain simple and we don’t need additional sophisticated
broker infrastructure such as Kafka+ZooKeeper.
115. @jeppec
Client handled subscriptions
Publisher
Subscriber A
Local storage
EventStore
Subscriber B
Local storage
Topic
Subscription
Topic
Subscription
TopicSubscriptionHandler
TopicSubscriptionHandler
EventEvent
Event Event
EventBus
Event
Event
Distributed Event Bus,
which ensures that
live events published
on an AC node in the
cluster can be seen
by all AC’s of the
same type
Singe Instance
Subscriber, which
ensures that only
one instance of
Subscriber B has
an active
subscription(s).
Other instances of
the same
subscriber are
hot-standby
<<Topic Subscriber>>
Customer_Service:Some_Ac:OrderEvents
<<Topic Publisher>>
Sales_Service:OrderEvents
116. @jeppec
Topics
Bus features
Service - 4
Service - 1
Service - 3
bus.registerReplayableTopicPublisher(InternalPricingEvents.TOPIC_NAME,
replayFromAggregate(Pricing.class)
.dispatchAggregateEventsOfType(
InternalPricingEvents.class
)
);
bus.subscribeTopic(SERVICE_AC_ID.topicSubscriber(”Pricing"),
InternalPricingEvents.TOPIC_NAME,
new PricingTopicSubscription(bus));
118. @jeppec
Topics
Bus features
Features:
• The Bus provides automatic and durable handling of Redelivery in case of message handling failure
through a Redelivery Policy
• Exponential Back-off
• Max retries
• Dead letter/Error Queue
• Support for resubscription at any point in the timeline of an Event Stream
• Automatically tracking of resubscription points - aka. resubscribe at last tracked point
Service - 4
Service - 1
Service - 3
122. @jeppec
Bus features
Features:
• Support for sending a message to a single consumer
• Default pattern is Competing Consumers
• The bus provides durability for all messages sent on a Queue
• The Bus provider automatic and durable handling of Redelivery in case of message handling failure
through a Redelivery Policy
• Exponential Backoff
• Max retries
• Dead letter/Error Queue
Durable Queues
124. @jeppec
Bus features
Notifications:
• Durable notifications with failover support
• bus.notify(notificationQueue, notificationMessage)
Notifications
Distributed
Broadcast
Broadcast:
• Broadcast a Message to all Services in the cluster
• Broadcast a Message to a UI client (all, per user, per privilege)
125. @jeppec
Bus features
Single Instance Task:
• Ensures that only one Active instance of a Task is active in the cluster at one time
• Other tasks of the same type are in hot standby
• Used to e.g. group multiple subscribers, to ensure that all subscribers are either all
active or standby.
• Used by our ViewRepositories
Distributed
SingleInstanceTask
bus.createClusterSingleInstanceTask(”MyTask",
new MyTask ()); // Where MyTask implements Lifecycle
126. @jeppec
Bus features
Process Manager
• Defines durable business processes
as a flow of Events
Sagas
Process Manager
Sales Service
Order Accepted
Billing Service
Order Fulfilment
(Saga/
Process-Manager)
Shipping Service
MessageChannel(e.g.aTopic)
Order Accepted
Order Accepted
Customer Billed
Customer Billed
Order Approved
Order Approved
127. @jeppec
Application features
Workflow Manager:
• Defines the Tasks that required human intervention, such as:
• Approvals (e.g. Contract approval)
• Assistance/Help with a business problem
• Incident handling (e.g. a technical problem identified by a developer)
• Authorization (e.g. request manager approval)
• Reminders
• Common tasks supported: Claiming Tasks, Escalating Tasks, Completing Tasks
Workflow Manager
128. @jeppec
Event Monitoring
• One of the challenges with have Event based systems is to keep track
of where events are in the flow
• Why isn’t this system doing this?
• Did events go into an Error Queue?
• How can we reprocess them?
• Or why isn’t this happening?
• In general it’s the same issues we see with asynchronous systems and
integrations in general.
• The good thing about using Events is that they carry semantics and are not RPC
in hiding
129. @jeppec
Event Monitoring
Command, Document and Event messages all contain the following
data:
• Timestamp
• Unique message Id
• Correlation Id
• Originating system (IP address, name, etc.)
• …
Event messages also need to describe the order in which the event
occurred. This can be implemented in many ways including:
• Ordering sequence number
• Event vectors
• Vector clocks
• Timestamp
• Etc.
130. @jeppec
Event Monitoring
• We use the correlation id to be able to later correlate log
messages from different services
If both System A, B and C share the same technical infrastructure (e.g. database) and reside in the same memory space they can share a local transaction. In this case we’re not bound by the laws of distributed computing and everything is easy because the transaction manager will solve all our problems.
Synchronous RPC is the crack cocaine of distributed programming
Locking and scaling: If it takes 200 ms to carry out an operation that uses scaling, the system can maximum handle 5 concurrent users
Fragility: 2,3,4 .... Phase Commit - 2PC theory concludes by saying "and this does not work in reality" - in case of error (eg. Due to timeout while waiting for a resource commit phase) you always end up with having to decide what two do "Halt and manual recovery" or guess whether it was good or bad!
There are besides timeouts a big problem. At worst, timeouts last very long!
See http://cqrs.wordpress.com/documents/task-based-ui/ for more
CRUD = Create Read Update Delete
There’s no intent in a Save button.
In the CRUD screen you can combine multiple usecases into one (edit title, assign to user, complete, change description).
In the Task based example you focus on one usecase at a time (which can be a composite/process related usecase) and ensure that the user interface reflects the users mental model (has relevant information for the user to complete the task) and captures the users intent.s
Aggregates reference each other by Id only in a scalable system
An Aggregate Root is more likely to match a Use Case boundary than any model structure
Who informs the customer?
What happens if Billing fails or times out?
This minimizes the number of events that Service X (in this example) needs to understand and know. Here we trade data coupling for functional coupling
This minimizes the number of events that Service X needs to understand and know. Here we trade data coupling for functional coupling
It’s a choice between Loose Coupling and High Cohesion. If Service X needs to understand too MANY Events from other services, then his cohesion becomes lower and thereby the coupling gets higher
Our read model is structurally oriented (the users perspective on the data in the given context)
The write model is behavioural oriented (transaction and consistency boundary oriented)
From http://www.codeagle.com/blog/2010/03/10/275/
EventStore: Why store only the current state of the system. Mature industries store transactions and calculate the current state