Reliable Services

Reliable Services API: We have learned that developing reliable services in Service Fabric is different from developing traditional cloud services, as Service Fabric services are highly available and scalable “out of the box” without writing any additional code. How to develop stateless services based on the reliable services APIs is pretty straightforward and is outside the scope of this chapter.

However, when developing stateful services, Service Fabric offers a programming model that is unique: the Reliable Collections API. Reliable collections enable us to develop highly available microservices. The local and replicated state is managed by the reliable collections itself. This is a big deal as developers can simply use reliable collections as collection objects as if they are only targeting single machines.

The biggest difference to other high-availability technologies, such as Redis cache or Service Bus queues, is that the state is kept locally in the service instance, and with that eliminates the latency of reads across a network. As we have learned before, the state is replicated and with that, our service is highly available when using reliable collections. More information on reliable collections can be found here: https://azure.microsoft.com/en-us/documentation/articles/service-fabric-reliable-services-reliable-collections/.

To conclude the Programming Model section, it is worth mentioning that Service Fabric ships an SDK that offers full Visual Studio integration, a local development experience and great diagnostics capabilities for .NET development. At the time of writing, the development experience was restricted to .NET development, but the team is working on supporting Java and other languages. We can expect a preview in the first half of 2016. Figure 8.7 shows the create new Service Fabric application experience in Visual Studio.

Image

FIGURE 8.7: Create new Service Fabric application in Visual Studio 2015

In addition to the development experience, Service Fabric provides a modern Service Fabric Explorer that gives us all the insights into the cluster, application, and service status. The Service Fabric explorer is part of SDK and you can launch it from a Windows tray icon. Figure 8.8 shows the Service Fabric explorer on a development machine.

Image

FIGURE 8.8: Service Fabric explorer on a development machine

Service Fabric Explorer is also available on any cluster in Azure. Every time we provision a new cluster in Azure, its setup can be configured on the nodes in the cluster. It listens to port 19080.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.124.194