Code Monkey home page Code Monkey logo

Comments (1)

kiwicopple avatar kiwicopple commented on May 18, 2024

Hey @WoodyDark. Note that this repo is a part of Supabase, so everything I comment here is about this specific repo, not Supabase (which bundles this server + many other components).

How do we handle authentication in this case?

This server is a case of "do one thing well". It's brings event sourcing (realtime) to postgres, and we are assuming that you will put it behind a proxy. You can see that retendo is doing this in issue #43 .
That being said, we are working on the authN/authZ requirements for the Supabase platform, and it may trickle down all the way to this server.

If a User has_many Blogs, how do I ensure that the current_user is only subscribing to changes of blogs that belong to them?

This would probably be done with something like:

var allChanges = this.socket
  .channel('realtime:public:blogs:user_id.eq.3') // add your column filter here
  .join()
  .on('*', payload => { console.log('Update received!', payload) })

Question 3:
Is there a recommended way to handle business logic?

Not in this server. On our platform we will probably allow you to either bake it into the database (functions) or run it on the edge (workers/serverless). This is still being designed.

I'll close this now, but feel free to reopen if you have any questions

from realtime.

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.