Giter Site home page Giter Site logo

Comments (5)

billy1380 avatar billy1380 commented on July 29, 2024

I am not sure I explained myself very well so I have submitted a pull request ( #14 )... I suspect it is not correct for merging... but something along those lines

from appengine-pipelines.

eschultink avatar eschultink commented on July 29, 2024

+1

although I'm not entirely clear why you don't want the child jobs to wait on the PromisedValue, if indeed they need its value at some point. But I have a similar need to be able to create a PromiseValue from a handle.

Specifically, I'm pulling in a bunch of data from a 3rd party API using a single fetch job. I have other calculation jobs that depend on that data. I want to start the fetch as soon as my user does the OAuth grant giving my app access, as it potentially takes a while. But I don't yet know the exact data ranges that user will want for the calculation, so the fetch job can't trigger the calculation jobs. Hence I want to start the fetch job, get a PromisedValue for its completion, store its handle somewhere, and then use that handle to make my calculation jobs wait until the data fetch is complete before they actually run (or run immediately if it is indeed complete when they're created).

Alternatively, creating a FutureValue from a JobInfo instance (retrieved using a job handle) could also meet my need. But JobInfo.getOutput() provides a value (an Object) only after the job is complete - not a Value<T> that you could use as an input slot to another job.

from appengine-pipelines.

billy1380 avatar billy1380 commented on July 29, 2024

I need to sort out a bunch of comments and some unit tests for this to go forward, there are no technical obstacles to the changes. I will try to get it done by Monday 11th May 2015.

from appengine-pipelines.

aozarov avatar aozarov commented on July 29, 2024

@billy1380 great, waiting to see your updates.

@eschultink why don't you start the calculation job with and make it depends on a PromisedValue X.
pass the X's handle to your fetch job and fill the promised value once fetch is completed (you can have
more than X promised values to store the ranges that you need for the calculation.

from appengine-pipelines.

billy1380 avatar billy1380 commented on July 29, 2024

@aozarov Updates are now in, thanks for the patience.

from appengine-pipelines.

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.