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.

First 13 steps to be able to design an application for Azure Service Fabric

387 views

Published on

Welcome to a session where we will talk about the most important thing that we need to know about Azure Service Fabric and microservices. This presentation will introduce you in the most important concept of Azure Service Fabric with real life examples and demos. This is not a how to session, this is a session with the pillars of Azure Service Fabric.

Published in: Technology
  • Be the first to comment

First 13 steps to be able to design an application for Azure Service Fabric

  1. 1. First 13 steps to be able to design an application for Azure Service Fabric @RaduVunvulea
  2. 2. 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
  3. 3. Monolithic systems
  4. 4. Things started to evolve
  5. 5. … and evolve
  6. 6. Team responsability Product Team <<Needs to know each part of the system>>
  7. 7. Microservices << software architecture style in which complex applications are composed of small, independent processes communicating with each other using language-agnostic APIs>>
  8. 8. Microservices High decoupled Small Easy to replace Symmetrical architecture Focus on doing a small task Independent deployment units
  9. 9. Service Fabric Build and operate always-on, hyper-scale services
  10. 10. Capabilities
  11. 11. Overview
  12. 12. Service Type
  13. 13. Service Type Reliable Services Reliable Actors Stateful Stateless
  14. 14. Reliable Service and Actor ReliableService • Classical service • Reliable • Available • Scalable ReliableActor • State • Turn-base access • Single thread • Reentrancy
  15. 15. Stateless and Stateful Stateless • No state persisted between calls Stateful • ‘A’ state is persisted between calls
  16. 16. Lifecycle
  17. 17. Reliable Services Reliable Actors Stateful Stateless First call…
  18. 18. Reliable Services Reliable Actors Stateful Stateless … after the call is executed
  19. 19. Reliable Services Reliable Actors Stateful Stateless … when GC is triggered
  20. 20. Reliable Collections
  21. 21. • Low latency • High-throughput • Isolation Level • Snapshot • Repeatable Read • Can be used only with Reliable Stateful Services Reliable Collections Dictionary and Queue Replicated Persisted In-memory <<service instance>> Asynchronous Transactional
  22. 22. Where collection are stored
  23. 23. Reliable Collection – visibility • Different instances of the same service can access the same Reliable Collection • Instances from different services cannot access the same collection
  24. 24. • •
  25. 25. Timers and Reminders (Actor only)
  26. 26. 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
  27. 27. Concurrency
  28. 28. Events and Reentrancy (Actor only)
  29. 29. Events Reentrancy • Send notifications • Should be used only for actor-client communication • Allows actors to reentrant when is the same call context chain • Can be controlled (ReentrancyMode)
  30. 30. Register Call the event from our actor
  31. 31. Partitioning & Replication
  32. 32. Partitioning Similar with Data Partitioing and Sharding
  33. 33. Replication
  34. 34. Failover Manager & Upgrade Domains
  35. 35. ... at what level Application • Partitioning • Replication Cluster • Fault Domain • Upgrade Domain • Naming Service • Resource Balancer • Failover Manager
  36. 36. Service Affinity
  37. 37. Service Affinity • Give us the possibility to ensure that 2 different services are running on the same machine • Useful for migration scenarios (legacy applications) • Limitations • Services of the same type (stateless or stateful) • Stateless services need to have the same instance count • Stateful services need to have the same replica number • Cannot be used in combination with partitioning
  38. 38. Service Affinity <ServiceTemplates> <StatelessService ServiceTypeName=“PaymentService" InstanceCount=“8"> <SingletonPartition /> </StatelessService> … </ServiceTemplates> <ServiceTemplates> <StatelessService ServiceTypeName=“CardTransactionService" InstanceCount=“8"> <SingletonPartition /> <ServiceCorrelations> <ServiceCorrelation Scheme="Affinity" ServiceName="fabric:/shopApp/paymentService"/> </ServiceCorrelations> </StatelessService> </ServiceTemplates>
  39. 39. Service Affinity <ServiceTemplates> <StatelessService ServiceTypeName=“PaymentService" InstanceCount=“8"> <SingletonPartition /> </StatelessService> … </ServiceTemplates> <ServiceTemplates> <StatelessService ServiceTypeName=“CardTransactionService" InstanceCount=“8"> <SingletonPartition /> <ServiceCorrelations> <ServiceCorrelation Scheme="Affinity" ServiceName="fabric:/shopApp/paymentService"/> </ServiceCorrelations> </StatelessService> </ServiceTemplates> <ServiceTemplates> <StatelessService ServiceTypeName=“UserCheckService" InstanceCount=“8"> <SingletonPartition /> <ServiceCorrelations> <ServiceCorrelation Scheme="Affinity" ServiceName="fabric:/shopApp/cardTransactionservice"/> </ServiceCorrelations> </StatelessService> </ServiceTemplates>
  40. 40. What can we run in Service Fabric?
  41. 41. What can we run? Service Fabric Web Sites Application Custom logic
  42. 42. How • 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
  43. 43. Conclusion
  44. 44. Conclusion • Reliable Service vs Reliable Actor • Stateless vs Stateful • Timers and Reminders • Lifecycle and GW • Different solutions for the same problem • Scalable, High Available, Flexible, Secure
  45. 45. Question Answers
  46. 46. { “name” : “Radu Vunvulea, “blog” : “vunvulearadu.blogspot.com”, “email” : ”vunvulear@outlook.com”, “socialMedia” : { “twitter” : “@RaduVunvulea”, “fb” : “radu.vunvulea” } }
  47. 47. Today: Enjoy the day Tonight: Take a look on https://github.com/Azure/ servicefabric-samples What’s next?
  48. 48. { “name” : “Radu Vunvulea, “blog” : “vunvulearadu.blogspot.com”, “email” : ”vunvulear@outlook.com”, “socialMedia” : { “twitter” : “@RaduVunvulea”, “fb” : “radu.vunvulea” } }

×