Mirror of the Rel4tion website/wiki source, view at <http://rel4tion.org>
Clone
HTTPS:
git clone https://vervis.peers.community/repos/yEzqv
SSH:
git clone USERNAME@vervis.peers.community:yEzqv
Branches
Tags
1.mdwn
[[!template id=ticket class=task]] [[!tag /projects/smaoin-hs/decisions]]
[[!meta title=“Data structures”]]
Issue
At the time of writing, the top-level data layer in [[!rel4darcs smaoin]] is statements and statement blocks. There are no “models”, i.e. no triplestore or quadstore or anything like that.
I did plan to have them, using containers, but now I’m not sure where to put them. The questions I’d like to answer here are:
- In which package should they be?
smaoin
orrazom-basic-store
or something else? - Which models should be provided, using which containers?
Process
Here are some ideas:
- Set-based model
- List
- Ordered set (red-black tree etc.)
- Unordered set (hash table etc.)
- Tree-based model (e.g. statement blocks)
- Graph-based model
- See
Data.Graph
- See what [[!hackage rdf4h]] uses
- See
Thoughts on package:
- If they are added to
smaoin
, it will have dependencies which most users won’t need. For example, users of set-based models don’t need any extra dependencies used by the graph model code. On the other hand, these would be commonly used packages installed anyway and having many dependants. And GHC hopefully optimizes away code the program doesn’t use. - If they are added to
razom-basic-store
, there is some level of mixing/coupling between the basic store API (the package’s purpose) and the data structures (which can be used with any other frontend API). - A simple small package, e.g.
smaoin-model
, can contain just the data definitions and a minimal set of utility functions. But it should be minimal enough compared to the basic store API, to justify the separate package.
Result
No final decision yet.
I’m starting in the smaoin
package. Will possibly move to a separate smaoin-model
package later.