Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8022911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:24:21+00:00 2026-06-04T22:24:21+00:00

I have a queue of activities shared between clients, capturing user activity and executed

  • 0

I have a queue of activities shared between clients, capturing user activity and executed by a robot on the other site. An example of activites might be like:

CREATE FOLDER  /docs
CREATE FILE    /docs/journal.txt
DELETE FILE    /docs/blog.txt
MOVE   FOLDER  /docs/images /docs/photos
...

Often there are activites that can be reduced to a single one, or none. For instance:

CREATE FOLDER /docs
RENAME FOLDER /docs /documents

Can be simply changed to:

CREATE FOLDER /documents

And something like:

CREATE FOLDER /docs
RENAME FOLDER /documents
DELETE FOLDER /documents

Can be removed entirely from the queue.

This kind of reduction/optimization seems like a very generic problem, and before attacking it I’d like to try some generic solution. It looks like a pathfinding optimization problem.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:24:24+00:00Added an answer on June 4, 2026 at 10:24 pm

    I don’t know of any library or framework that would do this for you. On the other hand, you would have to specify the logic behind it yourself, and as I see it, that would be the bulk of the work anyway.

    Here’s the approach I would take:

    1. Do a topological sort of the actions (rename folder “depends on” create folder and so on…)

    2. Each command with no dependencies represents a “root” in a dependency tree.

    3. Collapse these trees recursively starting from each root.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have declared: queue<int, list<int> > Q After a series of calls: Q.push(37); Q.pop();
I have a Queue that contains a collection of objects, one of these objects
I have a queue structure that is being used by several pthreads. The threads
I have a queue of users(string of emails) a in c# and I want
I have a queue of text messages in Redis. Let's say a message in
If I where to have a Queue holding a collection of objects (Custom object,bool,bool,bool,bool)
I am using MDBs deployed on WAS 61. I have a queue (X) and
The normal implementations of a work queue I have seen involve mutexes and condition
Lets say I am writing Dijkstra's Algorithm , and I have a priority queue
I have a single AMQ queue that receives simple messages with string body. Consider

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.