Skip to content

Prevent minerva from accepting multiple operations per model #589

@kltm

Description

@kltm

@balhoff This came up in discussion about what might be going on, and I wanted to talk with you about a possible solution to one category of issues. As you're away, I'm just making some notes here that we can talk about when you're back.

Essentially, I believe that minerva takes operations as they are mediated through the web server on a first-come-first-served basis. On slow connections, multiple windows, or when errors occur in a series of commands, this opens up the possibility for data and operations to get garbled.

I think it might be possible to fix this with minimal effort:

  1. all requests come in as normal
  2. instead of being operated on, they are put into a FIFO "event queue"
  3. when a worker takes something from the queue, it looks at the model being operated on and checks is against the hold list
  4. if the model is not on the hold list, add it and operate
  5. if model is on the hold list, don't take that request and go to the next one in the queue that does have a hold list model
  6. if there is an error, respond and remove all requests in the queue to that model, sending errors
  7. if there is no error, send a response and remove model id from hold list

(locks when necessary)

This essentially would build a "transaction" system at the model/request level, while still allowing operations to continue as usual. The number of workers could still be tied to/identical to the http threads, just with that gating logic before execution.

We believe that this may alleviate a lot of the client issues.

I think that this should be "easy", but please let me know.

Tagging @vanaukenk @pgaudet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions