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

Database format revision #71

Open
rinigus opened this issue Feb 18, 2023 · 3 comments
Open

Database format revision #71

rinigus opened this issue Feb 18, 2023 · 3 comments

Comments

@rinigus
Copy link
Owner

rinigus commented Feb 18, 2023

As has been highlighted by issue eventually caused by Kyotocabinet (rinigus/osmscout-server#419), Goecoder NLP depends on a library that is not maintained anymore (see message at https://dbmx.net/kyotocabinet/). So, it makes sense to look for alternatives.

Currently, we use 3 data files to store one region:

  • SQLite database with the main record data
  • MARISA https://github.com/s-yata/marisa-trie for text search
  • Kyotocabinet for linking MARISA IDs to corresponding records in SQLite db. Here, one MARISA ID is mapped to multiple record IDs in SQLite database, saved as : <binary string containing multiple >.

Over those, SQLite provides links between records forming hierarchies and spatial search index.

In principle, we can swap the full set.

@rinigus
Copy link
Owner Author

rinigus commented Feb 18, 2023

Kyotocabinet can maybe be replaced by just table in SQLite using the same format as in Kyotocabinet:

(primary index): BLOB string of ints

@rinigus
Copy link
Owner Author

rinigus commented Feb 18, 2023

Kyotocabinet replacement:

LMDB http://www.lmdb.tech/doc/

@rinigus
Copy link
Owner Author

rinigus commented Feb 18, 2023

Kyotocabinet replacement:

RocksDB: https://rocksdb.org/

Has spatial indexing as well, see https://rocksdb.org/blog/2015/07/17/spatial-indexing-in-rocksdb.html . Although, sounds as tuned for showing tiles.

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

1 participant