-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
Generic HTTP/2 workers #61
Conversation
Sync push only, one regid per notification, ugly code, tests not passing.
Some breaking changes in the on_response possible parameters. The return values try to be helpful. Batch not done yet with over 1000 registration ids.
This test case should fail.
# Conflicts: # lib/pigeon/gcm.ex
`on_response` is now passed `%Pigeon.GCM.NotificationResponse`
# Conflicts: # lib/pigeon/gcm_worker.ex
Nice. I was thinking about this exact refactor the other day. I still need to look things over but first things that come to mind: We used If we do migrate back to |
Hi, In regard to low download count: this is na erlang project and erlang world still either don't know about hex or simply don't use rebar3 that allow to do that. In my load testing I've tested several HTTP/2 client libraries and |
|
49c6a2a
to
087bb38
Compare
@hpopp couldn't you also get around the chatterbox issue by not including it as an explicit dependency but forcing people who want to use pigeon to add it separately as a dep/application? There are definitely other libraries that do that as well to circumvent the hex.pm issue |
That workaround still feels hackish and goes against my general philosophy for published packages. I wouldn't be opposed to some sort of configuration option that lets you specify the http2 client used. I'm not ready to give up on kadabra yet, but if others want to use chatterbox it should be perfectly acceptable. |
I published chatterbox to hex and happy to keep cutting releases when updates you need get accepted into chatterbox. |
Awesome! The only outstanding required feature is joedevivo/chatterbox#107. APNS will drop long-running connections if there's no activity. |
Ah yea, merging that now. |
Merged and I published version 0.4.2 to hex. |
Wrote an initial implementation of client adapters at #67. From my testing so far both of the I'm starting to lean more toward making |
@@ -2,95 +2,42 @@ defmodule Pigeon.APNSWorker do | |||
@moduledoc """ | |||
Handles all APNS request and response parsing over an HTTP2 connection. | |||
""" | |||
use GenServer | |||
use Pigeon.GenericH2Worker, ping_interval: 600_000 |
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.
@rslota any chance you can make this ping_interval configurable? some networks (such as AWS) require activity at a higher frequency so the ping has to be lower
@rslota how stable is this code compared to master? wondering if i could switch a production app to using this vs kadabra |
Updated to |
Closing with the published changes in |
This PR introduces a generic HTTP/2 workers that deduplicate lots of code from FCM and APNS workers. The FCM implementation is from #52 .
Also I've hanged HTTP/2 client library. This is due to fact that
Kadabra
is kinda slow and also, fails to deliver all messages when there are lot of streams open. In my load testingKadabra
showed many flaws, like dropped massages, corrupted connections, etc., whilechatterbox
is almost flawless (it need one small change: joedevivo/chatterbox#106).This PR is more like "to discuss" and may require more work.