Closed lukewyman closed 7 years ago
Hi Luke,
Sounds like you've been able to build on top of the examples to good use! (The link to your orchestrator actor does not work, so I could not look at the details).
Since these are the examples for the book, I prefer to keep them as is (also saves me from having to explain monad transformers in an updated version of the book ;-) but feel free to publish a more built out version of the example somewhere and refer to that repo to the one here.
Cheers, Ray
Hey @RayRoestenburg - I've been working on understanding Chapter 5 - Futures (hybridized with some Chapter 2 - Up and Running stuff) and came up with something that I like in a portfolio project I'm working on. You can check out my actor that works with Futures here.
Future[Either[SomeResponse]]
. TheLeft
has an error that captures what might have gone wrong when the HttpClient hit the microserviceBoxOfficeApi
from Chapter 2 - Up and Running to abstract away the ask-y future-y stuff, and mixed that into the orchestrator actorFuture[Either[SomeResponse]]
is a hassle, so I used theEitherT
monad transformer from cats to make niceflatMapF
calls andfor
comprehensions.Also, if there's a way I can simplify it down and adapt it to your TicketInfo example, I'd be happy to do a PR on this repo that builds a TicketInfo with calls to client actors that hit the webservices you refer to.