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

service: Add Qiniu (kodo) Support #2640

Open
Xuanwo opened this issue Jul 14, 2023 · 8 comments
Open

service: Add Qiniu (kodo) Support #2640

Xuanwo opened this issue Jul 14, 2023 · 8 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Xuanwo
Copy link
Member

Xuanwo commented Jul 14, 2023

https://www.qiniu.com/products/kodo

@Xuanwo Xuanwo added good first issue Good for newcomers help wanted Extra attention is needed labels Jul 14, 2023
@A-Stupid-Sun
Copy link
Contributor

hey @Xuanwo, I want to try this

@suyanhanx
Copy link
Member

hey @Xuanwo, I want to try this

Have fun!

@nooberfsh
Copy link

Hi, I wrote a small program to test the compatibility with Kodo, it works without any problem.

use opendal::services::S3;
use opendal::Operator;
use opendal::Result;

#[tokio::main]
async fn main() -> Result<()> {
    let mut builder = S3::default();
    builder.bucket("test");
    builder.endpoint("http://s3.cn-east-1.qiniucs.com");
    builder.access_key_id("key");
    builder.secret_access_key("key");

    let op: Operator = Operator::new(builder)?.finish();
    write_data(op.clone()).await?;
    read_data(op.clone()).await?;
    Ok(())
}

async fn write_data(op: Operator) -> Result<()> {
    op.write("test", "Hello, World!").await?;
    Ok(())
}

async fn read_data(op: Operator) -> Result<()> {
    let bs = op.read("test").await?;
    println!("data: {}", String::from_utf8_lossy(&bs));
    Ok(())
}

@A-Stupid-Sun
Copy link
Contributor

Hi, I wrote a small program to test the compatibility with Kodo, it works without any problem.

use opendal::services::S3;
use opendal::Operator;
use opendal::Result;

#[tokio::main]
async fn main() -> Result<()> {
    let mut builder = S3::default();
    builder.bucket("test");
    builder.endpoint("http://s3.cn-east-1.qiniucs.com");
    builder.access_key_id("key");
    builder.secret_access_key("key");

    let op: Operator = Operator::new(builder)?.finish();
    write_data(op.clone()).await?;
    read_data(op.clone()).await?;
    Ok(())
}

async fn write_data(op: Operator) -> Result<()> {
    op.write("test", "Hello, World!").await?;
    Ok(())
}

async fn read_data(op: Operator) -> Result<()> {
    let bs = op.read("test").await?;
    println!("data: {}", String::from_utf8_lossy(&bs));
    Ok(())
}

yep, you are right, kodo is compatible with s3 service, but maybe openDAL want a service implemented by kodo native api? such as oss is s3 service compatible too, but we still develop the oss service

@Xuanwo
Copy link
Member Author

Xuanwo commented Sep 1, 2023

Hi, @nooberfsh, as mentioned by @A-Stupid-Sun. It is possible to visit qiniu with opendal s3 service. However, OpenDAL's VISION is to access data freely. This means that in addition to the existing s3 support, we aim to be able to access the storage service through its native API so that we can utilize more features.

@Xuanwo
Copy link
Member Author

Xuanwo commented Sep 1, 2023

By the way, are you interested in implementing native Qiniu (kodo) support in OpenDAL? @nooberfsh

@nooberfsh
Copy link

I can give it a try.

@Xuanwo
Copy link
Member Author

Xuanwo commented Sep 1, 2023

I can give it a try.

Great, thanks a lot in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants