Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find a way to use hibernate to query and use data from a file store #45

Open
ia3andy opened this issue Jul 30, 2024 · 6 comments
Open

Comments

@ia3andy
Copy link
Contributor

ia3andy commented Jul 30, 2024

It would store the data as a file synchronised with git.
This would allow querying the data and use it in the app that gets generated as a static website.

The prerequisite is to have something easy to run in a CI (like github action) and that gives readable diffs for git.

@ia3andy
Copy link
Contributor Author

ia3andy commented Jul 30, 2024

Zulip discussion (https://quarkusio.zulipchat.com/#narrow/stream/187038-dev/topic/Json.20File.20JDBC.20driver) abstract:

Summary for GitHub Issue

Title: Implementing a JDBC Driver for JSON File Storage

Description:

Andy Damevin is exploring the possibility of using a JDBC driver to access and manipulate data stored in human-readable text files (preferably JSON) synchronized through Git. The goal is to allow easy data editing and storage in a format that supports version control and diffing, without requiring an additional runtime process.

Key Points:

  • Use Case: Similar to roq-data but using Hibernate. Accessing and modifying data from Quarkus with synchronization via Git.
  • Current Solutions:
    • H2 Database: Provides a file-based storage but results in binary-like data files.
    • CSV JDBC Drivers: Exist but are read-only and not suitable for the use case.
    • SQL Dumps: Suggested as an alternative, but it involves using traditional databases and exporting data.
  • Explored Options:
    • Implementing a custom JDBC driver for JSON/YAML files.
    • Considering existing solutions like Apache Drill, which supports JDBC drivers for various data stores.
    • Existing systems like Gatsby, which queries data and stores it as JSON for static use.

Discussion Highlights:

  • Yoann Rodière advised caution, noting that using JDBC for file-based storage is unconventional and might lead to challenges.
  • Max Andersen highlighted multiple historical and modern solutions for similar needs, emphasizing the variety of ways to manage data storage and synchronization.

Next Steps:

  • Further exploration of a custom JDBC driver for JSON/YAML.
  • Investigating Apache Drill and other potential tools for file-based JDBC connectivity.
  • Opening an issue to gather more insights and track progress on this exploration.

Links:


Feel free to provide additional input or alternative solutions for efficiently managing and syncing human-readable file-based data storage through JDBC.

@maxandersen
Copy link
Member

"Find a way to use hibernate to query and use data from a file store" - what is the queries you are after doing?

@ia3andy
Copy link
Contributor Author

ia3andy commented Jul 30, 2024

@maxandersen
Copy link
Member

@ia3andy can you point a bit more specific - I browsed around and didn't find any queries - just a model easy to iterate on.

@FroMage
Copy link

FroMage commented Jul 30, 2024

What I would do is:

  • Import YAML or JSON or whatever into ORM
  • Queries / mutation / whatever
  • Export back to YAML / JSON or whatever from ORM

Possibly using H2.

@FroMage
Copy link

FroMage commented Jul 30, 2024

Did I mention I have a JSON import/export for ORM in 🦊? 😇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants