Comments (16)
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.
๐ $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.
/attempt #411
Options
from capgo.
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.
@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.
I'm sorry I didn't gave the background on why this is already like this ^^
from capgo.
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.
@5war00p: Reminder that in 5 days the bounty will become up for grabs, so please submit a pull request before then ๐
from capgo.
The bounty is up for grabs! Everyone is welcome to /attempt #411
๐
from capgo.
/attempt #411
Options
from capgo.
@mrkirthi-24: Reminder that in 5 days the bounty will become up for grabs, so please submit a pull request before then ๐
from capgo.
The bounty is up for grabs! Everyone is welcome to /attempt #411
๐
from capgo.
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.
@WcaleNieWolny: Reminder that in 5 days the bounty will become up for grabs, so please submit a pull request before then ๐
from capgo.
The bounty is up for grabs! Everyone is welcome to /attempt #411
๐
from capgo.
This has been fixed by using Clickhouse direct read for now with a loop
from capgo.
Related Issues (20)
- Allow management email to be duplicated HOT 1
- Fake logsnag
- Reduce egress usage of update endpoint
- Fix admin missing right in has_app_right and has_app_right_userid
- Fix db lint issue HOT 2
- Allow user to create user if they don't exist when adding to org HOT 1
- Fix UX 2FA
- Refactor minUpdateVersion to follow db convention HOT 1
- Delete image on all delete or user delete
- Add cron function to autocorrect bundle meta
- Allow custom name on API key
- Allow apikey to have org biding
- Allow user to create org as many as they want
- Allow user to transfer app to different org
- Use formkit everywhere instead of input everywhere HOT 1
- Remove usage of konsta UI HOT 1
- Duplicate hosting source of bundle
- Transfer out global app to D1
- Transfer grafana to fly.io HOT 1
- Disallow 2 channels with the same name for 1 app HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capgo.