GithubHelp home page GithubHelp logo

Support for filtering jobs about arena HOT 10 OPEN

bee-queue avatar bee-queue commented on May 18, 2024 5
Support for filtering jobs

from arena.

Comments (10)

xdc0 avatar xdc0 commented on May 18, 2024 3

Note, the intent of this feature request is to only provide basic filtering capabilities when looking at a queue in a particular state, although it would be nice to think on solving that problem in a way that it may open new features as the ones that @krazyjakee is suggesting. But I think it'd be better to solve a small problem at a time.

I'm thinking that a solution for this that is efficient for very large queues is to use SCAN cursors. I'm not sure if bee supports job listing with a cursor, the idea is that since you have to do a full scan for filtering anyway, we can pull 10 jobs in some state like we do with pagination, and then apply the filter on these 10 jobs. Then, if 3 jobs were filtered out of these 10 jobs, then get the next set of 10 jobs with the SCAN cursor until you have a set of 10 jobs.

Pagination can become tricky though because we can't know how many pages a particular search has without doing a full scan which is expensive. I'm thinking that we can replace pagination with a cursor hash that represents the filter and the redis SCAN cursor together, then a "next page" button or a "load more" button will fetch more jobs until the cursor is exhausted. The tradeoff is that we can't know how many results a filter has but I believe that it is fine to exclude traditional pagination when doing searches

from arena.

krazyjakee avatar krazyjakee commented on May 18, 2024

Great idea.

Sadly, redis does not support value searches but we could hand the entire job set over to the client in the form of a clusterize table which can support hundreds of thousands of rows without a performance hit. A form could then be constructed to perform the filtering and update results in the table. It would need a lot of testing.

If a client-side solution doesn't work, the server would need to create an internal database that syncs with redis and could be queried via ajax. We could also keep and improve pagination this way.

from arena.

bradvogel avatar bradvogel commented on May 18, 2024

Some of our queues are 3GB, so sending all that data to the client for filtering won't work.

Why not have the server just read each job from redis, perform the filter, and then stream results to the client?

from arena.

krazyjakee avatar krazyjakee commented on May 18, 2024

@bradvogel ok, 3GB is a great example to think about. It's worth testing at least but I doubt we could have such functionality as an autocomplete. I guess we'd need a syncd database loaded with indexes to achieve that.

from arena.

bradvogel avatar bradvogel commented on May 18, 2024

Nah - it'd have to stream each job (key) from redis and run the filter in the backend, then stream it to the frontend if it matches.

from arena.

krazyjakee avatar krazyjakee commented on May 18, 2024

@bradvogel ah! I hear you. Yeah I'm picturing loading indicator, progress bar, options to filter by job data by values & response content. Could be a great addition.

from arena.

alexisohayon avatar alexisohayon commented on May 18, 2024

Hello!

Is there still a feature ongoing for this issue? :)
Would be very handy!

Thanks for the good work :)

from arena.

tevaum avatar tevaum commented on May 18, 2024

Any news on this issue?

from arena.

yaboi avatar yaboi commented on May 18, 2024

ping

from arena.

skeggse avatar skeggse commented on May 18, 2024

While I understand that this ticket has a lot of interest, please refrain from simply bumping - it's not a priority for us, and we don't really have resources to fully support this project. I'm locking and restricting to collaborators. The best way to get progress on this ticket would be to submit a pull request! Linked it to this ticket :)

from arena.

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.