Code Monkey home page Code Monkey logo

Comments (11)

kracekumar avatar kracekumar commented on August 23, 2024

@jace can I try this one or started working ?

from lastuser.

jace avatar jace commented on August 23, 2024

I haven't done any work on it so far. You will need to check out Flask-RQ and @kushaldas's Retask, to confirm they are suitable.

from lastuser.

kushaldas avatar kushaldas commented on August 23, 2024

zeromq is a better choice for message passing. RQ and retask are good in case of task queues.

from lastuser.

jace avatar jace commented on August 23, 2024

@kushaldas There's no message to be passed. Lastuser only needs to notify apps 1..10 that an update is waiting for them, and these apps will in turn contact Lastuser (via HTTPS) to get the message. Lastuser does not pass the message by itself because it's insecure (the client app may not be using HTTPS, and the client app has no way to authenticate a message from Lastuser).

So the requirement is, when an internal event happens (user edited their profile), Lastuser needs to fire off notices to a bunch of apps asking them to update themselves.

Lastuser runs single-threaded in a development environment. This means if it contacts the client app by itself, and the client app in turn connects to Lastuser, it'll get thread-locked. It needs to delegate contacting to an independent process.

from lastuser.

kushaldas avatar kushaldas commented on August 23, 2024

In that case having separate queues for apps and made them listen to it seems to be answer.

In retask one can just push the same task object to different queues.

from lastuser.

jace avatar jace commented on August 23, 2024

Apps can't listen to queues because they may not be on the same server, or even on a trusted host. Like with the Facebook example I've linked to, they are over the open internet.

Instead, we have an "app notifier" service that listens to the queue and fires off a HTTP request. This app notifier must run in parallel because an app may be offline or unreachable.

from lastuser.

kushaldas avatar kushaldas commented on August 23, 2024

On Fri, Dec 28, 2012 at 2:43 PM, Kiran Jonnalagadda <
[email protected]> wrote:

Apps can't listen to queues because they may not be on the same server, or
even on a trusted host. Like with the Facebook example I've linked to, they
are over the open internet.

Instead, we have an "app notifier" service that listens to the queue and
fires off a HTTP request. This app notifier must run in parallel because an
app may be offline or unreachable.


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-11728132.

Understood.

Kushal

http://fedoraproject.org
http://kushaldas.in

from lastuser.

jace avatar jace commented on August 23, 2024

@kracekumar Does this make sense for you? Do you think you can handle it?

from lastuser.

kracekumar avatar kracekumar commented on August 23, 2024

Understood, all the conversation. I can handle this, but don't know how long it is going to take. From high level it looks like whenever user modifies the profile do

1. Add to queue `kracekumar` has changed the profile.
2. Run Background worker to fetch all the apps subscribed to `kracekumar` and if the information is relevant to app do an HTTP POST to the client notification endpoint. I am looking into oauth2 whether notification has to be realtime(can it be queued).
3. What if client endpoint is down, just ignore  or resend later.

I want to do this since it is difficult. Since issue description says desperately needed, no issues if you want to take over.

from lastuser.

jace avatar jace commented on August 23, 2024

This is not part of the OAuth spec. The spec in fact says this is out of scope of the spec. We are on our own here. So:

  1. If the app has a callback endpoint defined (it's optional) and if the app has a valid OAuth token for the user, send them a notice.
  2. If the app is not reachable, drop it.

As simple as that.

from lastuser.

miteshashar avatar miteshashar commented on August 23, 2024

Can we close this issue?

from lastuser.

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.