-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
“Fan out” services? #745
Comments
I believe this is better discussed interactively over a Discord or so. Specific to your suggestion I believe it would help others to engage if you can give a full example using the current tower libraries as-is. And thus implement one such prime example outside of tower. This would give an idea and a starting point to talk beyond this abstract proposal. I'm saying because as it is written down it can still go many directions and it is very easily to start talking next to one another. An example (or examples) as a starting point with real working code would help a lot to move this forward, if it to ever move forward at all. |
(FWIW, I prefer discussion on issues since it's easier to find again, and chat tends to encourage faster less thought out replies.) |
I like a combination, where you can have quick thoughts exchanges over chat, and then write summaries and more thought out replies in issue based on those new insights. But I'm fine with any style that you as a maintainer prefer. So ok, cool, let's do it like that! :) |
Hi guys, great library. I’m still a young rustacean, but I recognise this pattern from other ecosystems. (It’s excellent for ETL work btw).
I thought I’d share a few ideas for services that I’ve found to be useful in the real world. I’d be grateful if you’d tell me if some has already implemented them, or if you’d consider them to be included in the main library.
One thing I’ve found particularly useful is the ability to write the equivalent of a Service thats “fans out” a request into multiple requests.
A few examples from the real world (a scary place btw).
Upon receiving a “token expired” from an api, send another request (to get a new temporary token) then retry.
Upon receiving a “request requires too much for our servers” error response:
a) mutate the current request (ask for less data) or
b) split request into multiple other requests, each asking for less data, and fire them in parallel or sequentially.
even before sending a request, split it up into multiple requests, and fire in parallel or sequentially.
I know this business logic could be built outside of tower services, but it’s really nice to have it as composable services + I reach for these solutions again and again.
I imagine the business logic could be give to the services as clojures, to have them remain generic.
I know this issue is more of the “open discussion” kind, but I couldn’t see any other forum, so I hope you’ll bear with me.
The text was updated successfully, but these errors were encountered: