Welcome!

Microservices Expo Authors: TJ Randall, Liz McMillan, Elizabeth White, Pat Romanski, AppDynamics Blog

Related Topics: Microservices Expo

Microservices Expo: Article

Service Synchronicity

Service Synchronicity

The entire premise behind the Web services paradigm is enabling access to loosely coupled services via the Web. In essence, Web services are based on a synchronous request-response type interaction. On the other hand, a client's interaction with a Web service can be synchronous or asynchronous.

When application functionality is exposed in the form of Web services, one of the dangers in designing the architecture of the service layer is that the designers tend to think from the perspective of service consumption only. In other words, the focus is on "who is going to call me" and not on "whom am I going to call?" Granted that the design of services needs to target the consumer, but when dealing with the asynchronous paradigm, remember that there is also the "callback" to be accounted for. Since Web services are primarily used for integrating heterogeneous platforms, it is important to also consider the constraints of the client.

Please allow me to elaborate. With synchronous services, clients invoke a request on a service and then suspend their processing while they wait for a response. With asynchronous services (also dubbed document-style Web services), clients initiate a request to a service and then resume their processing without waiting for a response. The service handles the client request and returns a response at some later point, at which time the client retrieves the response and proceeds with its processing.

Let us consider this from the design of the client. The client invokes an asynchronous Web service through the interface method exposed by the service. The result of the Web service can be obtained in one of the following ways:

  • The client polls for the response. This means that the client calls the Web service interface for a response to the original request at periodic intervals.
  • The service calls back the client's service with the result
Of the two approaches, the first one is non-intrusive, in the sense that the client interface doesn't need additional interfaces that are exposed to other applications. An independent "polling module" can be developed that is responsible for getting the results of the call back from the service.

Incorporating the second approach is a little more complicated. The assumption in this case is that the client is modifiable to the extent that it can be "Web service-enabled." This also leads to a greater coupling between the service interface and the client - the interface developed for this protocol is developed for the sole purpose of being able to complete the circuit. In other words, the service interface developed on the client is for the purpose of completing the functionality of the service that was developed for the application. However, this approach has the advantage of being true to the "event listener" paradigm. While designing the interfaces for the Web service, care should be taken to give the client's architecture due consideration. Several aspects need to be considered, some of which are:

  • Technology: Is the client in a state to be Web service enabled? As mentioned earlier, the primary purpose of exposing a Web service interface is to integrate heterogeneous platforms. The client may be a legacy application, in which case, development of a Web service interface on the client may not be feasible.
  • Ownership: Even if the client is technologically mature, it may not fall under the purview of the group or organization that is developing the Web service interface.
  • Testing: A stable client that now exposes a Web service interface will have to be retested for "callability." This could have substantial impact.
  • Ubiquity: Depending on the client to assume a part of the responsibility for the protocol makes the service less ubiquitous. Each client that calls the service will now have to be Web service enabled.
Although Web services offers alternatives for implementing the "synchronicity of service," architecting the solution requires careful consideration of the impact the decision will have on the development and incorporation of the paradigm, as well as the longevity of the developed service in a service-oriented architecture.

More Stories By Ajit Sagar

Ajit Sagar is Associate VP, Digital Transformation Practice at Infosys Limited. A seasoned IT executive with 20+ years experience across various facts of the industry including consulting, business development, architecture and design he is architecture consulting and delivery lead for Infosys's Digital Transformation practice. He was also the Founding Editor of XML Journal and Chief Editor of Java Developer's Journal.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Microservices Articles
At its core DevOps is all about collaboration. The lines of communication must be opened and it takes some effort to ensure that they stay that way. It’s easy to pay lip service to trends and talk about implementing new methodologies, but without action, real benefits cannot be realized. Success requires planning, advocates empowered to effect change, and, of course, the right tooling. To bring about a cultural shift it’s important to share challenges. In simple terms, ensuring that everyone k...
Is advanced scheduling in Kubernetes achievable?Yes, however, how do you properly accommodate every real-life scenario that a Kubernetes user might encounter? How do you leverage advanced scheduling techniques to shape and describe each scenario in easy-to-use rules and configurations? In his session at @DevOpsSummit at 21st Cloud Expo, Oleg Chunikhin, CTO at Kublr, answered these questions and demonstrated techniques for implementing advanced scheduling. For example, using spot instances and co...
Today most companies are adopting or evaluating container technology - Docker in particular - to speed up application deployment, drive down cost, ease management and make application delivery more flexible overall. As with most new architectures, this dream takes significant work to become a reality. Even when you do get your application componentized enough and packaged properly, there are still challenges for DevOps teams to making the shift to continuous delivery and achieving that reducti...
Skeuomorphism usually means retaining existing design cues in something new that doesn’t actually need them. However, the concept of skeuomorphism can be thought of as relating more broadly to applying existing patterns to new technologies that, in fact, cry out for new approaches. In his session at DevOps Summit, Gordon Haff, Senior Cloud Strategy Marketing and Evangelism Manager at Red Hat, discussed why containers should be paired with new architectural practices such as microservices rathe...
With the rise of Docker, Kubernetes, and other container technologies, the growth of microservices has skyrocketed among dev teams looking to innovate on a faster release cycle. This has enabled teams to finally realize their DevOps goals to ship and iterate quickly in a continuous delivery model. Why containers are growing in popularity is no surprise — they’re extremely easy to spin up or down, but come with an unforeseen issue. However, without the right foresight, DevOps and IT teams may lo...
Kubernetes is a new and revolutionary open-sourced system for managing containers across multiple hosts in a cluster. Ansible is a simple IT automation tool for just about any requirement for reproducible environments. In his session at @DevOpsSummit at 18th Cloud Expo, Patrick Galbraith, a principal engineer at HPE, will discuss how to build a fully functional Kubernetes cluster on a number of virtual machines or bare-metal hosts. Also included will be a brief demonstration of running a Galer...
DevOps is under attack because developers don’t want to mess with infrastructure. They will happily own their code into production, but want to use platforms instead of raw automation. That’s changing the landscape that we understand as DevOps with both architecture concepts (CloudNative) and process redefinition (SRE). Rob Hirschfeld’s recent work in Kubernetes operations has led to the conclusion that containers and related platforms have changed the way we should be thinking about DevOps and...
In his session at 20th Cloud Expo, Mike Johnston, an infrastructure engineer at Supergiant.io, will discuss how to use Kubernetes to setup a SaaS infrastructure for your business. Mike Johnston is an infrastructure engineer at Supergiant.io with over 12 years of experience designing, deploying, and maintaining server and workstation infrastructure at all scales. He has experience with brick and mortar data centers as well as cloud providers like Digital Ocean, Amazon Web Services, and Rackspace....
"There is a huge interest in Kubernetes. People are now starting to use Kubernetes and implement it," stated Sebastian Scheele, co-founder of Loodse, in this SYS-CON.tv interview at DevOps at 19th Cloud Expo, held November 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA.
Modern software design has fundamentally changed how we manage applications, causing many to turn to containers as the new virtual machine for resource management. As container adoption grows beyond stateless applications to stateful workloads, the need for persistent storage is foundational - something customers routinely cite as a top pain point. In his session at @DevOpsSummit at 21st Cloud Expo, Bill Borsari, Head of Systems Engineering at Datera, explored how organizations can reap the bene...