Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The push library we've used forever, buford, was archived by the maintainers in early June of 2023. I quickly looked at a couple other libraries:
However, because our use of APNs for MDM purposes is limited in scope and we don't need the bells and whistles of an app-focused APNs library I took a stab at implementing just native HTTP/2 connections ourselves. There's not a whole lot of magic to make it work.
This PR plugs right into the
PushProvider
andPushProviderFactory
interfaces and is enabled with a 1-line change inmain()
.It works as is:
In addition to general tidy and docs I want to take a look at parallelization. The existing buford integration makes use of buford's Queue system when there is more than one notification. This spawns workers to try and speed up delivery. I'd like to think more on whether we should have a worker system, too, to quickly send notifications. I know that for our org, as DDM looms, we'll have much more multi-command/push situations coming up. Though, I want to think through how parallel the HTTP library itself is to see if this is necessary, because we issue all requests to a single
http.Client{}
.