Need for Speed: Why Applications With No Database and No Services are Fast ARC334 Nick Randolph – Built to Roam
Cloud Fail Step 1: Agree the cloud is a good thing 6/25/2018 10:32 AM Cloud Fail Step 1: Agree the cloud is a good thing Step 2: Continue with traditional architecture Step 3: Disappointed that cloud isn’t any faster Step 4: Move to a different cloud provider Step 5: Opinion is cloud is slow and expensive Step 6: Go back to self-hosting solution © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Cloud Success Step 1: Stop what you’re currently doing Step 2: Choices Step 3: Architect, Build, Test, Deploy, Analyse Step 4: Rinse and repeat Faster solution, lower cost, higher volume – Winning!
2-Tier Architecture I have a database, I have an app BAM! I have a database app © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
3-Tier Architecture Add a service tier Security Separation of concerns Logging Caching …
N-Tier Architecture Designed for scale out of intermediary components Limited by Database – scale up!
Offline is a Golden Bullet Clients download data for offline access Solves connectivity issues Reduces load But… Increases complexity Requires change tracking Increases load during synchronisation
Enter the Cloud Many, many, many different components Many, many, many different ways to build solution
Two Scenarios Data retrieval Traditional: Service returns data from DB to client Cloud: Webjob constructs blob data that’s retrieved by client via the CDN Data processing Traditional: Service updates DB from client request Cloud: Client request goes on queue to be processed; Client notified when processing complete
6/25/2018 10:32 AM Data Retrieval © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Data Retrieval Traditional: Client app request data via a service Service retrieves data directly from database Service/DB throttles data to limit download size Client makes repetitive calls to retrieve all data
Data Retrieval - Traditional Connectivity Not online, no data Service not online, no data Database not available, no data Database load Queries based on app usage (peak loads) Performance Limited by query performance
Data Retrieval Cloud Webjob periodically queries data Prepares blob data (eg json) Blob accessible via CDN
Data Retrieval - Cloud Connectivity Microsoft Ignite 2016 6/25/2018 10:32 AM Data Retrieval - Cloud Connectivity Clients will cache blobs (immutable) Database load Queries are scheduled so load can be managed Performance Download from CDN Blobs are compressed Locally cached © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Demo Generating Blob Contents via a Webjob Microsoft Ignite 2016 6/25/2018 10:32 AM Demo Generating Blob Contents via a Webjob © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
6/25/2018 10:32 AM Data Processing © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Data Processing Traditional Client sends update request to service Service processes update Service sends update to database Service responds to client success/failure
Data Processing - Traditional Connectivity Same as for retrieval Except – unknown success/failure on update Performance Operation to complete before timeout End user experience User has to remain on page/app
Data Processing Cloud Client prepares update request Sends update request when service available Service queues update request Webjob picks up request and updates database Notification sent to device Client notifies user that update is complete
Data Processing - Client Connectivity Update queued for when online Updates are idempotent (for connectivity loss) Notification update on completion Performance / User experience No blocking experience
Demo Data Processing via a Queue and Webjob Microsoft Ignite 2016 6/25/2018 10:32 AM Demo Data Processing via a Queue and Webjob © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Cloud Fail v’s Cloud Success Define the problem you’re trying to solve! Architect for Best user experience Scale Beware the Bottlenecks Cost
Continue your Ignite learning path 6/25/2018 10:32 AM Continue your Ignite learning path Visit Channel 9 to access a wide range of Microsoft training and event recordings https://channel9.msdn.com/ Head to the TechNet Eval Centre to download trials of the latest Microsoft products http://Microsoft.com/en-us/evalcenter/ Visit Microsoft Virtual Academy for free online training visit https://www.microsoftvirtualacademy.com © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
6/25/2018 10:32 AM Thank you Chat with me in the Speaker Lounge Find me @thenickrandolph or nick@builttoroam.com © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.