AZURE SERVICE BUS For Loosely-Coupled Enterprise Software.
Titanium Sponsors
Platinum Sponsors
Gold Sponsors
ABOUT CHASE Q. AUCOIN Height: 6’10” Last name pronounced: Oak-Wine Current Position: Development Lead of Communications at VinSolutions
Nearly a decade of data and software architecture experience
Let’s connect on LinkedIn https://www.linkedin.com/in/chaseaucoin
HIGH LEVEL OUTLINE What is a Service Bus Service Messages Queues Publisher Subscriber
Extending Legacy Systems Fault Tolerance Scalability Business Flexibility Reusability
Powerful BI Leveraging Event Streams
Questions & Answers / Shameless Self Promotion
FUN FACTCode that was established in
2004 is now over a decade old
CHALLENGES IN THE INDUSTRY Volume of transactions on exponential trend Businesses want to leverage existing data without wholesale rebuilding platforms
Businesses want/need analytics closer to “real-time” Processes need to be able to have intermittent unavailability
WHAT IS A SERVICE BUS “An enterprise service bus (ESB) is a software architecture model used for designing and implementing communication between mutually interacting software applications in a service-oriented architecture (SOA). As a software architectural model for distributed computing it is a specialty variant of the more general client server model and promotes agility and flexibility with regard to communication between applications. Its primary use is in enterprise application integration (EAI) of heterogeneous and complex landscapes.” - Wikipedia
WHAT THE HECK DOES THAT MEAN? Service Bus: A layer of abstraction between clients and services to relay inputs and outputs.
Inputs and outputs are “Messages”
SERVICE MESSAGESMessages are persisted quicklyMessages are asynchronous by their natureMessages are still there even if processing goes offlineMessages that can’t be processed can be replayed later
QUEUESClient
Client
Client
Client
Worker
Worker
Worker
Worker
Queue
PUBLISHER SUBSCRIBERClient
Client
Client
Client
Worker
Worker
Worker
Worker
Topic
Subscription
Subscription
LOOSELY COUPLED ENTERPRISE PLATFORM How do we keep these systems that are prone to failure “fault tolerant”?
How do we scale to keep up with the ever increasing demands of our consumers?
How do we meet the constant demands of business to enrich our data and deliver new/relevant value when we have systems that are brittle and complex?
How do we get the most out of the systems we have invested in?
SCENARIO 1 – FAULT TOLERANCE How do we keep these systems that are prone to failure “fault tolerant”?
SAMPLE USE CASE - CUSTOMER
Client
Client
Client
Client
Customer ServiceData Persistence Data Source
SERVICE FAILURE – CUSTOMER
Client
Client
Client
Client
Customer ServiceData Persistence Data Source
SERVICE FAILURE – CUSTOMER
Client
Client
Client
Client
Customer ServiceData Persistence Data Source
WHY DOES THIS SUCK? Your clients expect quick responses from your services. Your clients should still be able to operate even when the underlying service experience intermittent downtime.
SAMPLE USE CASE - CUSTOMER
Insert
Update
Insert
Delete
DBCustomerActivities
Data Persiste
nce
SERVICE FAILURE – CUSTOMER
Insert
Update
Insert
Delete
DBCustomerActivities
Data Persiste
nce
SERVICE FAILURE – CUSTOMER
Insert
Update
Insert
Delete
DBCustomerActivities
Data Persiste
nce
TO MANY THINGS FROM THE STUFF!! How do we handle critical times when our clients need us most?
SCENARIO 2 - SCALE How do we scale to keep up with the ever increasing demands of our consumers?
SAMPLE USE CASE - CUSTOMER
Insert
Update
Insert
Delete
DBCustomerActivities
Data Persiste
nce
SAMPLE USE CASE - CUSTOMER
Insert
Update
Insert
Delete
DBCustomerActivities
Data Persiste
nceData
Persistence
Cloud Deployment
SAMPLE USE CASE – CUSTOMER – CLOUD SCALE
Insert
Update
Insert
Delete
DBCustomerActivities
Data Persiste
nceData
Persistence
Data Persiste
nce
Data Persiste
nce
BUT… WE HAVE INVESTED IN ARC WELDERS!
BUT… WE HAVE INVESTED IN ARC WELDERS! Shhhhh… It’ll be ok.
On-Premises DeploymentCloud Deployment
SAMPLE USE CASE – CUSTOMER – HYBRID SCALEInsert
Update
Insert
Delete
DB
Customer
Activities Data
Persistence
Data Persiste
nce
Worker
Worker
Worker
Worker
On-Premises Deployment
On-Premises DeploymentCloud Deployment
SAMPLE USE CASE – CUSTOMER – HYBRID SCALEInsert
Update
Insert
Delete
DB
Customer
Activities Data
Persistence
Data Persiste
nce
Worker
Worker
Worker
Worker
SCENARIO 3 – EXTENDING SYSTEMS How do we meet the constant demands of business to enrich our data and deliver new/relevant value when we have systems that are brittle and complex?
CAPTAIN PRODUCT SAYS: Wow.. This thing is running great! Since we “let you” re-architect the system we have some great feature ideas…
SAMPLE USE CASE - CUSTOMER
Insert
Update
Insert
Delete
DBCustomerActivities
Data Persiste
nceData
Persistence
CAPTAIN PRODUCT SAYS: We need to notify people when a customer is added. Just add it to that new service you wrote.
We’ve got a lot of pressure to get this done. Yesterday. Earlier, if possible.
TECHNOLOGIST SAYS: Uh… ok.
SAMPLE USE CASE - CUSTOMER
Insert
Update
Insert
Delete
DBCustomerActivities
Data Persistence
& NotificationData
Persistence& Notification
CAPTAIN PRODUCT SAYS: Oh that’s great!!! Now we need to know what happens with these customers so we can have a audit trail and accountability…
We’ve got a lot of pressure to get this done. Yesterday. Earlier, if possible.
TECHNOLOGIST SAYS: Uh… ok.
SAMPLE USE CASE - CUSTOMER
Insert
Update
Insert
Delete
DBCustomerActivities
Data Persistence
& Notification& Auditing
Data Persistence
& Notification& Auditing
WHY THIS SUCKS Your services are back to taking on too much responsibility. The more responsibility, the more chance for failure and the harder to fix.
We are now embedding services in our service that could be extended to support more of our system and provide better value to our organization as a whole.
PRO-TIP Our goal as technologist is to think about the long term. We are good at this. Be a good steward of your company and your co-workers. Don’t let product and short sided goals dictate technology decisions.
Be consultative! Think about their long term needs. Choose technology & strategy accordingly. Set them up for success, not failure.
Remember you aren’t responsible for the success of this one project or task. Really you are responsible for the long term success of your whole company.
Believe it, or not.
SAMPLE USE CASE - CUSTOMER
Insert
Update
Insert
Delete
DBCustomerActivities
Data Persiste
nceData
Persistence
SAMPLE USE CASE - CUSTOMER
Insert
Update
Insert
DeleteDB
CustomerActivities
Customer Auditing
Customer Auditing
Data Persistenc
eData
Persistence
All
All
DB
SCENARIO 4 – REUSABLE SYSTEMS How do we keep these systems that are prone to failure “fault tolerant”?
SAMPLE USE CASE – NOTIFICATION
Notification Service:
Gets All DataFrom Sales,
Customers, And Inventory.
Synchronously Notifies
On Selected Channels Based on
Changes
Data Source
Email Provider
SMS Provider
Push Notifications Provider
WHY DID WE DO THIS Well at the time, it made sense. We didn’t have very many records when we created it and we only sent emails. Then over the years we just kind of added on to it.
REMINDER:Code that was established in
2004 is now over a decade old
SAMPLE USE CASE - CUSTOMER
DB
Customer
Activities
Notification
Notification
Data Persistenc
eData
Persistence
Inserts
All
Notifications
Text
Push
Notification
Notification
Notification
SAMPLE USE CASE - CUSTOMER
CustomerNotificatio
nInventory Notificatio
nNotificati
ons
Text
Push
Worker
Worker
WorkerSales
Notification
ProcessProcess
SAMPLE USE CASE - NOTIFICATION
CustomerNotificatio
nInventory Notificatio
nNotificati
ons
Text
Push
Worker
Worker
WorkerSales
Notification
LEVERAGING EVENT STREAMSWell… You got the basics. Now it is time to do something amazing with all of this extensible data.
How about some real time reporting?
NOT TODAY :P Come check out my talk at SQL Saturday http://www.sqlsaturday.com/444/eventhome.aspx
SHAMELESS SELF PROMOTION Limited availability for consultation, mentorship, and training! Learn: Patterns, Practices, WCF @ Scale, Cloud Systems, Async Programming.
Phone/Text: 816-209-0033
https://www.linkedin.com/in/chaseaucoin [email protected]
Cupcake Factory – Distributed services made easy. Ask about alpha access! http://cupcakefactory.net
QUESTIONS AND ANSWERS Go ahead. Get it off your chest. I’m listening.
THANK YOU!! Please fill out comment cards. Do it for the kids.