Implementing non-CRUD operations

Some applications will have operations that can't easily be characterized via CRUD verbs. We might, for example, have a Remote Procedure Call (RPC) style application that performs a complex calculation. Nothing is really created on the server. We might think of RPC as an elaborate retrieve operation where the calculation's arguments are provided in each request.

Most of the time, these calculation-focused operations can be implemented as the GET requests, where there is no change to the state of the objects in the server. An RPC-style request is often implemented via the HTTP POST method. The response can include a Universally Unique Identifier (UUID) as part of tracking the request and responses. It allows for the caching of responses in the cases where they are very complex or take a very long time to compute. HTTP headers, including ETag and If-None-Match, can be used to interact with the caching to optimize performance.

This is justified by the idea of preserving a log of the request and reply as part of a non-repudiation scheme. This is particularly important in websites where is a fee is charged for the services.

Let's take a look at the REST protocol and ACID in the next section.

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

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