opendal icon indicating copy to clipboard operation
opendal copied to clipboard

OpenDAL Node.js Binding

Open Xuanwo opened this issue 2 years ago • 3 comments

In PR https://github.com/datafuselabs/opendal/pull/1206, I setup a basic nodejs binding. We need to expose more OpenDAL API to node so that it can be useful.

Plan

Node.js Binding support is at a very early stage.

The first goal of this issue is reading data from service s3 in pure python.

Tasks

Features

  • [ ] Operator
  • [ ] Object
  • [ ] ObjectMetadata
  • [ ] ObjectReader (a file-like object which can be read)
  • [ ] Service Builders
    • [ ] Service S3 (Let's start from s3 first)

Tests

  • [ ] Unit Tests
  • [ ] Integration Tests

I'm not an experienced node.js developer, welcome anyone who is interested in this issue to walk in and own some parts.

Xuanwo avatar Jan 19 '23 08:01 Xuanwo

Thanks @suyanhanx to build basic IO support! Now we have the following things to do before we can make a 0.1 release of opendal's nodejs binding:

  • [ ] Cleanup API to make sure they are aligned with opendal. For example:
    • [ ] ObjectMetadata instead of ObjectMeta
    • [ ] o.stat instead of o.meta
    • [ ] Remove OperatorFactory and we should export our builders.
  • [ ] Add ObjectReader/ObjectWriter for streaming read/write
  • [ ] Mapping opendal::Error to nodejs native error
  • [ ] Add a test suit to make sure our binding works as expect.

Xuanwo avatar Mar 03 '23 13:03 Xuanwo

Hello, @suyanhanx. Is it possible to use our Node.js bindings on Deno? Additionally, what steps are necessary to enable us to run the bindings in a web browser?

Xuanwo avatar Mar 03 '23 14:03 Xuanwo

Is it possible to use our Node.js bindings on Deno?

Yes. But we may need to release it first.

what steps are necessary to enable us to run the bindings in a web browser?

We need to compile the binding to WASM.

suyanhanx avatar Mar 03 '23 14:03 suyanhanx

Nodejs binding has been released to npm, let's close this issue.

Xuanwo avatar Mar 30 '23 07:03 Xuanwo