Serverless Architectures - 0 views
-
Serverless was first used to describe applications that significantly or fully depend on 3rd party applications / services (‘in the cloud’) to manage server-side logic and state.
-
‘rich client’ applications (think single page web apps, or mobile apps) that use the vast ecosystem of cloud accessible databases (like Parse, Firebase), authentication services (Auth0, AWS Cognito), etc.
- ...33 more annotations...
-
Serverless can also mean applications where some amount of server-side logic is still written by the application developer but unlike traditional architectures is run in stateless compute containers that are event-triggered, ephemeral (may only last for one invocation), and fully managed by a 3rd party.
-
A good example is Auth0 - they started initially with BaaS ‘Authentication as a Service’, but with Auth0 Webtask they are entering the FaaS space.
-
deleted the authentication logic in the original application and have replaced it with a third party BaaS service
-
replaced a long lived consumer application with a FaaS function that runs within the event driven context
-
server applications - is a key difference when comparing with other modern architectural trends like containers and PaaS
-
the only code that needs to change when moving to FaaS is the ‘main method / startup’ code, in that it is deleted, and likely the specific code that is the top-level message handler (the ‘message listener interface’ implementation), but this might only be a change in method signature
-
Most providers also allow functions to be triggered as a response to inbound http requests, typically in some kind of API gateway
-
you should assume that for any given invocation of a function none of the in-process or host state that you create will be available to any subsequent invocation.
-
if you were writing a low-latency trading application you probably wouldn’t want to use FaaS systems at this time
-
An API Gateway is an HTTP server where routes / endpoints are defined in configuration and each route is associated with a FaaS function.
-
API Gateway will allow mapping from http request parameters to inputs arguments for the FaaS function
-
the Serverless Framework makes working with API Gateway + Lambda significantly easier than using the first principles provided by AWS.
-
'Serverless' to mean the union of a couple of other ideas - 'Backend as a Service' and 'Functions as a Service'.