Tilkov rest doubts in a relationship

Chris Winters - Stuff on REST

Representation of participants' roles and role relationships; .. Stefan Tilkov: Addressing REST Doubts, zolyblog.info ➢. For machine-to-machine communication – i.e. typical RESTful web services If SPDY becomes successful – and I have small doubts it will – being can be linked to each other, allowing for hierarchies or other relationships;. 1Is REST best in a microservices architecture? . zolyblog.info tilkov-rest-doubts. 11 years ago by . 2Relationships Between Design Patterns.

A service is not a programming construct or a set of APIs, but rather an architectural unit of design, implementation, and maintenance and deployment artifact used for implementation of enterprise solutions.

The service functionality is defined by a service interface specific for a given servicewhich can be supported by multiple implementations. There are two basic ways of defining a service interface — RPC-style and messaging-style. RPC-style implementations use service invocation semantics and are defined through a set of parameters in the service interface.

A service semantic, in this case, is defined by the semantics of the input and output messages [4]. Historically, services are often defined as a collection of methods, but as explained in [2] these methods are independent from each other [5] and such collection serves as a namespace, simplifying the management of the services.

What is a resource? In the simplest case, a resource can be defined as a directly-accessible, independently-developed, deployed, managed and maintained software artifact supporting specific data. A resource can also relateto other resources and provide a reference link to them. In effect, a resource is similar to an object [6]but with a predefined CRUDish interface semantic. Unlike a service, where methods are completely independent and can be deployed as independent endpoints, methods on a resource follow OO semantics, which means that all of them except createResource have to exist on the underlying resource same URL.

Basic differences between Resources and Services Based on the above definitions of resources and services, it seems intuitively obvious that they are very different. As stated in [6]: And where exactly is the business logic? Is it in the stored procedures? We can think of services as stateless session beans and resources as entity beans.

Services — session beans — serve as controllers allowing execution of a required operation, regardless of the underlying resource. For example, a debit account service might take the account ID and the amount and debit required account. A single service can debit any of the existing accounts. Resources — aka entity beans — serve as a data access mechanism for a given instance of given data type.

For example, in order to debit a certain account, it is necessary to find a resource representing this account and then update it to debit the required amount. An additional caveat here is that unlike an entity bean which can implement any required method, a REST resource has only a single modify resource method.

This means that the actual business operation, the debit, has to be encoded as part of the request. What does this mean? Both will start with the business-aligned decomposition, but because they are using very different decomposition approaches they will result in completely different architectural styles [8] based on different set of components and connectors.

Another question is whether it is possible to build a complete system using true REST. Based on the above, it is a question of whether it is possible to build a complete system using only a database or entity beans.

Stefan Tilkov's Blog

Certainly you could, but it would require adding procedural code in the form of stored procedures overwriting the meaning of the methods or triggers doing post processing based on the data changes. The same is typically true for a true REST implementation — you have to change the meaning of the modifyResource method often using command pattern to do more than data update. Seems to be interesting, too; I remember I looked at it a long time ago, but never in depth. What do you think?

What else is worth a look? My hope is that readers who know more will educate me. Supporting true multiplexing on top of a single TCP connection is great. There is no way anybody can prefer the HTTP 1. Browsers having to open separate connections to the same server to achieve parallelism is not a satisfactory solution.

Reducing header overhead is also an excellent idea. I used to not care much for the push support, i. On the first request of a page and the subsequent request for the resources that are referenced in that page, Jetty will build a map based on the Referer header — it essentially remembers which secondary resources a page references.

When the next request comes along, it can actively send the referenced resources before the client actually asks for them. While I totally concede that most traffic on the Net is and should be encrypted, there are many use cases e.

While SPDY proponents point to impressive performance improvements, they are the more impressive the worse the website is implemented. For sites that are already optimized in terms of front end performance, e.

Is REST the future for SOA?

That said, some of the things we do in terms of optimization, e. For machine-to-machine communication — i. One of the sad but inevitable things when introducing a binary protocol as opposed to a text-based one is reduced transparency for humans.

If SPDY becomes successful — and I have small doubts it will — being able to telnet to a servers port 80 is going to be what I miss most.

Most of the time we use the classical conference format an innoQ guy presents something, followed by sometimes controversial discussionbut we use other approaches, such as open spaces, pecha kuchas, and lightning talks, too. We occasionally invite guests we were lucky to have e. Prague, Barcelona, Paris, Rome, Budapest, and Strasbourg; these are the only events where we actually spend a day just sightseeing.

Some of the events focus on project reports, others are programming events, one event per year is dedicated to company strategy. What is amazing to most people I talk to about this is the frequency we do this with, and the resulting amount of time, effort and money we invest. We do events per year, 2 of them three days long, the rest two days.

Events are always scheduled during regular workdays, typically Thursdays and Fridays; attendance is mandatory. Company events are among the very best things about innoQ.

Is REST the future for SOA?

Stefan Tilkov, Jun 22nd, Hypermedia is the topic that generates the most intensive discussions in any REST training, workshop, or project. While the other aspects of RESTful HTTP usage are pretty straightforward to grasp and hard to argue with, the use of hypermedia in machine-to-machine communication is a bit tougher to explain.

Of course these documents themselves can be linked to each other, allowing for hierarchies or other relationships; they can support queries that return a subset of services; they can be provided by different servers themselves; and they are way more dynamic than a typical registry setup. In other words, the very simple approach included in HTTP is far more powerful than what most crazily expensive registries provide. The merits of being able to link to resources can be exploited to add functionality to existing systems without breaking their contracts.

This is most visible in server responses that have one or more places where you can put additional links. As your server or service evolves, you can add links that will be ignored by existing clients, but can be used by those that rely on them.

What I mean by this slightly weird term is the fact that while resources that are exposed as part of a service interface are sometimes or maybe even often designed in a way that requires them to be part of the same implementation, they very often are not, i.

I know, lenghty this is probably not.