Following up on previous two posts, we propose a new architecture for combining functional paradigm with RESTful programming. We name it FAST architecture.

fast

Role of each piece of the FAST server is described below:

  • REST API provides a mechanism to post, update, delete and get resources.
  • Some of these resources could be generated dynamically in which case the REST API might interact with the Lambda Machine internally
  • The Lambda machine exposes certain functions to the client
  • The client can request resources or function calls. If it is a function call it is routed to Lambda Machine and if it is a resource requirement it is routed to the REST API

The key ingredients of lambda machine are:

  • Any calls to lambda machine will not have any side effects
  • The state inside lambda machine is immutable. Any mutable state is stores in the REST Server
  • User can directly call lambda machine

This architecture allows following calls to the FAST API:

  • Regular REST methods on resources: PUT, GET, POST, DELETE
  • Apply a function on a set of parameters and get the results
  • Apply a function on a resource
  • Apply a function on a set of parameters and post it to a resource
  • Apply a function on the results of another function
Follow

Leave a Reply

Your email address will not be published. Required fields are marked *