opendal icon indicating copy to clipboard operation
opendal copied to clipboard

Tracking issues of RFC-3197: Config

Open Xuanwo opened this issue 2 years ago • 30 comments

  • RFC: https://github.com/apache/incubator-opendal/pull/3197

Notes

This issue intends to add config for every service.

Take https://github.com/apache/incubator-opendal/pull/3490 as an example, we just need to move deserialize-able fields (like String, bool, usize) into XxxConfig:

#[derive(Default, Deserialize)]
#[serde(default)]
#[non_exhaustive]
pub struct XxxConfig {
   /// Comments
   pub root: Option<String>,
}

Please note: all fields here should be pub.

And use XxxConfig to replace existing fields:

#[derive(Default)]
pub struct XxxBuilder {
+    config: XxxConfig,
-    root: Option<String>,
-    abc: String,
-    ...

    customed_credential_load: Option<Box<dyn AwsCredentialLoad>>,
    http_client: Option<HttpClient>,
}

Leave fields like http_client as is.

Change the Builder::from_map implemantion to:

- let mut builder = XxxBuilder::default();
- 
- map.get("root").map(|v| builder.root(v));
+ let config = XxxConfig::deserialize(ConfigDeserializer::new(map))
            .expect("config deserialize must succeed");

Tasks

  • [x] Atomicserver https://github.com/apache/incubator-opendal/pull/3845
  • [x] Azblob #3553
  • [x] Azdls https://github.com/apache/opendal/pull/4277
  • [x] Azfile https://github.com/apache/opendal/pull/4277
  • [x] Cacache https://github.com/apache/opendal/pull/4277
  • [x] CloudflareKv https://github.com/apache/opendal/pull/4277
  • [x] Cos https://github.com/apache/opendal/pull/4277
  • [x] D1 #4129
  • [x] Dashmap https://github.com/apache/opendal/pull/4277
  • [x] Dbfs https://github.com/apache/opendal/pull/4277
  • [x] Dropbox https://github.com/apache/incubator-opendal/pull/3961
  • [x] Etcd: https://github.com/apache/incubator-opendal/pull/3543
  • [ ] Foundationdb
  • [ ] Fs
  • [x] Ftp: https://github.com/apache/incubator-opendal/pull/3510
  • [x] Gcs #3786
  • [x] Gdrive https://github.com/apache/incubator-opendal/pull/4002
  • [ ] Ghac
  • [ ] Hdfs
  • [x] Http: https://github.com/apache/incubator-opendal/pull/3507
  • [ ] Ipfs
  • [ ] Ipmfs
  • [x] Libsql https://github.com/apache/incubator-opendal/pull/3501
  • [x] Memcached
  • [ ] Memory
  • [ ] MiniMoka
  • [x] Moka #3711
  • [x] Mongodb https://github.com/apache/incubator-opendal/pull/3906
  • [x] Mysql https://github.com/apache/incubator-opendal/pull/3499
  • [ ] Obs
  • [x] Onedrive https://github.com/apache/incubator-opendal/pull/3954
  • [ ] Oss
  • [ ] Persy
  • [x] Postgresql: https://github.com/apache/incubator-opendal/pull/3495
  • [ ] Redb
  • [x] Redis: https://github.com/apache/incubator-opendal/pull/3498
  • [x] Rocksdb: https://github.com/apache/incubator-opendal/pull/3828
  • [x] S3: https://github.com/apache/incubator-opendal/pull/3490
  • [x] Sftp: https://github.com/apache/incubator-opendal/pull/3511
  • [ ] Sled
  • [x] Sqlite: https://github.com/apache/incubator-opendal/pull/3497
  • [ ] Supabase
  • [ ] Swift
  • [x] Tikv: https://github.com/apache/incubator-opendal/pull/3512
  • [ ] VercelArtifacts
  • [x] WebDAV https://github.com/apache/incubator-opendal/pull/3846
  • [ ] Webhdfs

Xuanwo avatar Oct 08 '23 05:10 Xuanwo

I want to try sqlite

hoslo avatar Nov 06 '23 14:11 hoslo

I want to try sqlite

Thanks a lot, have fun!

Xuanwo avatar Nov 06 '23 14:11 Xuanwo

I want to try azblob

acehinnnqru avatar Nov 06 '23 16:11 acehinnnqru

I want to try Postgresql

sd44 avatar Nov 07 '23 00:11 sd44

I want to try azblob

Have fun!

I want to try Postgresql

Have fun too!

Xuanwo avatar Nov 07 '23 00:11 Xuanwo

I want to try Mysql and Libsql

sd44 avatar Nov 07 '23 02:11 sd44

I want to try Mysql and Libsql

Hi, let's take issues one by one instead trying to take places. How about taking mysql first?

Xuanwo avatar Nov 07 '23 02:11 Xuanwo

I want to try sqlite

request assign redis

hoslo avatar Nov 07 '23 05:11 hoslo

i want to try tikv

caicancai avatar Nov 07 '23 09:11 caicancai

i want to try tikv

Thanks! Have fun.

Xuanwo avatar Nov 07 '23 09:11 Xuanwo

Thank you for all your passion! There's no rush on this tracking issue, and I'd like it to be the first task for contributors. Once you've completed a task, please move onto others so we can involve more people in this event.

Xuanwo avatar Nov 07 '23 16:11 Xuanwo

First-time contributor here! I'd like to take a look at the CloudflareKv service.

xiaoyang-sde avatar Nov 07 '23 21:11 xiaoyang-sde

i want to try etcd

Xuxiaotuan avatar Nov 08 '23 06:11 Xuxiaotuan

i want to try etcd

Thanks a lot, have fun!

Xuanwo avatar Nov 08 '23 07:11 Xuanwo

i want to try Rocksdb

cjj2010 avatar Nov 08 '23 10:11 cjj2010

i want to try Rocksdb

Have fun!

Xuanwo avatar Nov 08 '23 10:11 Xuanwo

I want to try Fs

shbhmrzd avatar Dec 21 '23 19:12 shbhmrzd

Hi @Xuanwo , for FS we don't have any config and the two attributes in builder are PathBuf. We would not need this change for Fs, right ? If thats the case, I can go ahead and pick up hdfs. Please let me know your thoughts.

shbhmrzd avatar Dec 22 '23 04:12 shbhmrzd

If thats the case, I can go ahead and pick up hdfs. Please let me know your thoughts.

Thanks, please go ahead.

Xuanwo avatar Dec 22 '23 04:12 Xuanwo

hey i want to try memcached and rocksdb. it seems @cjj2010 is already working on rocksdb, so maybe i can work with him on it. it would be great if you assign memcached to me. thanks.

ankit-pn avatar Dec 23 '23 06:12 ankit-pn

hey i want to try memcached and rocksdb. it seems @cjj2010 is already working on rocksdb, so maybe i can work with him on it. it would be great if you assign memcached to me. thanks.

Thanks, assigned.

Xuanwo avatar Dec 23 '23 06:12 Xuanwo

I would also like to work on gdrive and ipfs.

ankit-pn avatar Dec 27 '23 09:12 ankit-pn

Thank you for all your passion! There's no rush on this tracking issue, and I'd like it to be the first task for contributors. Once you've completed a task, please move onto others so we can involve more people in this event.

Hi, Thank you for all your passion! There's no rush on this tracking issue, and I'd like it to be the first task for contributors. How about moving onto others so we can involve more people in this event?

Xuanwo avatar Dec 27 '23 09:12 Xuanwo

Sure, I will look into other issues and try to contribute there. I would be better off leaving this issue for newcomers. Thanks.

ankit-pn avatar Dec 27 '23 09:12 ankit-pn

Hi, I would like to work on Atomicserver.

k-aishwarya avatar Dec 27 '23 17:12 k-aishwarya

Hi, I would like to work on Atomicserver.

Thanks a lot! Welcome.

Xuanwo avatar Dec 28 '23 01:12 Xuanwo

i want to try mongodb.

zjregee avatar Jan 03 '24 12:01 zjregee

I would like to work on dropbox.

howiieyu avatar Jan 09 '24 07:01 howiieyu

I would like to work on dropbox.

Thanks, assigned!

Xuanwo avatar Jan 09 '24 08:01 Xuanwo

let my try the sled

yufan022 avatar Mar 12 '24 13:03 yufan022