Giter Club home page Giter Club logo

Comments (8)

spodila avatar spodila commented on July 29, 2024

Fenzo does not store task requests internally, it only stores the leases (aka, offers). There are already several ways to ensure the leases are expired timely.

Or, are you suggesting that you'd like to have a queuing mechanism in Fenzo?

from fenzo.

q10 avatar q10 commented on July 29, 2024

I have a framework with Fenzo running in a infinite loop on another thread (this is based on the example framework code provided in Fenzo repo). What I noticed was that when I insert a TaskRequest and resources together in scheduler.scheduleOnce(), and the TaskRequest has a resource requirement that does not exist yet in the Mesos cluster, then I get a SchedulingResult where the VmAssignmentResult has no TaskAssignmentResultt - this is expected. However, after some time, when I register a new Mesos agent that offers resources matching the task's resource requirements, I notice that Fenzo will now output a TaskAssignmentResult that pairs that TaskRequest and the new resource together - this is good behavior. I did not re-add the original task in via scheduler.scheduleOnce(), so I concluded that Fenzo must have some internal data structure that holds on to the TaskRequest that was sent in by the previous scheduler.scheduleOnce() call.

What I would like is for Fenzo to not output a TaskAssignmentResult if the TaskRequest was sent in by a scheduler.scheduleOnce() call over N minutes ago, and for that TaskRequest to be kicked out from Fenzo if it is considered too old. In other words "Please try to make a VM assignment for this TaskRequest but give up after N seconds and let me know about this". Is this currently possible?

from fenzo.

spodila avatar spodila commented on July 29, 2024

I was traveling with limited connectivity, so my response is delayed.

Although Fenzo is battle tested, the sample framework is not, it is provided as an example for how to use Fenzo in a framework. I would not recommend using the sample framework itself for any mission critical applications. Read the comments provided in the sample for more details.

Since Fenzo currently does not support queuing of tasks, you will have to support queuing in your framework. The sample framework is a simplistic example that maintains the collection of pending tasks to call Fenzo repeatedly.

from fenzo.

q10 avatar q10 commented on July 29, 2024

Ok, I see. When I call scheduler.scheduleOnce() with a list of tasks, is it possible for me to bias the scheduling so that older-submitted tasks get prioritized first if they can be assigned to resources (i.e. if two task requests are given and score equally well in terms of fitness, but task request A is older than B, then choose A)? Which FitnessCalculator or ConstraintEvaluator would be good for this?

from fenzo.

spodila avatar spodila commented on July 29, 2024

Sure, Fenzo processes tasks in the order it receives via the List of task requests in the scheduleOnce() call. So, if you order the older tasks ahead in the list, they will be considered for resource assignment ahead of newer tasks.

The fitness calculator is to choose an agent, for a given task, from multiple agents that can fit the task at the moment.

from fenzo.

spodila avatar spodila commented on July 29, 2024

@q10 You may want to look at the recent introduced tasks queues in Fenzo. See details here

from fenzo.

q10 avatar q10 commented on July 29, 2024

Thanks

from fenzo.

spodila avatar spodila commented on July 29, 2024

Feel free to reopen this or a new issue if you need further help.

from fenzo.

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.