Serverless: Presentation Layer
The following post is part of a series of articles chronicling my journey into serverless implementation via a sample Case Study using a minimal viable product (MVP). TL; DR the source code used for the implementation and instructions on how to run the app locally are on GitHub.
Since the application infrastructure is based on keeping the implementation serverless, the presentation layer is very minimal. End users have two points of contact with the system; namely, via
- Text message and
- Roku devices.
The mobile experience is almost `UI-Less` as users will use their phones to send text messages to manage aspects of the application such as registration and managing feeds. The living room experience is a little more involved as users have to authenticate and access their photo feeds on TV.
Most of the presentation layer for the application lives in the Roku application that will authenticate and present photo feeds to users. A Roku SeceneGraph takes the responsibility of parsing user-submitted photo and displaying them at an interval on the TV. On the other hand, a preconfigured looping task acts as a polling mechanism to get recently updated feeds from the serverless endpoint.
Serverless Design Considerations: I have made the timeout for accessing feeds from the serverless endpoint slightly greater than I usually allow for always-connected server endpoints to account for potential delay in starting the serverless function.
Despite the generous timeout, based on analytics I gathered from my sample dataset the serverless endpoint responds to request in less than 250ms function processing time (i.e. without accounting for network and device delays).