-
Notifications
You must be signed in to change notification settings - Fork 73
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
removing tunneling requests #46
removing tunneling requests #46
Conversation
It would be nice to add these changes to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment. otherwise this looks good to me
895c9e2
to
796092a
Compare
Map.put(req_data, "id", index + id) | ||
end) | ||
|
||
_ = Counter.increment(:rpc_counter, id + Enum.count(params)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious: why do we update the counter by the number of params?
I would have expected we always incremented it by 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was also wondering what the idea is (but didn’t want to address it as it’s not part of the PR). I think this is preparing the requests for the batch call - so the number of calls in a batch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Yeah, agreed this is outside the scope of this PR. I made an issue so we can look into it. 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question. Otherwise LGTM! Thanks!
Removed the GenServer that was the originating process performing the HTTP requests.
Added a ETS table/module that tracks the RPC counter and exposed the needed functionality.
The underlying http client - hackney - now maintains a pool of connections named default.
https://github.com/edgurgel/httpoison#connection-pools
Other issue:
IpcServer is still funnelled. If there's demand we could define a worker number and open a pool of IPC connections that IpcClient would use and rotate between them.