apache / apache/libcloud

Support for Cloudflare's D1 and/or R2

未关闭
#1,865 0 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
2.1k
派生
931
平均合并
1 天 2 小时
30 天内合并 PR
4

描述

## Feature Description

Cloudflare has been developing an alternative to traditional storage providers, with the benefit that it has no egress fees for the data.

- [**D1**](https://developers.cloudflare.com/d1) is a relational database build on SQLite, which currently is on Alpha. It can be access and manipulated through the online GUI on [Cloudflare's Dashboard](https://dash.cloudflare.com/) or through the CLI using a npm package called [wrangler](https://github.com/cloudflare/workers-sdk/tree/main/packages/wrangler).
- [**R2**](https://developers.cloudflare.com/r2) is the Cloudflare's implementation of an object storage service. It can be used through the GUI on [Cloudflare's Dashboard](https://dash.cloudflare.com/), through the CLI with [wrangler](https://github.com/cloudflare/workers-sdk/tree/main/packages/wrangler), or using the [Amazon's S3 API](https://aws.amazon.com/s3/).

## Proposal

1. First the easiest, R2. To begin with, test if Apache Libcloud [`libcloud.storage.drivers.s3`](https://libcloud.readthedocs.io/en/stable/apidocs/libcloud.storage.drivers.html#module-libcloud.storage.drivers.s3) works correctly with an R2 bucket, and if so, update the documentation to reflect that said module can be used with R2. It would be a good idea to document what functions are NOT available, according to Cloudflare's R2 [documentation](https://developers.cloudflare.com/r2/data-access/s3-api/api/).
2. If `libcloud.storage.drivers.s3` doesn't work with R2, another module can be created (`libcloud.storage.drivers.r2`, for example), which is based on the S3's module but with a few adjustments, and removing functions that are unavailable on R2. I do think this is a cleaner solution, to keep S3 separated from R2.
3. Finally, as Apache Libcloud does not (yet) manage Cloud Databases, a fine addition to the library would be to start a new module (maybe `libcloud.sql.*`?) and implement certain popular SQL Databases, such as [Amazon's RDS](https://aws.amazon.com/rds/), [Azure's SQL Database](https://azure.microsoft.com/en-us/products/azure-sql/database/), and of course Cloudflare's D1.

贡献指南

打开贡献指南

调研方向

首先对照 Cloudflare R2 的 S3 API 文档检查 libcloud.storage.drivers.s3,并确定是否可以记录现有的兼容性,或者是否需要单独的 libcloud.storage.drivers.r2 模块。更广泛的提案还建议为 D1 和其他托管 SQL 数据库设计 libcloud.sql.*;完成的标准是就范围、实现、测试和文档达成一致。

由索引模型根据 Issue 内容生成。

评估

技术栈
aws, python, sql, sqlite
领域
cloud, databases
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
20/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。