Skip to content

Feature/sync sid calculation#660

Merged
zonotope merged 349 commits intomainfrom
feature/sync-sid-calculation
Feb 22, 2024
Merged

Feature/sync sid calculation#660
zonotope merged 349 commits intomainfrom
feature/sync-sid-calculation

Conversation

@zonotope
Copy link
Contributor

@zonotope zonotope commented Nov 10, 2023

This patch removes the sequential integer-based subject ids in favor of a java class for use in Clojure code along with an SID record for use in Clojurescript. Both define sids from iris by splitting sids into a namespace part and a name part. We maintain a map of namespaces to integers on db records and serialized in db root maps, and the names are serialized as strings. The name parts are also converted into vectors of longs when deserialized in clojure to optimize comparisons in sorted sets.

@zonotope zonotope marked this pull request as draft November 16, 2023 05:14
Automatic iri expansion is bad behavior for an internal api, and this
functionality will soon be removed.
We will have to re-think some part of iri -> sid conversion given that compact
iris should be treated as strings. Maybe we should disallow this?
this is a hack to get rdf:type to map to :type or @type in query results. we
need to rethink what we allow here and how we handle it.
@zonotope zonotope requested review from a team and dpetran and removed request for dpetran February 21, 2024 02:10
Copy link
Contributor

@dpetran dpetran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚄 Looks good!

These legacy keys are no longer referenced and their functionality will be
replaced by branches
Our code for reading index files automatically converts the json map keys to
keywords, but neither namespace codes nor namespaces should be converted.
namespace codes should be integers, and namespaces should be strings. Instead of
changing our index reading code not to do the conversion, I opted to convert
then convert back for ns codes because it (should be) more efficient to convert
to keywords while parsing JSON instead of after the fact, and there will be much
more data that needs the conversion than will not. I'm not ecstatic about
converting integers to keywords and back to integers, but I think this is the
best approach given the fact that more data will need to be converted to
keywords than not, but we may want to revisit this later.
@zonotope zonotope merged commit 2b0cc37 into main Feb 22, 2024
@zonotope zonotope deleted the feature/sync-sid-calculation branch February 22, 2024 23:27
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

Successfully merging this pull request may close these issues.

2 participants