SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Downloaden Sie, um offline zu lesen
Building a Highly Scalable 
File Processing Platform 
with NServiceBus 
Sam Martindale
AI 
Introduction 
2 
Sam Martindale 
Architecting Innovation 
14+ Years Development Experience 
Co-Founder & Managing Partner, AI 
NServiceBus adopter since v1.x
AI 
3 
The Problem
AI 
The Problem 
4 
How do we move this data into our systems? 
External Data Files Internal Systems
AI 
The Problem 
5 
Automated pickup of many file types 
Fixed Width
AI 
The Problem 
6 
Record Level Logic and Workflows 
New Account 
Account Payment 
Loan Application 
Account Payment 
Overdue Credit Account
AI 
The Problem 
7 
Many Integration Points
AI 
The Problem 
8 
Guaranteed Delivery
AI 
The Problem 
9 
Scalability
AI 
10 
Why NServiceBus?
AI 
Evaluated Technologies ! 
Sql Server Integration Services (SSIS) 
! 
Workflow Integration Difficulty 
Systems Integration Difficulty 
Extensibility 
Not just ETL 
! 
! 
! 
! 
11
AI 
Evaluated Technologies 
12 
BizTalk/Sterling Commerce/Axway/Others 
! 
Licensing Costs 
Scalability Costs 
Difficult to “extend” functionality easily 
Requires development “specialists” 
! 
! 
! 
! 
! 
!
AI 
Evaluated Technologies 
13 
NServiceBus 
! 
Easy & inexpensive to scale 
! 
Easy to integrate with existing systems 
! 
Provides Message Durability 
! 
Great API for experienced .NET developers
AI 
14 
System Design
AI 
The System 
15 
Alerts Endpoint 
Processing Endpoint 
Scheduler Endpoint 
Parsing Endpoint 
File Management 
Endpoint 
Api Endpoint 
FileRetrieval Endpoint
Components 
Scheduler 
Manages scheduled “jobs” for picking up client files from FTP, SFTP, 
FileShare, etc 
Alerts Endpoint 
Processing Endpoint 
Scheduler Endpoint 
Parsing Endpoint 
File Management 
Endpoint 
Api Endpoint 
FileRetrieval Endpoint 
16 
Why we needed it: 
! 
1. Needed the ability to schedule file pickups dynamically
Components 
FileRetrieval 
Performs the actual file pickup and decryption at the request of the 
scheduler 
Alerts Endpoint 
Processing Endpoint 
Scheduler Endpoint 
Parsing Endpoint 
File Management 
Endpoint 
Api Endpoint 
FileRetrieval Endpoint 
17 
Why we needed it: 
! 
1. Needed the ability to pickup files 
2. Needed the ability to decrypt files
Components 
Alerts Endpoint 
Processing Endpoint 
Scheduler Endpoint 
File Management 
Endpoint 
Api Endpoint 
FileRetrieval Endpoint 
18 
FileParsing 
Performs the parsing of the file according to the 
configured client file format and layout. Divides the 
file into logical “record sets” for processing 
Why we needed it: 
! 
Had to be able to dynamically parse any given file 
Parsing Endpoint
Components 
Processor 
Processes the record sets sent by the parser component by 
performing calculations and persisting records to the database 
Alerts Endpoint 
Processing Endpoint 
Scheduler Endpoint 
Parsing Endpoint 
File Management 
Endpoint 
Api Endpoint 
FileRetrieval Endpoint 
19 
Why we needed it: 
! 
Needed the ability to persist data 
Serves as an extension point for current/new workflows
Components 
FileManagement 
Tracks the completion of the file processing in a saga by listening to 
various parsing events 
Alerts Endpoint 
Processing Endpoint 
Scheduler Endpoint 
Parsing Endpoint 
File Management 
Endpoint 
Api Endpoint 
FileRetrieval Endpoint 
20 
Why we needed it: 
! 
Had to keep track of the overall status for file processing 
Needed the ability to monitor for failures or partial failures
Components 
Alerts 
Receives events from other components, sending notifications and 
emails to the end users for system monitoring and alerting 
Alerts Endpoint 
Processing Endpoint 
Scheduler Endpoint 
Parsing Endpoint 
File Management 
Endpoint 
Api Endpoint 
FileRetrieval Endpoint 
21 
Why we needed it: 
! 
Needed the ability to notify users of various events
Components 
Alerts Endpoint 
Processing Endpoint 
Scheduler Endpoint 
Parsing Endpoint 
File Management 
Endpoint 
Api Endpoint 
FileRetrieval Endpoint 
22 
WebApi 
WebApi component with SignalR. Delivers real time events and 
updates to the web front end 
Why we needed it: 
! 
Needed to notify users of created alerts in real-time 
Needed to allow users to quickly onboard clients 
!
AI 
The System 
23 
Alerts Endpoint 
Processing Endpoint 
Scheduler Endpoint 
Parsing Endpoint 
File Management 
Endpoint 
Api Endpoint 
FileRetrieval Endpoint
AI 
24 
What did we learn along the way?
AI 
Division of Labor 
25 
Problem 
! 
Monolithic Endpoints 
A naive implementation of our service placed far too many 
handlers within the same endpoint, making it impossible to 
prioritize messages and scale portions of the system 
! 
Api 
Scheduler Alerts 
Everything
AI 
Division of Labor 
26 
Resolution 
! 
A Service is NOT an endpoint 
In order to ensure our success, we had to split the system into 
many components, each with its own distinct responsibilities 
(and queues!) 
! 
Granular Scaling 
By splitting into several disparate components, we were able to 
meet our scalability needs more appropriately. (e.g. scaling 
only the parsing endpoint)
AI 
Saga Responsibilities 
27 
Problem 
! 
Scaling the File Processing Saga 
Our initial (read: naive) implementation was responsible for 
far too much business logic, making it difficult to scale
AI 
Saga Responsibilities 
28 
Resolution 
! 
Keep it Simple! 
Sagas should be as clean and tight as possible 
! 
Scaling Issues 
The more complicated the saga, the harder they are to scale 
! 
“Observer" Implementation 
In our case, we found that a “passive” saga responding to events and simply 
keeping track of state was far easier to maintain and scale
AI 
Saga Methodology 
29 
Problem 
! 
Saga Contention 
Our initial (read: naive) implementation responded to too many 
events, creating a large degree of contention and a high number 
of rollbacks 
Processing 
Endpoint 
File Management 
Endpoint 
3 
3 
90 
32 
13 
2
AI 
30 
Resolution 
! 
“Check” Pattern 
In order to reduce contention, we implemented a “check” 
pattern using timeouts within the saga 
Processing 
Endpoint 
File Management 
Endpoint 
3 
90 
32 
13 
2 
Saga Methodology
AI 
Deployment Automation 
31 
Problem 
! 
Deployment Challenges Hindering Proper Design 
The team (and client) were initially skeptical of breaking the 
system into many disparate deployable components, due to the 
increased difficulty of deployment 
! 
! 
Svc 1 
Svc 2 
Svc 4 
Svc 3 
Svc 4 
Svc 5 
Svc 1 
Svc 4 
Svc 5 
Svc 1 
Svc 2 
Svc 4 
Svc 1 
Svc 2 
Svc 3 
Svc 1 
Svc 3 
Svc 5
AI 
Deployment Automation 
Resolution 
! 
Simple Automation 
By leveraging the NServiceBus.Powershell bits along with our own 
extended Powershell scripts, we were able to automate the 
deployment of all of our NServiceBus projects 
32 
! 
• Configuration Transformations 
• Distributed Deployments 
• Backup Strategy
AI 
Firewalls, Servers & Failure, Oh My! 
33 
Problem 
! 
Deploying Into New Environments is Hard! 
Misconfiguration, network issues, security issues… All these make 
moving into a new environment cumbersome and error prone!
AI 
Firewalls, Servers & Failure, Oh My! 
34 
Resolution 
! 
ServicePulse, ServiceControl & Custom Checks 
! 
• MSDTC Firewall Checks 
• RavenDB Firewall Checks 
• FTP Accessibility Checks 
• Databus File Share Accessibility Checks
AI 
35 
The Result?
AI 
The Result 
36 
Business Impact 
! 
Faster Processing Times 
> 10K records/sec parsed and processed, per worker machine 
! 
Happier Users 
Full system visibility and no lost data 
! 
Happier Developers 
Clean, maintainable system 
! 
Happier Executives 
Faster onboarding times for new clients
Thank You

Weitere ähnliche Inhalte

Was ist angesagt?

Microsoft Offical Course 20410C_06
Microsoft Offical Course 20410C_06Microsoft Offical Course 20410C_06
Microsoft Offical Course 20410C_06
gameaxt
 
Microsoft Offical Course 20410C_05
Microsoft Offical Course 20410C_05Microsoft Offical Course 20410C_05
Microsoft Offical Course 20410C_05
gameaxt
 
Microsoft Offical Course 20410C_08
Microsoft Offical Course 20410C_08Microsoft Offical Course 20410C_08
Microsoft Offical Course 20410C_08
gameaxt
 

Was ist angesagt? (20)

Consumer offset management in Kafka
Consumer offset management in KafkaConsumer offset management in Kafka
Consumer offset management in Kafka
 
Planning and Completing an IBM Connections Upgrade
Planning and Completing an IBM Connections UpgradePlanning and Completing an IBM Connections Upgrade
Planning and Completing an IBM Connections Upgrade
 
Decoupling Decisions with Apache Kafka
Decoupling Decisions with Apache KafkaDecoupling Decisions with Apache Kafka
Decoupling Decisions with Apache Kafka
 
An Introduction To Docker
An Introduction To DockerAn Introduction To Docker
An Introduction To Docker
 
Microsoft Offical Course 20410C_06
Microsoft Offical Course 20410C_06Microsoft Offical Course 20410C_06
Microsoft Offical Course 20410C_06
 
Kafka at scale facebook israel
Kafka at scale   facebook israelKafka at scale   facebook israel
Kafka at scale facebook israel
 
Yashi dealer meeting settembre 2016 windows server 2016 microsoft italia
Yashi dealer meeting settembre 2016 windows server 2016 microsoft italiaYashi dealer meeting settembre 2016 windows server 2016 microsoft italia
Yashi dealer meeting settembre 2016 windows server 2016 microsoft italia
 
Microsoft Offical Course 20410C_05
Microsoft Offical Course 20410C_05Microsoft Offical Course 20410C_05
Microsoft Offical Course 20410C_05
 
MCSA 70-412 Chapter 04
MCSA 70-412 Chapter 04MCSA 70-412 Chapter 04
MCSA 70-412 Chapter 04
 
KafkaConsumer - Decoupling Consumption and Processing for Better Resource Uti...
KafkaConsumer - Decoupling Consumption and Processing for Better Resource Uti...KafkaConsumer - Decoupling Consumption and Processing for Better Resource Uti...
KafkaConsumer - Decoupling Consumption and Processing for Better Resource Uti...
 
Introduction to Kafka
Introduction to KafkaIntroduction to Kafka
Introduction to Kafka
 
Kafka at half the price with JBOD setup
Kafka at half the price with JBOD setupKafka at half the price with JBOD setup
Kafka at half the price with JBOD setup
 
Building Stream Infrastructure across Multiple Data Centers with Apache Kafka
Building Stream Infrastructure across Multiple Data Centers with Apache KafkaBuilding Stream Infrastructure across Multiple Data Centers with Apache Kafka
Building Stream Infrastructure across Multiple Data Centers with Apache Kafka
 
Kafka at Peak Performance
Kafka at Peak PerformanceKafka at Peak Performance
Kafka at Peak Performance
 
Microsoft Offical Course 20410C_08
Microsoft Offical Course 20410C_08Microsoft Offical Course 20410C_08
Microsoft Offical Course 20410C_08
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
 
MCSA 70-412 Chapter 06
MCSA 70-412 Chapter 06MCSA 70-412 Chapter 06
MCSA 70-412 Chapter 06
 
MCSA 70-412 Chapter 05
MCSA 70-412 Chapter 05MCSA 70-412 Chapter 05
MCSA 70-412 Chapter 05
 
Db2 family and v11.1.4.4
Db2 family and v11.1.4.4Db2 family and v11.1.4.4
Db2 family and v11.1.4.4
 
MariaDB High Availability Webinar
MariaDB High Availability WebinarMariaDB High Availability Webinar
MariaDB High Availability Webinar
 

Andere mochten auch

SOA with NServiceBus 20130124
SOA with NServiceBus 20130124SOA with NServiceBus 20130124
SOA with NServiceBus 20130124
Sean Farmar
 
Connection Machine
Connection MachineConnection Machine
Connection Machine
butest
 
NServiceBus Alt.Net 20100511
NServiceBus Alt.Net 20100511NServiceBus Alt.Net 20100511
NServiceBus Alt.Net 20100511
andreasohlund
 
Agile days 2010 человеческий фактор и agile
Agile days 2010 человеческий фактор и agileAgile days 2010 человеческий фактор и agile
Agile days 2010 человеческий фактор и agile
Nikita Filippov
 
1.[d2 오픈세미나]on thearchitectureofsocialnetworkservice
1.[d2 오픈세미나]on thearchitectureofsocialnetworkservice1.[d2 오픈세미나]on thearchitectureofsocialnetworkservice
1.[d2 오픈세미나]on thearchitectureofsocialnetworkservice
NAVER D2
 

Andere mochten auch (20)

Embracing Nservicebus Best Practices
Embracing Nservicebus Best PracticesEmbracing Nservicebus Best Practices
Embracing Nservicebus Best Practices
 
SOA with NServiceBus 20130124
SOA with NServiceBus 20130124SOA with NServiceBus 20130124
SOA with NServiceBus 20130124
 
Accesso ai dati con Azure Data Platform
Accesso ai dati con Azure Data PlatformAccesso ai dati con Azure Data Platform
Accesso ai dati con Azure Data Platform
 
Connection Machine
Connection MachineConnection Machine
Connection Machine
 
NServiceBus Alt.Net 20100511
NServiceBus Alt.Net 20100511NServiceBus Alt.Net 20100511
NServiceBus Alt.Net 20100511
 
Making communications across boundaries simple with NServiceBus
Making communications across boundaries simple with NServiceBusMaking communications across boundaries simple with NServiceBus
Making communications across boundaries simple with NServiceBus
 
161004 battle ai
161004 battle ai161004 battle ai
161004 battle ai
 
AI, A New Computing Model
AI, A New Computing ModelAI, A New Computing Model
AI, A New Computing Model
 
Real time event feeds with NServiceBus and SignalR
Real time event feeds with NServiceBus and SignalRReal time event feeds with NServiceBus and SignalR
Real time event feeds with NServiceBus and SignalR
 
Ai 150 architecture
Ai 150 architectureAi 150 architecture
Ai 150 architecture
 
[giip] A.I. Infrastructure Advisor (인공지능 인프라 어드바이저)
[giip] A.I. Infrastructure Advisor (인공지능 인프라 어드바이저)[giip] A.I. Infrastructure Advisor (인공지능 인프라 어드바이저)
[giip] A.I. Infrastructure Advisor (인공지능 인프라 어드바이저)
 
Agile days 2010 человеческий фактор и agile
Agile days 2010 человеческий фактор и agileAgile days 2010 человеческий фактор и agile
Agile days 2010 человеческий фактор и agile
 
H2O Open New York - Keynote, Sri Ambati, CEO H2O.ai
H2O Open New York - Keynote, Sri Ambati, CEO H2O.aiH2O Open New York - Keynote, Sri Ambati, CEO H2O.ai
H2O Open New York - Keynote, Sri Ambati, CEO H2O.ai
 
Message Oriented Architecture using NServiceBus
Message Oriented Architecture using NServiceBusMessage Oriented Architecture using NServiceBus
Message Oriented Architecture using NServiceBus
 
AI in Healthcare 2017
AI in Healthcare 2017AI in Healthcare 2017
AI in Healthcare 2017
 
Is Microservices SOA Done Right?
Is Microservices SOA Done Right?Is Microservices SOA Done Right?
Is Microservices SOA Done Right?
 
3.[d2 오픈세미나]분산시스템 개발 및 교훈 n base arc
3.[d2 오픈세미나]분산시스템 개발 및 교훈 n base arc3.[d2 오픈세미나]분산시스템 개발 및 교훈 n base arc
3.[d2 오픈세미나]분산시스템 개발 및 교훈 n base arc
 
1.[d2 오픈세미나]on thearchitectureofsocialnetworkservice
1.[d2 오픈세미나]on thearchitectureofsocialnetworkservice1.[d2 오픈세미나]on thearchitectureofsocialnetworkservice
1.[d2 오픈세미나]on thearchitectureofsocialnetworkservice
 
4.[d2 오픈세미나]LINE Rangers 게임 클라이언트/서버 아키텍쳐
4.[d2 오픈세미나]LINE Rangers 게임 클라이언트/서버 아키텍쳐4.[d2 오픈세미나]LINE Rangers 게임 클라이언트/서버 아키텍쳐
4.[d2 오픈세미나]LINE Rangers 게임 클라이언트/서버 아키텍쳐
 
Pi ai landscape
Pi ai landscapePi ai landscape
Pi ai landscape
 

Ähnlich wie Building a Highly Scalable File Processing Platform with NServiceBus NSBCon by Sam Martindale

DOs and DONTs on the way to 10M users
DOs and DONTs on the way to 10M usersDOs and DONTs on the way to 10M users
DOs and DONTs on the way to 10M users
Yoav Avrahami
 
exoscale at the CloudStack User Group London - June 26th 2014
exoscale at the CloudStack User Group London - June 26th 2014exoscale at the CloudStack User Group London - June 26th 2014
exoscale at the CloudStack User Group London - June 26th 2014
Antoine COETSIER
 
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
QAware GmbH
 

Ähnlich wie Building a Highly Scalable File Processing Platform with NServiceBus NSBCon by Sam Martindale (20)

Honorable Squires
Honorable SquiresHonorable Squires
Honorable Squires
 
DOs and DONTs on the way to 10M users
DOs and DONTs on the way to 10M usersDOs and DONTs on the way to 10M users
DOs and DONTs on the way to 10M users
 
Patterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to KubernetesPatterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to Kubernetes
 
Patterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to KubernetesPatterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to Kubernetes
 
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel LavoieSpring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
 
Continuous Localisation On A Massive Scale
Continuous Localisation On A Massive ScaleContinuous Localisation On A Massive Scale
Continuous Localisation On A Massive Scale
 
JBoss BPM Suite 6 Tech labs
JBoss BPM Suite 6 Tech labsJBoss BPM Suite 6 Tech labs
JBoss BPM Suite 6 Tech labs
 
Siebel monitoring
Siebel monitoringSiebel monitoring
Siebel monitoring
 
Languages don't matter anymore!
Languages don't matter anymore!Languages don't matter anymore!
Languages don't matter anymore!
 
How Hewlett Packard Enterprise Gets Real with IoT Analytics
How Hewlett Packard Enterprise Gets Real with IoT AnalyticsHow Hewlett Packard Enterprise Gets Real with IoT Analytics
How Hewlett Packard Enterprise Gets Real with IoT Analytics
 
exoscale at the CloudStack User Group London - June 26th 2014
exoscale at the CloudStack User Group London - June 26th 2014exoscale at the CloudStack User Group London - June 26th 2014
exoscale at the CloudStack User Group London - June 26th 2014
 
AWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for DevelopersAWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for Developers
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
 
Broadcast Music Inc - Release Automation Rockstars!
Broadcast Music Inc - Release Automation Rockstars!Broadcast Music Inc - Release Automation Rockstars!
Broadcast Music Inc - Release Automation Rockstars!
 
Agentless System Crawler - InterConnect 2016
Agentless System Crawler - InterConnect 2016Agentless System Crawler - InterConnect 2016
Agentless System Crawler - InterConnect 2016
 
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...
 
Spring and Pivotal Application Service - SpringOne Tour - Boston
Spring and Pivotal Application Service - SpringOne Tour - BostonSpring and Pivotal Application Service - SpringOne Tour - Boston
Spring and Pivotal Application Service - SpringOne Tour - Boston
 
Azure IaaS Feb 23 2016 Let's Dev This Cloud
Azure IaaS Feb 23 2016 Let's Dev This CloudAzure IaaS Feb 23 2016 Let's Dev This Cloud
Azure IaaS Feb 23 2016 Let's Dev This Cloud
 
Puppet devops wdec
Puppet devops wdecPuppet devops wdec
Puppet devops wdec
 

Mehr von Particular Software

Mehr von Particular Software (20)

Scaling for Success: Lessons from handling peak loads on Azure with NServiceBus
Scaling for Success: Lessons from handling peak loads on Azure with NServiceBusScaling for Success: Lessons from handling peak loads on Azure with NServiceBus
Scaling for Success: Lessons from handling peak loads on Azure with NServiceBus
 
Beyond simple benchmarks—a practical guide to optimizing code
Beyond simple benchmarks—a practical guide to optimizing code Beyond simple benchmarks—a practical guide to optimizing code
Beyond simple benchmarks—a practical guide to optimizing code
 
An exception occurred - Please try again
An exception occurred - Please try againAn exception occurred - Please try again
An exception occurred - Please try again
 
Tales from the trenches creating complex distributed systems
Tales from the trenches  creating complex distributed systemsTales from the trenches  creating complex distributed systems
Tales from the trenches creating complex distributed systems
 
Got the time?
Got the time?Got the time?
Got the time?
 
Implementing outbox model-checking first
Implementing outbox   model-checking firstImplementing outbox   model-checking first
Implementing outbox model-checking first
 
Reports from the field azure functions in practice
Reports from the field   azure functions in practiceReports from the field   azure functions in practice
Reports from the field azure functions in practice
 
Finding your service boundaries - a practical guide
Finding your service boundaries - a practical guideFinding your service boundaries - a practical guide
Finding your service boundaries - a practical guide
 
Decomposing .NET Monoliths with NServiceBus and Docker
Decomposing .NET Monoliths with NServiceBus and DockerDecomposing .NET Monoliths with NServiceBus and Docker
Decomposing .NET Monoliths with NServiceBus and Docker
 
DIY Async Message Pump: Lessons from the trenches
DIY Async Message Pump: Lessons from the trenchesDIY Async Message Pump: Lessons from the trenches
DIY Async Message Pump: Lessons from the trenches
 
Share the insight of ServiceInsight
Share the insight of ServiceInsightShare the insight of ServiceInsight
Share the insight of ServiceInsight
 
What to consider when monitoring microservices
What to consider when monitoring microservicesWhat to consider when monitoring microservices
What to consider when monitoring microservices
 
Making communication across boundaries simple with Azure Service Bus
Making communication across boundaries simple with Azure Service BusMaking communication across boundaries simple with Azure Service Bus
Making communication across boundaries simple with Azure Service Bus
 
How to avoid microservice pitfalls
How to avoid microservice pitfallsHow to avoid microservice pitfalls
How to avoid microservice pitfalls
 
Connect front end to back end using SignalR and Messaging
Connect front end to back end using SignalR and MessagingConnect front end to back end using SignalR and Messaging
Connect front end to back end using SignalR and Messaging
 
Async/Await: NServiceBus v6 API Update
Async/Await: NServiceBus v6 API UpdateAsync/Await: NServiceBus v6 API Update
Async/Await: NServiceBus v6 API Update
 
Async/Await: TPL & Message Pumps
Async/Await: TPL & Message Pumps Async/Await: TPL & Message Pumps
Async/Await: TPL & Message Pumps
 
Async/Await Best Practices
Async/Await Best PracticesAsync/Await Best Practices
Async/Await Best Practices
 
Making workflow implementation easy with CQRS
Making workflow implementation easy with CQRSMaking workflow implementation easy with CQRS
Making workflow implementation easy with CQRS
 
Cqrs but different
Cqrs but differentCqrs but different
Cqrs but different
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 

Building a Highly Scalable File Processing Platform with NServiceBus NSBCon by Sam Martindale

  • 1. Building a Highly Scalable File Processing Platform with NServiceBus Sam Martindale
  • 2. AI Introduction 2 Sam Martindale Architecting Innovation 14+ Years Development Experience Co-Founder & Managing Partner, AI NServiceBus adopter since v1.x
  • 3. AI 3 The Problem
  • 4. AI The Problem 4 How do we move this data into our systems? External Data Files Internal Systems
  • 5. AI The Problem 5 Automated pickup of many file types Fixed Width
  • 6. AI The Problem 6 Record Level Logic and Workflows New Account Account Payment Loan Application Account Payment Overdue Credit Account
  • 7. AI The Problem 7 Many Integration Points
  • 8. AI The Problem 8 Guaranteed Delivery
  • 9. AI The Problem 9 Scalability
  • 10. AI 10 Why NServiceBus?
  • 11. AI Evaluated Technologies ! Sql Server Integration Services (SSIS) ! Workflow Integration Difficulty Systems Integration Difficulty Extensibility Not just ETL ! ! ! ! 11
  • 12. AI Evaluated Technologies 12 BizTalk/Sterling Commerce/Axway/Others ! Licensing Costs Scalability Costs Difficult to “extend” functionality easily Requires development “specialists” ! ! ! ! ! !
  • 13. AI Evaluated Technologies 13 NServiceBus ! Easy & inexpensive to scale ! Easy to integrate with existing systems ! Provides Message Durability ! Great API for experienced .NET developers
  • 14. AI 14 System Design
  • 15. AI The System 15 Alerts Endpoint Processing Endpoint Scheduler Endpoint Parsing Endpoint File Management Endpoint Api Endpoint FileRetrieval Endpoint
  • 16. Components Scheduler Manages scheduled “jobs” for picking up client files from FTP, SFTP, FileShare, etc Alerts Endpoint Processing Endpoint Scheduler Endpoint Parsing Endpoint File Management Endpoint Api Endpoint FileRetrieval Endpoint 16 Why we needed it: ! 1. Needed the ability to schedule file pickups dynamically
  • 17. Components FileRetrieval Performs the actual file pickup and decryption at the request of the scheduler Alerts Endpoint Processing Endpoint Scheduler Endpoint Parsing Endpoint File Management Endpoint Api Endpoint FileRetrieval Endpoint 17 Why we needed it: ! 1. Needed the ability to pickup files 2. Needed the ability to decrypt files
  • 18. Components Alerts Endpoint Processing Endpoint Scheduler Endpoint File Management Endpoint Api Endpoint FileRetrieval Endpoint 18 FileParsing Performs the parsing of the file according to the configured client file format and layout. Divides the file into logical “record sets” for processing Why we needed it: ! Had to be able to dynamically parse any given file Parsing Endpoint
  • 19. Components Processor Processes the record sets sent by the parser component by performing calculations and persisting records to the database Alerts Endpoint Processing Endpoint Scheduler Endpoint Parsing Endpoint File Management Endpoint Api Endpoint FileRetrieval Endpoint 19 Why we needed it: ! Needed the ability to persist data Serves as an extension point for current/new workflows
  • 20. Components FileManagement Tracks the completion of the file processing in a saga by listening to various parsing events Alerts Endpoint Processing Endpoint Scheduler Endpoint Parsing Endpoint File Management Endpoint Api Endpoint FileRetrieval Endpoint 20 Why we needed it: ! Had to keep track of the overall status for file processing Needed the ability to monitor for failures or partial failures
  • 21. Components Alerts Receives events from other components, sending notifications and emails to the end users for system monitoring and alerting Alerts Endpoint Processing Endpoint Scheduler Endpoint Parsing Endpoint File Management Endpoint Api Endpoint FileRetrieval Endpoint 21 Why we needed it: ! Needed the ability to notify users of various events
  • 22. Components Alerts Endpoint Processing Endpoint Scheduler Endpoint Parsing Endpoint File Management Endpoint Api Endpoint FileRetrieval Endpoint 22 WebApi WebApi component with SignalR. Delivers real time events and updates to the web front end Why we needed it: ! Needed to notify users of created alerts in real-time Needed to allow users to quickly onboard clients !
  • 23. AI The System 23 Alerts Endpoint Processing Endpoint Scheduler Endpoint Parsing Endpoint File Management Endpoint Api Endpoint FileRetrieval Endpoint
  • 24. AI 24 What did we learn along the way?
  • 25. AI Division of Labor 25 Problem ! Monolithic Endpoints A naive implementation of our service placed far too many handlers within the same endpoint, making it impossible to prioritize messages and scale portions of the system ! Api Scheduler Alerts Everything
  • 26. AI Division of Labor 26 Resolution ! A Service is NOT an endpoint In order to ensure our success, we had to split the system into many components, each with its own distinct responsibilities (and queues!) ! Granular Scaling By splitting into several disparate components, we were able to meet our scalability needs more appropriately. (e.g. scaling only the parsing endpoint)
  • 27. AI Saga Responsibilities 27 Problem ! Scaling the File Processing Saga Our initial (read: naive) implementation was responsible for far too much business logic, making it difficult to scale
  • 28. AI Saga Responsibilities 28 Resolution ! Keep it Simple! Sagas should be as clean and tight as possible ! Scaling Issues The more complicated the saga, the harder they are to scale ! “Observer" Implementation In our case, we found that a “passive” saga responding to events and simply keeping track of state was far easier to maintain and scale
  • 29. AI Saga Methodology 29 Problem ! Saga Contention Our initial (read: naive) implementation responded to too many events, creating a large degree of contention and a high number of rollbacks Processing Endpoint File Management Endpoint 3 3 90 32 13 2
  • 30. AI 30 Resolution ! “Check” Pattern In order to reduce contention, we implemented a “check” pattern using timeouts within the saga Processing Endpoint File Management Endpoint 3 90 32 13 2 Saga Methodology
  • 31. AI Deployment Automation 31 Problem ! Deployment Challenges Hindering Proper Design The team (and client) were initially skeptical of breaking the system into many disparate deployable components, due to the increased difficulty of deployment ! ! Svc 1 Svc 2 Svc 4 Svc 3 Svc 4 Svc 5 Svc 1 Svc 4 Svc 5 Svc 1 Svc 2 Svc 4 Svc 1 Svc 2 Svc 3 Svc 1 Svc 3 Svc 5
  • 32. AI Deployment Automation Resolution ! Simple Automation By leveraging the NServiceBus.Powershell bits along with our own extended Powershell scripts, we were able to automate the deployment of all of our NServiceBus projects 32 ! • Configuration Transformations • Distributed Deployments • Backup Strategy
  • 33. AI Firewalls, Servers & Failure, Oh My! 33 Problem ! Deploying Into New Environments is Hard! Misconfiguration, network issues, security issues… All these make moving into a new environment cumbersome and error prone!
  • 34. AI Firewalls, Servers & Failure, Oh My! 34 Resolution ! ServicePulse, ServiceControl & Custom Checks ! • MSDTC Firewall Checks • RavenDB Firewall Checks • FTP Accessibility Checks • Databus File Share Accessibility Checks
  • 35. AI 35 The Result?
  • 36. AI The Result 36 Business Impact ! Faster Processing Times > 10K records/sec parsed and processed, per worker machine ! Happier Users Full system visibility and no lost data ! Happier Developers Clean, maintainable system ! Happier Executives Faster onboarding times for new clients