The basic agenda is to complete a simplified version of the pricing calculator homework task, and then expose a simplified version as REST API, then as a GraphQL API.
The overall goal of this workshop is to help participants understand how both of our open sourced Scala service templates are put together:
I'll help get people going, answer questions, but I won't be running it as an interactive follow-along workshop, you'll have to do the work yourself. The goal is to get you to learn by doing.
There is additonal reading material on some of the concepts presented at the end of this document.
To get started, click on the links for each of the sections. It's better if you do them in order, but feel free to skip ahead if you want.
-
Introduction to Scala
You'll learn about the basics of Scala, including:
By the time you move on from this section, you should ensure that you've completed the entire pricing calulator example.
-
Finch
Finch is the HTTP framework we use. We'll turn the pricing calculator into a HTTP API.
Upon completion of this section
-
GraphQL
We'll take the Finch API that we built, and make turn it into GraphQL API.
-
Fetch
We'll going to extend the code we've been building, to add a caching layer, using the Fetch library.
-
How the GraphQL Template API works
We'll then cover the GraphQL Template API, what it does, how it works, how it's built. Things like:
- Architecture
- Package structure
- Logging
- Request logging
- Authentication
- Metrics
- Monitoring
- Deployment
Depending on how you like to learn, you should also do some reading on Scala as you work through this cource. There's heaps of help.
There are a bunch of beginner Scala books (google them). The FP oriented books are good if you want that slant, though you may be best picking a more beginner's book.
If courses are more your thing, there's plenty to choose from. Ideally you should pick an introductory course, don't head straight for the deep tech.
- Twitter Scala School - Twitter's course is a great free resource (and covers some of the tech we use)
- Udemy
- Coursera
We make use of a bunch of frameworks, here's some more information if you'd like to dig deeper into them.
This is the HTTP framework we use. It's a small abstraction on top of Finagle.
- Finch best practices
- Finagle 101
- Finch 101
- Finch workshop (slides) & (code)
- Typed services using Finch
Finagle provides the main framework we use for creating services. We also use it's libraries for making outgoing connections to downstream services. You don't need to know Finagle to use Finch, but it helps if you want to tweak things (like timeouts & retries) or customise how errors are handled, etc.s