Giter Club home page Giter Club logo

Comments (8)

buchanae avatar buchanae commented on May 28, 2024

So funnel would publish task updates to a messaging system, and clients would subscribe to that (more scalable) system?

from funnel.

jbingham avatar jbingham commented on May 28, 2024

Yes, that's a sensible implementation. Maybe there's a way at task submission time to also provide a URL to POST status updates to. Then Funnel doesn't have to know about the pub/sub system, and it can be a separate thing. I don't now if pub/sub systems typically have a REST API though.

from funnel.

buchanae avatar buchanae commented on May 28, 2024

What is the delivery guarantee for the publishing? At most once?

from funnel.

jbingham avatar jbingham commented on May 28, 2024

Good question. Whatever guarantee the selected pub/sub implementation provides?

from funnel.

buchanae avatar buchanae commented on May 28, 2024

At most once delivery from Funnel would (obviously) be the least complex, and for that reason my preference. However, while the pub/sub server maybe be 99.999% available, in that 0.001% of the time when the message is lost, a subscriber would not recover (e.g. it might never see that a task finished).

An alternative could be publishing "current state" messages instead of "state change" messages. I.e. Funnel publishes an event every N seconds that says "task X is running".

from funnel.

jbingham avatar jbingham commented on May 28, 2024

Sure, letting Funnel be a pub/sub provider is the easiest first pass.

A pub/sub server would be more reliable. It would be up to callers to check for the rare cases where messages get lost. That seems fine.

I'd recommend against sending heartbeats out by pub/sub. The main motivation for pub/sub rather than polling is to cut down overhead with too-frequent state updates.

from funnel.

buchanae avatar buchanae commented on May 28, 2024

We have defined an events package here:
https://github.com/ohsu-comp-bio/funnel/tree/master/events

I have stackdriver logging event writer on a branch here: https://github.com/buchanae/funnel/blob/smcrna/gcp/stackdriver.go
A Google pub/sub writer would be easy to add.

This issue also mentions using pub/sub (or app engine task queues, rabbitmq, celery, etc) as the internal work queue (as opposed to events from a task that is already running). The smcrna branch linked above is using pub/sub.

Do we need an API endpoint which clients can use to subscribe to task events? Would this become part of the TES spec? Or are clients expected to connect directly to the underlying infrastructure (e.g. Google pub/sub)?

from funnel.

adamstruck avatar adamstruck commented on May 28, 2024

Basic support added for our event stream in #465

The event messages Funnel currently emits are defined here:
https://github.com/ohsu-comp-bio/funnel/blob/master/events/events.proto

from funnel.

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.