Friday, 12 January 2018

What is Azure Service Fabric



What is azure service fabric ?

Azure service fabric is a distributed systems platform that makes it easy to package, deploy and manage scalable  and reliable microservices and containers.


Below API's use full to interact with three categories.
           1. Client.
           2. Runtime.
           3. Common

Client : APIs are used to manage, scale and recycle the cluster, as well as deploy application packages.

Runtime: APIs are used for running application to interact with hosting cluster.

Common: APIs contains types used in both client and runtime APIs


Client:
Below are some important functionality which are provided by Client API.

Access attributes of the Choas data structures and events.
Access attributes of the Service Fabric Resources.
Managing health of  Service Fabric Applications
Querying of application and service data.
Repairing the cluster and nodes.
Define result objects.
Support authentication with azure active directory.
Access to attributes of test scenarios.


Runtime:

Below classes which support the registration of the services with Service Fabric Runtime.

Service Runtime:Provides methods to register reliable services with service Fabric Runtime.
Stateful Service: IReliableStateManger to manage service's state.
StatefulServiceBase: 
StatelessService:

















What is ServiceRuntime in Azure Object Model.



ServiceRuntime:
This static class that provides methods to register reliable services with service fabric run-time.

Registers a reliable stateful service with Service Fabric runtime.
Registers a reliable stateless service with Service Fabric runtime.

This component contains classes and interfaces that allows your roles to interact with the windows azure environment.



ServiceRuntime commonly we can find in Program.cs of service fabric project.


//Tells Azure Service Fabric Runtime about project ( project name ) 
ServiceRuntime.RegisterServiceAsync("ProjectName",context => new ProductCataLog(context)).GetAwaiter().GetResult();

Azure Service Fabric:

Monday, 1 January 2018

Remove Service By PowerShell command

$service = Get-WmiObject -Class Win32_Service -Filter "Name='PremierOpinion'"
$service.delete()