calebmer / connect

10 stars 2 forks source link

Realtime comments #23

Closed Domthegrom closed 5 years ago

Domthegrom commented 5 years ago

@calebmer Postgres has listen/notify functionality. Maybe we can just use that? https://www.postgresql.org/docs/current/sql-notify.html Does it scale though, is the question. If we can use Postgres for realtime, that would be awesome. All of the privacy logic is in Postgres already so that means we wouldn’t have to replicate privacy rules. Some resources:

• Ruby Postgres job queue: https://github.com/chanks/que • Rust Postgres job queue: https://github.com/sgrif/swirl

The current plan is to use Digital Ocean for infrastructure. With this infra in place the question now becomes are we able to leverage any services to help handle Realtime comments/notifications. Could we tap into https://aws.amazon.com/sns/ for our needs of push notifications and for realtime notifications?

This really depends on how we want to build our system. We could go the Postgres route and build a completely custom notification handler but this might take some time and derail our MVP date. If this is okay this may be the route.

Using AWS from the beginning doesn't intrinsically tie us to them forever. Their pricing model is advantageous for our beginning, it's pay as you go, for our immediate short term goals of an MVP by the 15th of May this looks really good. Another note is that AWS SNS (Simple Notification Service) is proven and used in production in many places. It's well documented and relatively easy to work with.

TheJoeCollins commented 5 years ago

I have used the AWS notification service before and it was relatively straight forward to add. It also provides you with the ability to group people and send notifications to only those specific groups which we can build but most of this stuff is straight out of the box with AWS.

I think the services for the time being are relatively cheap as well.