Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Azure Microservices in Practice - Radu Vunvulea

1,988 views

Published on

In this session we will take a look on Azure Service Fabric and how we can create a web application using ASP.NET Core and microservices. During the presentation we will create a web application that will be hosted in Azure Service Fabric and use the most important capabilities of Azure Service Fabric.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Azure Microservices in Practice - Radu Vunvulea

  1. 1. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Azure Microservices in Practice Radu Vunvulea Solution Architect, iQuest Technologies Microsoft Azure MVP @RaduVunvulea
  2. 2. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals
  3. 3. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Many thanks to our sponsors & partners! GOLD SILVER PARTNERS PLATINUM POWERED BY
  4. 4. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals RADU VUNVULEA MCTS MCP BANK HOME AUTOMATION MVP ENTERPRISE AUTOMOTIVE PHARMA LEAN AND AGILE E-COMMERCE WEB iQuest AZURE JAVASCRIPT VUNVULEARADU.BLOGSPOT.COM MOBILE DOTNET @RaduVunvulea WCF WPF ENTHUSIASTIC
  5. 5. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Scope
  6. 6. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals WHAT ARE MICROSERVICES?
  7. 7. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals
  8. 8. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Software architecture style in which complex applications are composed of small, independent processes communicating with each other using language-agnostic APIs Microservices
  9. 9. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals WHY WE SHOULD USE MICROSERVICES?
  10. 10. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals If we need a system that has components that are… High decoupled Small Easy to replace Focus on doing a small task Independent deployment units Symmetrical architecture
  11. 11. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Evolution Maintenance is hard Adding new features is slow Changes are expensive Technology becomes the obstacle rather than enabler App Modernization
  12. 12. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals (AZURE) SERVICE FABRIC
  13. 13. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals • Service Fabric • Azure Service Fabric Why we have two different things? ?
  14. 14. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Service Fabric | Azure Service Fabric Microservices Cloud Azure Azure Service Fabric AWS Service Fabric On-premises Service Fabric
  15. 15. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Overview Service Fabric Azure Windows Server Linux On-premises Windows Server Linux Hosted clouds Windows Server Linux Micros ervice Micros ervice Micros ervice Micros ervice Micros ervice
  16. 16. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals SERVICE TYPE
  17. 17. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals ReliableService •Classical service •Reliable •Available •Scalable Actor •State •Turn-base access •Single thread •Reentrancy
  18. 18. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Stateless •No state persisted between calls Stateful •‘A’ state is persisted between calls
  19. 19. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals
  20. 20. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals What can we run in Service Fabric? Service Fabric Web Sites Application Custom logic
  21. 21. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals • Multiple programing languages (C# & Java) • Support different commucation mechanisms: –HTTP(s) –WCF –TCP –UDP • Any protocol and communication stack is supported • Capable to run a guest executable How
  22. 22. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals
  23. 23. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals SERVICE LIFECYCLE
  24. 24. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Reliable Services Actors Stateful Stateless State StateState First call… Reliable Collections
  25. 25. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Reliable Services Actors Stateful Stateless State State … after the call is executed State
  26. 26. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Reliable Services Actors Stateful Stateless State State … when GC is triggered State
  27. 27. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals
  28. 28. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals One UI for all environments
  29. 29. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals DEBUGGING AND TRACING
  30. 30. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals • Local debugging like any other .NET application • Attach debugger to any Service Fabric Application (on-premises or cloud) • Diagnostic Events persistent in Cluster • Real time Streaming Traces (Diagnostics Events) Debugging and tracing
  31. 31. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals
  32. 32. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals • Low latency • High-throughput • Transactional • Can be used only with Reliable Services Reliable Collections Dictionary and Queue Replicat ed Persiste d In- memory <<servic e instance >> Asynchr onous Transacti onal
  33. 33. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Where collection are stored
  34. 34. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals • Different instances of the same service can access the same Reliable Collection • Instances from different services cannot access the same collection Reliable Collection – visibility
  35. 35. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals
  36. 36. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals TIMERS AND REMINDERS
  37. 37. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Timers and Reminders Timers Similar with .NET Called at a specific time interval Reminders Timer with persistence Trigered in all circumstances (deactivations and failovers) Concurrency Turn based concurrency Stateful Actos only
  38. 38. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals • Context: Multiple calls to the same Reliable Actor Concurrency
  39. 39. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Concurrency
  40. 40. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Concurrency
  41. 41. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Execution flow: • Reminder Trigger • SetPrice • SetStock Concurrency
  42. 42. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals
  43. 43. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Events • Send events and notifications from services to caller • Allows us be notified at different steps on when an exception occurs • Can be used only for actor-client communication
  44. 44. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals • On Actor: – IActorEvents – Trigger our custom events • On source: – Implement callback (Event Handler) – Subscribe our Event Handler Events
  45. 45. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals
  46. 46. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals TRACING AND DEBUGING
  47. 47. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals BEHIND THE SCENE
  48. 48. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Partition and Replication
  49. 49. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Fault Domains and Upgrade Domains
  50. 50. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Where we can control them Application • Partitioning • Replication Cluster • Fault Domain • Upgrade Domain • Naming Service • Resource Balancer • Failover Manager
  51. 51. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals
  52. 52. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Question Answers
  53. 53. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals { “name” : “Radu Vunvulea, “blog” : “vunvulearadu.blogspot.com”, “email” : ”vunvulear@outlook.com”, “socialMedia” : { “twitter” : “@RaduVunvulea”, “fb” : “radu.vunvulea” } }
  54. 54. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals Today: Enjoy ITCamp Day 1 Tomorow: Enjoy ITCamp Day 2 Saturday: Take a look on https://github.com/Azure/ servicefabric-samples
  55. 55. @ITCAMPRO #ITCAMP16Community Conference for IT Professionals { “name” : “Radu Vunvulea, “blog” : “vunvulearadu.blogspot.com”, “email” : ”vunvulear@outlook.com”, “socialMedia” : { “twitter” : “@RaduVunvulea”, “fb” : “radu.vunvulea” } }

×