Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Find alternative ways to offload resource-heavy and time-consuming tasks #34

@nothingface0

Description

@nothingface0

Description

Currently, on each parsing command issued for a HistogramDataFile, a new thread is spawned (from within Django) to parse the file.
Several issues with this approach:

  • Django carries the burden of parsing files, which it should not
  • The pod is pretty much overloaded, leading even to pod restarts.
  • There is no way to prevent multiple Threads being spawned on the same file, wasting resources.

Next steps:

  • Think about implementing a separate process which parses files, maybe even deployed on a separate pod, with its own API.
  • Create a new DB model where a queue can be implemented for the separate process to check for files to parse. This has the added advantage of being able to resume file parsing after a crash, as the entry in the queue has not been cleared.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendTask and features relating to the backend

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions