Git Product home page Git Product logo

Comments (16)

5war00p avatar 5war00p commented on July 26, 2024 1

Instead of creating a new table, we use SELECT * FROM pg_stat_activity WHERE channel = 'my_channel' to get all the subscribers that are connected to a particular channel, if the the rows > 0 then will broadcas the messages.

cc: @riderx

from capgo.

algora-pbc avatar algora-pbc commented on July 26, 2024

๐Ÿ’Ž $50 bounty created by Capgo
๐Ÿ™‹ If you start working on this, comment /attempt #411 to notify everyone
๐Ÿ‘‰ To claim this bounty, submit a pull request that includes the text /claim #411 somewhere in its body
๐Ÿ“ Before proceeding, please make sure you can receive payouts in your country
๐Ÿ’ต Payment arrives in your account 2-5 days after the bounty is rewarded
๐Ÿ’ฏ You keep 100% of the bounty award
โ„น๏ธ If something is not clear ask before working on it, otherwise your chance to rework it is high
๐ŸŽฅ To claim you need to provide in your PR a demo video of the change
๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Join the Discord to get help
๐Ÿ“ Check all Bounty rules
๐Ÿ™ Thank you for contributing to Cap-go/capgo!

Attempt Started (GMT+0) Solution
๐Ÿ”ด @5war00p Oct 12, 2023, 8:08:47 AM WIP
๐Ÿ”ด @mrkirthi-24 Oct 22, 2023, 7:29:28 PM WIP
๐Ÿ”ด @WcaleNieWolny Nov 5, 2023, 10:45:14 AM WIP

from capgo.

5war00p avatar 5war00p commented on July 26, 2024

/attempt #411

Options

from capgo.

5war00p avatar 5war00p commented on July 26, 2024

Proposal:
Hey @riderx, instead of subscribing to normal channel, I'm gonna directly subscribe to database changes: https://supabase.com/docs/guides/realtime/subscribing-to-database-changes
And instead of doing while(true) will take the changes returned from subscribed channel and call uploadData func

from capgo.

riderx avatar riderx commented on July 26, 2024

@5war00p this is not possible, because the CLI do not login like user but with API key.
So RLS cannot work.
And in top of that in production now we use ClickHouse so the data are not stored to supabase anymore so the solution shouldn't watch stats table, but something else.

from capgo.

riderx avatar riderx commented on July 26, 2024

I'm sorry I didn't gave the background on why this is already like this ^^

from capgo.

5war00p avatar 5war00p commented on July 26, 2024

Hm, then realtime broadcast is the one we should be looking into. In that case we need to open a channel connection on sending side and broadcast, so you are saying create a new table to track each client logs state. right?

from capgo.

algora-pbc avatar algora-pbc commented on July 26, 2024

@5war00p: Reminder that in 5 days the bounty will become up for grabs, so please submit a pull request before then ๐Ÿ™

from capgo.

algora-pbc avatar algora-pbc commented on July 26, 2024

The bounty is up for grabs! Everyone is welcome to /attempt #411 ๐Ÿ™Œ

from capgo.

mrkirthi-24 avatar mrkirthi-24 commented on July 26, 2024

/attempt #411

Options

from capgo.

algora-pbc avatar algora-pbc commented on July 26, 2024

@mrkirthi-24: Reminder that in 5 days the bounty will become up for grabs, so please submit a pull request before then ๐Ÿ™

from capgo.

algora-pbc avatar algora-pbc commented on July 26, 2024

The bounty is up for grabs! Everyone is welcome to /attempt #411 ๐Ÿ™Œ

from capgo.

WcaleNieWolny avatar WcaleNieWolny commented on July 26, 2024

I will be attempting this. I figured out how to authenticate as a user using JWT from CLI. (How to authenticate using apikey while generating JWT) thus the 'So RLS cannot work' is no longer relevant

/attempt #411

Options

from capgo.

algora-pbc avatar algora-pbc commented on July 26, 2024

@WcaleNieWolny: Reminder that in 5 days the bounty will become up for grabs, so please submit a pull request before then ๐Ÿ™

from capgo.

algora-pbc avatar algora-pbc commented on July 26, 2024

The bounty is up for grabs! Everyone is welcome to /attempt #411 ๐Ÿ™Œ

from capgo.

riderx avatar riderx commented on July 26, 2024

This has been fixed by using Clickhouse direct read for now with a loop

from capgo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.