-
Notifications
You must be signed in to change notification settings - Fork 1
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
Developer may forward events normalized by compensated to a downstream endpoint #49
Comments
Creating an abstraction interface and standard json spec for the interface as a first step |
It wouldn't have to be an explicitly JSON one. Something of a documented API would be enough. OpenAPI / Swagger is excellent for this (it can even reduce the amount of code needed to be written - but I have to check this) |
Eh, that actually proved to be more annoying to provide generated libraries - especially if they don't leverage language specific features. If we can produce a "spec" of the expected endpoints and responses though (still doable using something like Open API) then it'd be a living reference point. |
@jalcine - I'm curious if the Spec documented in That is the rough sketch of what data comes out of Compensated, and while I would love for fancier automated tooling; automated tooling often comes with a steep learning curve and carry cost. |
@lanegrant - This ticket seems to be really big, so I've added the "epic" label so it doesn't feel like something that needs to be done all at once. If you have requests for support, creating a Github Issue and tagging me with it is the best way for me to know what specific supports you would expect are missing. I am trying to thread the needle on being supportive without inflicting help and making space for folks to take ownership without throwing them in the deep end, and I am better at that when people "pull" my attention instead of me pushing it on them (and smothering them). One way to do that, if you are comfortable doing so, is to post the output of each work session as a pull request (or new issue or comment) so that we can "katamari damacy" towards the full implementation as a team. |
See #49 Initializes gem folder structure and hooks the specs into CI
See #49 Initializes gem folder structure and hooks the specs into CI
* 🎉Sprout initial compensated-proxy gem See #49 Initializes gem folder structure and hooks the specs into CI * ✨Forward requests to the downstream endpoint We're relying on the built in Net::HTTP class, because that keeps our dependency graph down to zero. * ♻️It felt odd to have a `Compensated::Proxy::Service` * ♻️ Inline Forwarder class as it is no longer useful It was useful when thinking about the problem, but just adds clutter now that we have decent tests. * Don't use hardcoded strings because they don't play nice with timezones * 🎨 💡 Document the classes and apply linting I'm not sold on rubocop, especially since rubyfmt is so close to a production release. However, I am not going to worry too much about it for now. * 🚧✨ CLI app for forwarding formatted events (#69) This is still pretty rough, but the general bones are there. You can now use the executable compensated-proxy in place of writing your own forwarder in Ruby. This should make it a bit easier for folks who _do not_ want to write their entire application in Ruby to do use compensated for reformatting payment, invoice and subscription related events across payment providers.
In Order to Use Compensated in Systems that are not written in Ruby
As a Client Developer
I would like to be able to use Compensated to forward the normalized events.
This Issue May Be Closed When
compensated-proxy
ruby gem that can be installedfeatures/forwarding-proxy.feature
file is created and fleshed out with the happy path (but not necessarily wired in)Scenarios
Context
Because compensated is currently only written in Ruby; and we are getting requests from folks who want to use it in python, node, and other languages we may want to provide a micro-service version of compensated that can listen for events from upstream payment processors; normalize their data; and forward the normalized data down.
Ideally, this would be done by executing a few simple commands; such as
gem install compensated-proxy && compensated-proxy --forward-to=https://your-other-app.example.com/compensated_events
or a Kubernetes/docker equivalent.We'll probably want to rely on
puma
for the ruby webserver side of things; or it may be possible to package it up as a boring rack app. The Traveling Ruby package may give us what we need for packaging the full executable up. Or we can assume they can manage their own ruby and rely on executables in our gemspec.The text was updated successfully, but these errors were encountered: