|By Jason Bloomberg||
|September 14, 2011 02:33 PM EDT||
Over the years, updating our Licensed ZapThink Architect (LZA) course has given us ample time to explore advances in SOA and Cloud Computing. Now that we’re working on version 9 of the course, we’re taking a closer look at REST-based SOA. Of course, ZapThink has discussed REST for several years now, but recently we’ve seen some fascinating REST-based SOA case studies, both at startups as well as within the US Federal Government.
Nevertheless, while many architects believe that as an architectural style, REST is simpler and more straightforward that Web Services-based SOA, our research is turning up continued confusion over the principles of REST and how best to implement them. Everybody seems to get the basics—operate on resources at URIs with the four HTTP-centric operations GET, POST, PUT, and DELETE—but most people seem to miss the subtleties. Combine that confusion with the fact that you can do REST without SOA, the specifics of REST-based SOA are even more elusive, as we must pare down the essentials of both REST and SOA to understand the true nature of the combined approach. How, therefore, should we handle Service abstractions, contracts, and compositions – arguably, the essence of SOA – in a REST-based SOA world?
Where is the Service Abstraction?
At the center of the SOA approach is the notion of a Service abstraction. REST resources are abstractions as well, but resources are abstractions of capabilities or entities on the server, which is not quite the same thing as a Service abstraction. In SOA, the Service abstraction supports Business Services, which represent flexible, business-centric capabilities. A Business Service may abstract multiple Service interfaces, where routing and transformation operations on intermediaries present a loosely coupled façade.
Most RESTafarians, however, don’t think at this level. They are thinking of clients (e.g. browsers) accessing resources at URIs which return representations. A representation is an HTML page, an XML file, a video, etc. The business context is lost in a sea of URI formats and Internet media types.
What RESTafarians often overlook is that the intermediary pattern is actually one of the core architectural constraints of REST. URIs need not point directly to resources; it is perfectly OK for an intermediary to resolve the URI into a physical endpoint. After all, that’s what DNS servers do!
From the SOA perspective, we can rely upon the intermediary to execute routing rules and transformations as necessary to support the business abstraction. Furthermore, we can establish and enforce the policy (as a part of our SOA governance framework) that the only allowed way to access resources is via endpoints on an intermediary. From the REST perspective, think DNS server on steroids: instead of simply resolving URLs to IP addresses, resolve any formal URI structure to physical resource endpoints by following a rich set of transformation and routing metadata.
Where is the Contract?
At the technical level, a Service is a contracted interface or an abstraction of contracted interfaces. Web Services have contracts that comply with WSDL, but there’s no equivalent of WSDL for REST resources. True, resources have uniform interfaces that the four HTTP operations define, but simply knowing you can GET a resource or POST to a resource doesn’t tell you anything about what that resource is supposed to do. Accessing a resource does give you a representation of that resource, however. Representations can comply with standard Internet media types (formerly known as MIME types), but even the media type specification is insufficient to qualify as a contract.
Sun Microsystems tried to promote the Web Application Description Language (WADL) as a RESTafarian alternative to WSDL, but work on WADL has largely petered out now that Sun is part of Oracle. The point to WADL was more to stub out REST resources in Java than to provide an implementation-neutral contract language in any case.
Where, then, is the contract? Let’s look at a simple REST example: the simplest, of course, being the Web itself. Let’s say you are filling in a form on a Web page and then hit submit. Where is the contract?
The form method is POST, and the POST data are the information that you filled into the form. The resource is identified by the form action URL. So far so good. Have you found the contract yet?
In this example, the contract is the Web form itself. The form specifies and constrains the POST data you may input, and specifies the form action, which is a hyperlink to the next resource. You browsed to the page with the Web form by following an earlier link or loading a URL for a resource that returned that Web page as a representation of that resource.
Remember, a REST application is a set of resources that return representations that link to other resources – in other words, hypermedia. One resource returns one or more representations (Web pages, XML files, etc.) that contain links to other resources, and it is those hyperlinks (and their associated metadata) that specify the application behavior.
While a Web page with a form is the simplest and most common example of how to contract POST data, we can generalize that form however we like, depending on what type of client we want to support. For machine-to-machine interactions, for example (that is, when the client is not simply a browser), the first resource may return an XML representation that provides a contracted interface to the client for POSTing to the linked resource. How your resource builds that representation is up to you.
In Web Services-based SOA we store the contract metadata in a centralized registry/repository. In REST-based SOA each resource is responsible for returning contract metadata either for itself or for any resource it hyperlinks to. As a result, we may not able to obtain contracts for resources we’re not (yet) able to access, but on the other hand, we can code our resources to dynamically generate contracts if we wish. In REST-based SOA, therefore, contract changes can be automated, where in Web Services-based SOA, contract change is a complex, manual process that requires rigorous governance.
Where is the Composition?
The third core characteristic of SOA we look for is the ability to compose Services into applications. Such compositions might be orchestrations, when they have a pre-defined flow, or choreographies, when the order of steps in the composition is not determined ahead of time.
A REST application, of course, is an example of a composition of resources. From the SOA perspective, furthermore, a REST application is a workflow – that is, a composition with human steps. We can also consider such compositions to be choreographies, because the order of steps depends upon which links the user clicks. Users may click links in a different order every time they work their way through the application.
The question still remains: how do we create automated orchestrations in the REST world? The answer is simpler than it looks. In REST, everything can be a resource. Therefore, orchestrations can be resources as well. An orchestration resource might return a BPEL representation or a BPMN representation or perhaps a simplified representation of an orchestration that doesn’t have the baggage of either BPEL or BPMN. If anything, establishing a pre-defined orchestration is simpler than a hypermedia composition, because the orchestration logic is static, while with a hypermedia composition, the underlying resource logic may change the composition logic on the fly. Just because we don’t have to fix our application state transitions ahead of time doesn’t mean we’re not allowed to.
The ZapThink Take
Over the more than ten years ZapThink has been writing about SOA, we’ve fought the battle to explain what SOA really was, fighting the deluge of misinformation from profit-seeking vendors and ill-informed industry analysts. Fortunately, this time vendors aren’t trying to coopt REST to sell software the way they did SOA, to be sure, but the fact still remains that there is extensive confusion and misinformation about REST, just as there still is for SOA.
Mix the two together, therefore, and you’re just asking for trouble. But the effort is worth the trouble, for one simple fact: done right, REST-based SOA actually works. It paves a path to the agile architecture that we’ve been seeking since we first dipped our toe into the ocean of distributed computing. Of course, there’s a catch: the “done right” bit. The devil is in the details.
ZapThink will be providing far more detail on this topic over the next year, in our ZapFlash newsletters, in the next version of our LZA course, and in our Podcasts and at our events. Our new REST-based SOA module in the LZA course in particular breaks new ground and lays the groundwork for simpler, more successful approaches to SOA. Hope to see you at one of our events or classes soon!
For organizations that have amassed large sums of software complexity, taking a microservices approach is the first step toward DevOps and continuous improvement / development. Integrating system-level analysis with microservices makes it easier to change and add functionality to applications at any time without the increase of risk. Before you start big transformation projects or a cloud migration, make sure these changes won’t take down your entire organization.
Mar. 23, 2017 10:00 PM EDT Reads: 3,401
DevOps is often described as a combination of technology and culture. Without both, DevOps isn't complete. However, applying the culture to outdated technology is a recipe for disaster; as response times grow and connections between teams are delayed by technology, the culture will die. A Nutanix Enterprise Cloud has many benefits that provide the needed base for a true DevOps paradigm.
Mar. 23, 2017 06:00 PM EDT Reads: 1,296
In recent years, containers have taken the world by storm. Companies of all sizes and industries have realized the massive benefits of containers, such as unprecedented mobility, higher hardware utilization, and increased flexibility and agility; however, many containers today are non-persistent. Containers without persistence miss out on many benefits, and in many cases simply pass the responsibility of persistence onto other infrastructure, adding additional complexity.
Mar. 23, 2017 02:30 PM EDT Reads: 4,089
DevOps is often described as a combination of technology and culture. Without both, DevOps isn't complete. However, applying the culture to outdated technology is a recipe for disaster; as response times grow and connections between teams are delayed by technology, the culture will die. A Nutanix Enterprise Cloud has many benefits that provide the needed base for a true DevOps paradigm. In his Day 3 Keynote at 20th Cloud Expo, Chris Brown, a Solutions Marketing Manager at Nutanix, will explore t...
Mar. 23, 2017 02:30 PM EDT Reads: 2,380
Everyone wants to use containers, but monitoring containers is hard. New ephemeral architecture introduces new challenges in how monitoring tools need to monitor and visualize containers, so your team can make sense of everything. In his session at @DevOpsSummit, David Gildeh, co-founder and CEO of Outlyer, will go through the challenges and show there is light at the end of the tunnel if you use the right tools and understand what you need to be monitoring to successfully use containers in your...
Mar. 23, 2017 11:45 AM EDT Reads: 1,072
The IT industry is undergoing a significant evolution to keep up with cloud application demand. We see this happening as a mindset shift, from traditional IT teams to more well-rounded, cloud-focused job roles. The IT industry has become so cloud-minded that Gartner predicts that by 2020, this cloud shift will impact more than $1 trillion of global IT spending. This shift, however, has left some IT professionals feeling a little anxious about what lies ahead. The good news is that cloud computin...
Mar. 23, 2017 11:30 AM EDT Reads: 833
What if you could build a web application that could support true web-scale traffic without having to ever provision or manage a single server? Sounds magical, and it is! In his session at 20th Cloud Expo, Chris Munns, Senior Developer Advocate for Serverless Applications at Amazon Web Services, will show how to build a serverless website that scales automatically using services like AWS Lambda, Amazon API Gateway, and Amazon S3. We will review several frameworks that can help you build serverle...
Mar. 23, 2017 05:30 AM EDT Reads: 1,390
The essence of cloud computing is that all consumable IT resources are delivered as services. In his session at 15th Cloud Expo, Yung Chou, Technology Evangelist at Microsoft, demonstrated the concepts and implementations of two important cloud computing deliveries: Infrastructure as a Service (IaaS) and Platform as a Service (PaaS). He discussed from business and technical viewpoints what exactly they are, why we care, how they are different and in what ways, and the strategies for IT to transi...
Mar. 23, 2017 05:00 AM EDT Reads: 5,818
Culture is the most important ingredient of DevOps. The challenge for most organizations is defining and communicating a vision of beneficial DevOps culture for their organizations, and then facilitating the changes needed to achieve that. Often this comes down to an ability to provide true leadership. As a CIO, are your direct reports IT managers or are they IT leaders? The hard truth is that many IT managers have risen through the ranks based on their technical skills, not their leadership abi...
Mar. 23, 2017 05:00 AM EDT Reads: 10,668
Thanks to Docker and the DevOps revolution, microservices have emerged as the new way to build and deploy applications — and there are plenty of great reasons to embrace the microservices trend. If you are going to adopt microservices, you also have to understand that microservice architectures have many moving parts. When it comes to incident management, this presents an important difference between microservices and monolithic architectures. More moving parts mean more complexity to monitor an...
Mar. 23, 2017 04:00 AM EDT Reads: 3,229
SYS-CON Events announced today that HTBase will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. HTBase (Gartner 2016 Cool Vendor) delivers a Composable IT infrastructure solution architected for agility and increased efficiency. It turns compute, storage, and fabric into fluid pools of resources that are easily composed and re-composed to meet each application’s needs. With HTBase, companies can quickly prov...
Mar. 23, 2017 02:15 AM EDT Reads: 2,453
Microservices (μServices) are a fascinating evolution of the Distributed Object Computing (DOC) paradigm. Initial design of DOC attempted to solve the problem of simplifying developing complex distributed applications by applying object-oriented design principles to disparate components operating across networked infrastructure. In this model, DOC “hid” the complexity of making this work from the developer regardless of the deployment architecture through the use of complex frameworks, such as C...
Mar. 23, 2017 12:00 AM EDT Reads: 4,023
As Enterprise business moves from Monoliths to Microservices, adoption and successful implementations of Microservices become more evident. The goal of Microservices is to improve software delivery speed and increase system safety as scale increases. Documenting hurdles and problems for the use of Microservices will help consultants, architects and specialists to avoid repeating the same mistakes and learn how and when to use (or not use) Microservices at the enterprise level. The circumstance w...
Mar. 22, 2017 03:00 PM EDT Reads: 4,080
With major technology companies and startups seriously embracing Cloud strategies, now is the perfect time to attend @CloudExpo | @ThingsExpo, June 6-8, 2017, at the Javits Center in New York City, NY and October 31 - November 2, 2017, Santa Clara Convention Center, CA. Learn what is going on, contribute to the discussions, and ensure that your enterprise is on the right path to Digital Transformation.
Mar. 22, 2017 01:30 PM EDT Reads: 8,288
@DevOpsSummit at Cloud taking place June 6-8, 2017, at Javits Center, New York City, is co-located with the 20th International Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to wait for long developm...
Mar. 22, 2017 12:00 PM EDT Reads: 2,708
In his General Session at 16th Cloud Expo, David Shacochis, host of The Hybrid IT Files podcast and Vice President at CenturyLink, investigated three key trends of the “gigabit economy" though the story of a Fortune 500 communications company in transformation. Narrating how multi-modal hybrid IT, service automation, and agile delivery all intersect, he will cover the role of storytelling and empathy in achieving strategic alignment between the enterprise and its information technology.
Mar. 22, 2017 08:00 AM EDT Reads: 7,239
Without a clear strategy for cost control and an architecture designed with cloud services in mind, costs and operational performance can quickly get out of control. To avoid multiple architectural redesigns requires extensive thought and planning. Boundary (now part of BMC) launched a new public-facing multi-tenant high resolution monitoring service on Amazon AWS two years ago, facing challenges and learning best practices in the early days of the new service.
Mar. 22, 2017 03:30 AM EDT Reads: 2,780
All organizations that did not originate this moment have a pre-existing culture as well as legacy technology and processes that can be more or less amenable to DevOps implementation. That organizational culture is influenced by the personalities and management styles of Executive Management, the wider culture in which the organization is situated, and the personalities of key team members at all levels of the organization. This culture and entrenched interests usually throw a wrench in the work...
Mar. 22, 2017 01:00 AM EDT Reads: 2,696
As software becomes more and more complex, we, as software developers, have been splitting up our code into smaller and smaller components. This is also true for the environment in which we run our code: going from bare metal, to VMs to the modern-day Cloud Native world of containers, schedulers and micro services. While we have figured out how to run containerized applications in the cloud using schedulers, we've yet to come up with a good solution to bridge the gap between getting your contain...
Mar. 21, 2017 10:15 PM EDT Reads: 7,222
TechTarget storage websites are the best online information resource for news, tips and expert advice for the storage, backup and disaster recovery markets. By creating abundant, high-quality editorial content across more than 140 highly targeted technology-specific websites, TechTarget attracts and nurtures communities of technology buyers researching their companies' information technology needs. By understanding these buyers' content consumption behaviors, TechTarget creates the purchase inte...
Mar. 21, 2017 09:45 PM EDT Reads: 4,082