uccross / skyhookdm-ceph-cls

Skyhook Data Management: Storage and management of tabular data in Ceph.
https://www.skyhookdm.com
GNU Lesser General Public License v2.1
13 stars 9 forks source link

create high-level c++ api #40

Open ivotron opened 4 years ago

ivotron commented 4 years ago

create a high-level C++ API. A sketch (many details purposely omitted):

#include <string>
#include <skyhookdm.h>  // or something alike

int main(int argc, char **argv)
{
  // connect to a skyhookdm-capable ceph cluster
  skyhookdm::SkyhookDM sky;
  sky.init(NULL);

  // open pool
  skyhookdm::IoCtx ioctx;
  sky.ioctx_create("mypool", ioctx);
  // ...

  // buff contains an arrow table
  sky.write(ioctx, oid, "arrow", buff);

  // define query
  skyhookdm::Query query(
    columns="col2,col5",
    filters="col1 == 'foo' AND col3 > 5"
    // etc
  );

  // run query on given object and put result (arrow format) in buff
  sky.query(ioctx, oid, "arrow", query, &buff); 
}

subtasks for this:

ivotron commented 4 years ago

@jlefevre @carlosmalt @xweichu @drin I updated the issue description with what we discussed today on the call. Maybe we can use this issue to refine how the API looks like