10 years ago I presented for the first time at Visug on the topic of Visual Studio Team System, the first iteration of a product family that allowed us to automate the long road from requirement to software in production, and everything in between. At the time software development was mainly a manual process. The software itself was either monolithic or composed of large 'SOA Services' and it was a real challenge to get them into production every few months in a so called 'big bang’ deployment. Since then our profession has gone through some major changes, software development looks a lot different now. Today, many applications consist of small parts called 'microservices'. These microservices make their way into the cloud or datacenter automatically, through API driven Continuous Deployment systems, every time anyone on the team commits a small change. While deployments are now happening continuously, they do have an impact on the system: taking down part of it for maintenance all the time. But at the same time, our customers expect the overall system to stay up 24/7. In this talk I will introduce you to an upcoming technology, called Service Fabric, that can help you maintain your development agility in this new world, but still live up to your customer’s expectations.
2. From Applications to MicroServices
What a difference 10 years makes
Deploy
10 years agoContinuous Integration Always-on, hyper-scale servicesService FabricContinuous Deployment
4. Automates Microservice Lifecycle Management
What is Service Fabric?
Service Fabric
It automates following aspects of the lifecycle:
• Zero-downtime deployment
• Rolling upgrade & side by side versioning
• Health monitoring & diagnostics
• Auto-scaling & resource balancing
• Data partitioning & replication
• Host integration (Windows Update coordination)
• Test In Production (Chaos service)
• Cross-datacenter clustering (optional)
5. It’s not new! It’s production proven technology.
What is Service Fabric?
Designed to host azure’s services:
• Azure Database
• Azure DocumentDB
• Power BI
• Azure Compute & Network provisioning (ARM)
• Event Hub
• Service Bus (ARM & Azure Pack)
• Azure Data Factory
• Intune
• Cortana
• Bing Weather
• Skype for Business
• Microsoft Online Directory Services
Microsoft Azure
6. Node Node Node Node Node
Nodes, Application Types & Service Types
What is a Service ?
Service represents:
• executable unit of code
• it’s configuration
• and data
Application
Service Service Service
Code Config Data Code Config Data Code Config Data
in any shape or form, including:
• Any x64 exe
• Container (Docker and friends)
• Dnx ( aspnet 5 )
• Actor models (Orleans, SF, Akka.net)
• Grouped into Application Types
• Managed by nodes
12. Runtime API Layers
Programming models
Actor Framework API
Service Framework API
Collection/KVS API
State Management API
Replication Set
Management API
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
Provided By
Windows Fabric
Provided By User
Application
Replica set
Management
State
Replication
State
Storage
Messaging Programming
Model
Business
Logic
Games, IoT scenarios
Traditional Enterprise Applications
Custom communication
Replicated Data Structure Providers
Replicator Providers
13. High Level Comparison
Choosing between Actors & Services
Reliable Actors API Reliable Services API
Simplicity Flexibility
Small independent units of state & logic Logic across multiple components
Single threaded objects Use reliable collections to store & manage state
Framework manages concurrency & state You manage concurrency & state
Platform manages communication You want to manage communication
Partitioning scheme managed for you You can manage the partitioning scheme
15. Statefull Stateless
Actor Model
Client
Reliable State
Manager
Transactional
Replicator
Local Persistent
Log
Shared Log
Dedicated
Log
To secondaries
Proxy
Ac1
Ac2
Ac3
Ac4
Ac5
Proxy
Proxy
Proxy
Proxy
Proxy
Client
Proxy
Ac1
Ac2
Ac3
Ac4
Ac5
Proxy
Proxy
Proxy
Proxy
Proxy
Reliable
Dictionary State
Provider
Actor Activation
State
State
State
State
State
Communication
Listener
Actor Activation
Communication
Listener
16. Concurrency
Actor Model
Time
ActorId1
Method1
ActorId1
Method2
ActorId1
Timer
ActorId2
Method1
ActorId2
Method2
ActorId2
Reminder
Request arrived, lock
acquired without wait
Entered method1
Created task
Exited method1
Task completed
Lock released
Lock acquired
Entered method2
Created task
Exited method2
Task completed
Lock released
Request arrived,
waiting for lock
asynchronously
Request arrived,
waiting for lock
asynchronously
Lock acquired
Entered callback
Created task
Exited callback
Task completed
Lock released
Lock acquired
Entered callback
Created task
Exited callback
Task completed
Lock released
Lock acquired
Entered method1
Created task
Exited method1
Task completed
Lock released
Request arrived, lock
acquired without wait
Entered method2
Created task
Exited method2
Task completed
Lock released
Request arrived,
waiting for lock
asynchronously
Request arrived,
waiting for lock
asynchronously
18. Statefull Stateless
Service Model
Client
Communication
Listener
Service Impl
StatefullService
StatefullServiceBase
Client
Communication
Listener
Service Impl
StatelessService
StatelessServiceBase
Other
Communication
Channels
Client
Other
Communication
Channels
Client
Reliable State
Manager
Transactional
Replicator
Local Persistent
Log
Shared Log
Dedicated
Log
To secondaries
Proxy Proxy
20. Single machine Cluster
Mind the load balancer
Machine
Client
Http
Http.sys
Node
Node
Node
Node
Node
Service Client
Http
Node
Node
Node
Node
Node
Http.sys
Http.sys
Http.sys
Http.sys
Http.sys
N
L
B
Service
Service
Service
Service
Service
*Probing may skew the results a bit