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

Add Storage interface to connect to storage backends? #23

Closed
3 tasks
pwalsh opened this issue May 26, 2016 · 4 comments
Closed
3 tasks

Add Storage interface to connect to storage backends? #23

pwalsh opened this issue May 26, 2016 · 4 comments

Comments

@pwalsh
Copy link
Member

pwalsh commented May 26, 2016

Description

Requires #22

In the Python lib, we have the concept of a Storage interface, which is used for push data from a table of data in JTS to a backend, and vice versa. The base class jsontableschema.storage.Storage, in Python, currently just stubs out the core API, and then we have two plugins that implement this API for BigQuery and SQL.

We want to implement the base Storage class in the js lib, but not simply as a stub of the API, but with a minimal example of JSON/Object storage.

Tasks

  • Implement the basics of the Storage class
  • Implement a JSON storage backend
    • An object
    • The "name" of the table is the name of the resource, and a table is an array
  • Tests
{
  "table_name": [
    { ...row ... },
    { ... row ... },
    etc.
  ]
}

@roll any comments? If you dont like the idea of a default JSON backend LMK.

@pwalsh pwalsh added this to the Current milestone May 26, 2016
@roll
Copy link
Member

roll commented May 30, 2016

I think there should be a separation between interface to implement (though for languages like python and js it's more like a documentation than real implementation check) and concrete implementations. So jsontableschema.storage.Storage is an interface (sounds better than stub=) but core libs also could provide any builtin concrete implementations like JsonStorage, FilesystemStorage (etc) But in docs better to tell people implement interface than subclass concrete drivers.

I thought more about builtin FilesystemStorage because it could encapsulate all filesystem interaction internally used by library. So it could be not just an example. But I haven't really dove into this idea for now.

@pwalsh pwalsh added the ready label Jul 27, 2016
@roll roll added current and removed ready labels Aug 8, 2016
@roll roll removed this from the Current milestone Aug 8, 2016
@roll roll added priority and removed current labels Sep 1, 2016
@roll roll unassigned zhenyab Sep 1, 2016
@roll roll modified the milestone: jsontableschema-v1 Sep 1, 2016
@roll roll added v0.3 and removed v0.3 labels Sep 7, 2016
@roll roll removed the v0.3 label Sep 22, 2016
@roll roll removed the priority label Oct 3, 2016
@roll roll unassigned zhenyab Oct 3, 2016
@roll
Copy link
Member

roll commented Oct 5, 2016

@pwalsh
Now we have jsontableschema-models-js covering similar concepts. So question - do we need jsontableschema.Storage for js at all?

As I could see it:

  • we have a core python stack: tabulator, jts+storages, dp, goodtables
  • we will be having js,ruby,java,r etc ports: basic jts, dp

If we not going to write sql, bigquery etc drivers for javascript this javascript.Storage just not needed (it's not a part of base specs implementation). Not introducing storage concept here we could reduce maintenance cost a lot. Because sql etc integrations could be a really big work here - so needed a strong reasons to start it.

My preference to do first basic jts, dp implementations for js when we'll be having resources for it.

@pwalsh
Copy link
Member Author

pwalsh commented Oct 5, 2016

@roll it was already done. @zhenyab used this to build the models. we are just waiting on his PR :)

@roll roll changed the title Add Storage interface to connect to storage backends Add Storage interface to connect to storage backends? Oct 14, 2016
@roll
Copy link
Member

roll commented Nov 17, 2016

It's going on here - frictionlessdata/tableschema-models-js#1

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

No branches or pull requests

3 participants