GithubHelp home page GithubHelp logo

Comments (3)

thisisaaronland avatar thisisaaronland commented on June 19, 2024

Of course. It will probably be archived (in the GitHub archive sense of the word) unless that will present an operational problem for people.

from go-whosonfirst-pip-v2.

HIRANO-Satoshi avatar HIRANO-Satoshi commented on June 19, 2024

Thanks!

Why have you started the new one? What's the difference?

Should we move to it? We have some modifications.

from go-whosonfirst-pip-v2.

straup avatar straup commented on June 19, 2024

It is an attempt to de-couple the various components that make up go-whosonfirst-pip-v2 – indexing, storage, querying and serving – in to separate packages in order to allow for more flexibility.

Keep in mind that all of the examples that follow are a) actively being worked b) don't work properly in many cases c) poorly documented still.

For example there is a single "base" package that defines database-agnostic but WOF-specific interfaces for spatial queries and reading properties:

Which are then implemented in full or in part by provider-specific classes. For example, SQLite:

This package implements both interfaces which means indexing spatial queries is much faster as are appending "extra" properties (assuming a pre-indexed database generated using the https://github.com/whosonfirst/go-whosonfirst-sqlite-features-index package).

Other packages only implement the spatial interfaces like:

Or the properties reader interfaces like:

Building on that there are equivalent base packages for "server" implementations, like:

The idea is that all of these pieces can be easily combined in to purpose-fit applications. As a practical matter it's mostly about trying to identify and package the common pieces in to as few lines of code as possible so that they might be combined with an application-specific import statement. For example:

import (
         _ "github.com/whosonfirst/go-whosonfirst-spatial-MY-SPECIFIC-REQUIREMENTS"
)

Here is a concrete example, implementing the PIP service over HTTP using a SQLite backend:

It is part of the overall goal of:

  • Staying out people's database or delivery choices (or needs)
  • Supporting as many databases (and delivery (and indexing) choices) as possible
  • Not making database B a dependency (in the Go code) in order to use database A, as in not bundling everything in a single mono-repo that becomes bigger and has more requirements over time.

For example:

That's the goal, anyway. I am still working through the implementation details.

Functionally the go-whosonfirst-spatial- packages should be equivalent to go-whosonfirst-pip-v2 as in there won't be any functionality removed. If you have specific needs or modifications you'd like to see I would enjoy hearing about them. This is probably the best place to start that conversation:

from go-whosonfirst-pip-v2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.