Sample app to demonstrate isolating domains
Runcontext of the App- This is the context in which the application is being run. In our case it's
IO - The application is either running or it's failed and unrecoverable'
- This is the context in which the application is being run. In our case it's
HandledThe context of our services- This is the context used for expected errors
TracedThis context wraps theHandledcontext and provides aReaderTwith aTracedContextto access
- Java’s TheadLocal possible for context propagation only in case of synchronous invocations;
- Monix has Local implementation, which can deal with context propagation for Task and Future.
- ZIO has FiberRef for context propagation in terms of fiber
- Cats Effect IO’s recently got Fiber Locals similar to previous solutions
- Edit the
application.conf#external-api.urivalue to a different url (e.g.external-api.uri = "https://google.com/")
http POST localhost:3000/domain/short author=shane name=tony
http POST localhost:3000/domain/long author=Shane name=Tony
1.http localhost:3000/domain
2.http POST localhost:3000/domain/short author=Shane name=Tony
3.http localhost:3000/domain