Implementing effective caching algorithms from scratch could take a lot of time and effort. Luckily, there are quite a few proven strategies to deal with caching that the Spray framework provides out of the box.
- View Offline
- [Narrator] In the previous video,…we learned what is caching in general…and how it is supported by HTTP protocol specification.…In this video, we're going to take a look…at the couple of different levels of caching support…in Spray framework.…We're going to begin by introducing new module.…Spray caching and a few cache implementation strategies…it provides.…Then, we're going to slowly drift towards…Spray routing directives,…which are dedicated to caching and eTag support.…
Close to the end of the video,…we will enhance our book catalog restful web services…by integrating caching and conditional request…headers processing.…It is fair to say, that Spray caching provides one thing…and one thing only.…The cache abstraction and bundles a couple of…in memory cache implementations.…However, what distinguishes the Spray's approach…is that instead of caching the concrete value,…which most of the cache implementation do,…the future is being stored in the cache.…
Spray caching is built around simple cache trait.…Out of the box, there are two implementations provided.…
Embark on an exciting journey into the universe of web development using the Scala programming language and frameworks—natural choices for back-end developers building highly scalable, reliable, and reactive RESTful web services and APIs. This training is the starting point for mastering the nonblocking and asynchronous programming models that lie in the heart of the Spray framework. It starts with an introduction to the REST architecture. Then switch gears to the Akka toolkit and framework, building a sample book catalog application along the way.
Once you've learned about the REST architectural style and Actor model—the foundations that the Spray framework is built upon—you'll shape out your own RESTful web services by providing simple route definitions. Further on in the course, author Andriy Redko delves into authentication and authorization, secure transport, documentation, testing, and caching support. Finally, you will learn how to develop the Spray client API to call external web services.
- The Actor model and Akka framework
- RESTful architecture principles and constraints
- Building RESTful services
- Core Spray framework modules such as spray-can, spray-routing, spray-json, spray-caching, and spray-client
- Securing RESTful web services and APIs with Spray
- Configuring Spray applications with HTTPS support
- Documenting Spray RESTful web services using Swagger
- Caching basics
- Calling external RESTful services