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

Should Layotto support SQL queries and how? Layotto是否应该支持SQL查询,如何支持? #101

Closed
seeflood opened this issue Jul 1, 2021 · 6 comments
Labels

Comments

@seeflood
Copy link
Member

seeflood commented Jul 1, 2021

Should Layotto support SQL queries and how?

The current state API is essentially a key/value model API and does not support SQL query.

So should L8 support sql query? We open this issue to see your opinions

User scenario:

  1. DB sharding: If users have done mysql sharding, the application needs routing when querying mysql.It is necessary for apps to import a data middleware SDK(such as shardingsphere-JDBC) or query through a db proxy (such as ShardingSphere-Proxy), or through a db mesh sidecar (such as ShardingSphere-Sidecar)
  2. Portability: If users want to deploy their apps across different clouds, or do some migration such as migrating from mysql cluster to a distributed relational database (TiDB, Oceanbase, etc.), as long as the new db supports the mysql protocol, users don't have to modify their code.Portability like this can be achieved by using db proxy or db mesh.

Question:

  1. Should L8 function as a db mesh sidecar? In other words, do you have any needs in sql query through L8?
  2. If we want L8 to support sql query, what kind of API should be provided?
    a. Binding API like Dapr
    b. Support Mysql protocal

Welcome to express your opinion!

chinese:

Layotto是否应该支持SQL查询,如何支持?

目前的state API本质上是key/value模型的存储、不支持灵活的传SQL。那么L8要不要支持sql查询呢?发个issue看看大家的意见

用户场景:

  1. 分库分表:假如用户做了mysql分库分表,应用在查询mysql的时候需要路由,就要集成数据中间件的sdk(例如shardingsphere-JDBC)或者经过独立进程的db proxy(例如ShardingSphere-Proxy),或者经过作为sidecar的db mesh(例如ShardingSphere-Sidecar)
  2. 可移植:假如用户要跨云部署,要做一些移植,比如从mysql分库分表换成用分布式关系库(TiDB,Oceanbase等),只要新的库也支持mysql协议,使用db proxy或db mesh的应用就可以无需修改代码、具备随时移植到新环境的能力

问题:

  1. runtime要不要做db mesh的功能呢?或者说,您有通过runtime支持sql查询的需求么?
  2. 如果要支持sql查询,是提供什么样的API呢?
    a. 像Dapr一样的binding API
    b. 直接支持SQL查询

欢迎大家发表自己的看法~~

@seeflood
Copy link
Member Author

seeflood commented Jul 1, 2021

In my opinion:

pros of supporting SQL query:

  • A single sidecar serve as service mesh+db mesh+runtime. Easy to deploy and maintain

cons:

  • Complex to implement

@nobodyiam
Copy link
Member

I think it's meaninful to support sql statements, however sql is complex, e.g. transaction support. Also there are minor syntax differences between different databases, which means it might be hard to change from one database to another.

@wenxuwan
Copy link
Member

wenxuwan commented Jul 1, 2021

attach some discussion:

dapr/dapr#3339
dapr/dapr#1339

@seeflood seeflood pinned this issue Jul 2, 2021
@seeflood
Copy link
Member Author

seeflood commented Jul 5, 2021

dapr/dapr#3354

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue or help wanted) or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Oct 24, 2021
@github-actions
Copy link

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue or help wanted. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants