Skip to content
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

Remove primus dependency [$3k bounty] #576

Closed
taoeffect opened this issue Jun 25, 2019 · 1 comment · Fixed by #1052
Closed

Remove primus dependency [$3k bounty] #576

taoeffect opened this issue Jun 25, 2019 · 1 comment · Fixed by #1052
Labels
App:Backend App:Frontend Kind:Core Anything that changes or affects the fundamental core data structures & design of the application. Level:Advanced Note:Bounty These issues have bounties assigned to them

Comments

@taoeffect
Copy link
Member

taoeffect commented Jun 25, 2019

Problem

  • Primus is a large dependency (and we don't need it)
  • Primus constantly regenerates frontend/controller/utils/primus.js, which is kinda annoying
  • npm audit gives two low severity vulnerabilities, one for primus-rooms and one for primus-responder because they use an old version of debug

Solution

Research:

The solution should rely on as few moving pieces as possible so that it works well with our future switch to Deno (#586).

Bounty

$3k bounty for a clean solution to this (paid in cryptocurrency).

@taoeffect taoeffect added Note:Up-for-grabs App:Frontend App:Backend Level:Advanced Kind:Core Anything that changes or affects the fundamental core data structures & design of the application. labels Jun 25, 2019
@taoeffect taoeffect changed the title Remove primus dependency Remove primus dependency [$3k bounty] Jan 20, 2021
@taoeffect taoeffect added the Note:Bounty These issues have bounties assigned to them label Jan 20, 2021
@taoeffect
Copy link
Member Author

Adding a $3k bounty for closing this issue for non-contractors (meaning, if you don't have a development contract with okTurtles, and you'd like to close this issue, you can work on it, and if we accept your PR, you'll receive the bounty).

Anyone else can add to the bounty too if they'd like by following these simple steps:

  1. Donate the amount you'd like to dedicate to this issue to the okTurtles Foundation.
  2. Make a comment here (or privately to us via Gitter or Slack) the same day letting us know you'd like your donation to be used for a bounty to close an issue, and which issue that is.

taoeffect pushed a commit that referenced this issue Apr 8, 2021
* Update the ws library to 7.4.3

* Upload new pubsub utilities

* Update .Gruntfile.babel.js to no longer use Primus

* Use GIPubSub in backend/index.js

* Use GIPubSub in backend/server.js

* Upload frontend/controller/instance-keys.js

* Use GIPubSub in frontend/main.js

* Use GIPubSub in frontend/controller/backend.js

* Use GIPubSub in backend unit tests

* Drop unused dependencies to Primus and its plugins

* Update shared/constants.js to fix a Flow error

* Make the pubsub server console output less verbose

* Delete unused makeResponse in shared/functions.js

* Remove unreliable remote address logging

* Remove unnecessary option copying

* Improve logging of pubsub events and errors

* Disable automatic reconnection until it's robust

* Use event names without "on" in event handler maps

* Comment Flowtype usage in pubsub

* Fix Flow errors

* Delete unused shared/constants.js

* Update comments and use more descriptive names

* Update sub() and unsub() methods

* Fix a type error in notification broadcasting

* Move backend/utils/pubsub.js one directory up

* Update reconnection on online events

* Add .isNew and .shouldReconnect client properties

* fixup! Fix a type error in notification broadcasting

* Terminate the connection upon invalid messages

* Add support for the 'manual' createClient() option

* Remove unused isConnecting() and isReconnecting()

* Update the pubsub client's default options

* Implement the `reconnectOnDisconnection` option

* Add random pubsub client ID to help debugging

* Implement the maxRetries pubsub client option

* Add broadcast() and enumerateSubscribers() methods

* Add broadcast() and enumerateSubscribers() methods

* Fix yield-star-spacing lint error

* Fix getNextRandomDelay() and upload unit test file

* Define and use a few Flow enum types

* Refactor createNotification() and its callsites

* Optimize serverside SUB and UNSUB message handlers

* Fix lint error

* Add 'backend/server/broadcastEntry' sbp selector

* Use NOTIFICATION_TYPE.ENTRY instead of 'entry'

* Implement ping/pong strategy like in Primus

* Stop logging 'backend/server/broadcastEntry' calls

* Fix failedConnectionAttempts not updating correctly

* Refactor shared/pubsub.js

* Refactor some parts of backend/pubsub.js

* Log the number of connections on connection event

* Implement custom reconnection events

* Implement _.randomBytes() and _.randomHexString()

* Use SBP selectors for custom pubsub events

* Refactor message handlers to use `this` less often

* Refactor handlers to use fewer `this` bindings

* Document default option values for createServer()

* Move pubsub event constants to shared/pubsub.js

* Increase Cypress command timeout from 5s to 10s

* Pass explicit timeout to createGIPubSubClient()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App:Backend App:Frontend Kind:Core Anything that changes or affects the fundamental core data structures & design of the application. Level:Advanced Note:Bounty These issues have bounties assigned to them
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant