Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
haskell-gargantext
haskell-gargantext
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 159
    • Issues 159
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 8
    • Merge Requests 8
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • gargantext
  • haskell-gargantexthaskell-gargantext
  • Issues
  • #444

Closed
Open
Opened Jan 24, 2025 by Przemyslaw Kaminski@cgenie
  • Report abuse
  • New issue
Report abuse New issue

Implement temporary file storage

Let's base this on PostgreSQL's large objects:

  • https://www.postgresql.org/docs/17/largeobjects.html
  • https://hackage.haskell.org/package/postgresql-simple-0.7.0.0/docs/Database-PostgreSQL-Simple-LargeObjects.html
  • https://www.percona.com/blog/how-to-remove-an-orphan-large-object-in-postgresql-with-vacuumlo/ (pg_largeobject table contains all files with their OIDs)

It's better to upload files first, and create processing task using only that file's OID. The resulting JSON for workers is much smaller.

NOTE that this is mostly for internal use: I expect to use this instead of tempfile (which, in case workers run on different machines, isn't reliable anymore) and instead of serializing the whole data into pgmq job queue.

Also, we could save some bandwidth by reimplementing file upload first (as binary) and then creating a task based on the uploaded file. (Currently, for zip files, we base64-encode them on the frontend, and then decode on the backend).

Edited Jan 24, 2025 by Przemyslaw Kaminski
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
1
Labels
To deploy
Assign labels
  • View project labels
Reference: gargantext/haskell-gargantext#444