[FEATURE] Support OceanBase JDBC Catalog
Describe the feature
Support OceanBase as a type of data source.
Motivation
OceanBase is an enterprise-ready open source distributed relational database with high availability, high performance, horizontal scalability, and compatibility with SQL standards. We should consider supporting OceanBase as a data source, including features for managing databases, tables etc.
Describe the solution
No response
Additional context
No response
@yuanoOo A good point, the community is open to adding more catalogs and integrating them with Gravitino, would like to work on this?
@yuqi1129 Yes, I would like to work on this!
@yuqi1129 Yes, I would like to work on this!
Okay, I will assign this to you.
Thanks @yuanoOo for your issue, my concern is that if OB's license is compatible with the Apache V2 license, we should be cautious when we plan to do this.
If I'm looking in the right place, OB's license doesn't seem to be compatible with the Apache License [1]. However, it would be possible to implement support and distribute it in an ASF release if it is an optional feature and this would only apply if no GPL licensed code was needed in the ASF release.
- https://github.com/oceanbase/obconnector-j/blob/master/LICENSE
See https://www.apache.org/legal/resolved.html#prohibited and https://www.apache.org/legal/resolved.html#optional for details.
@jerryshao @justinmclean Thanks for your reminder. OceanBase Community Edition is fully compatible with MySQL protocol, which means we can use MySQL JDBC driver to connect to OceanBase. So we can do it like MySQL without providing driver directly. Additional note: OceanBase Enterprise Edition has an additional oracle mode. In oracle mode, we can only connect through OceanBase's own JDBC driver. see https://en.oceanbase.com/docs/common-oceanbase-database-10000000001375341 We can only support OceanBase Community Edition first.
You will need to take care there as well, as some versions of Oracle's MySQL JDBC driver are not licensed under a license compatible with the Apache license. e.g. "MySQL Connector/J 9.0.0 Community is brought to you by the MySQL team at Oracle. This software is released under version 2 of the GNU General Public License (GPLv2)."
I see a PR has been made. Are you sure this is compatible with the ALv2 and ASF distribution and licensing policies?
To clarify, we would need answers to:
- What software does a user need to connect Gravitino to OceanBase and how is it licensed?
- Is that software truly optional?
- Is that software installed automatically without notifying the user?
- Is that software part of the binary distribution?
I see a PR has been made. Are you sure this is compatible with the ALv2 and ASF distribution and licensing policies?
@justinmclean I am not too clear about the compatibility rules between licenses. I have seen other MySQL protocol compatible databases in the code, such as Apache Doris. OceanBase is similar to them to some extent.
To clarify, we would need answers to:
- What software does a user need to connect Gravitino to OceanBase and how is it licensed?
- Is that software truly optional?
- Is that software installed automatically without notifying the user?
- Is that software part of the binary distribution?
@justinmclean Thanks for your reminder.
- mysql connector/java Or OceanBase Client for Java
- Yes
- No
- No
The MySQL connector and the Oceanbase client for Java are licensed under the GPL/LGPL license. This is not compatible with the ALv2.
The MySQL connector and the Oceanbase client for Jave are licensed under the GPL/LGPL license. This is not compatible with the ALv2.
As far as I know, the mysql connector/java driver binary is not directly provided in the distribution package, like other Apache open source projects. As above, will there still be compatibility issues with ALv2 licenses?
Possibly as GPL is not compatible with ALv2 see https://www.apache.org/licenses/GPL-compatibility.html. Note that merely linking to it (i.e. having it as a dependency) is an issue, not just its distribution. I'd need to look at the final artifacts to be sure.
Possibly as GPL is not compatible with ALv2 see https://www.apache.org/licenses/GPL-compatibility.html. Note that merely linking to it (i.e. having it as a dependency) is an issue, not just its distribution. I'd need to look at the final artifacts to be sure.
Justin, MySQL's license is also not compatible with ALv2 I think, but Gravitino supports it. I think OB is the same case.
It may or may not be, just because they have the same or similar licenses is not enough to go on. By default, anything with a Category X license (which includes GPL-style licenses) can't be included in a release or be depended upon.
@yuanoOo thanks a lot for your contribution. May I ask what is your email address or wechat id, I think we can have a talk first 😄 .
I've taken a look at the distribution artifact and it looks good to me. Due to the Category X license, this would not normally be OK, but it is in this case it is OK, due to https://www.apache.org/legal/resolved.html#optional and https://www.apache.org/legal/resolved.html#prohibited.
As there are several OceanBase editions (community, enterprise, cloud, etc), to avoid confusing, I recommend this to use a more specific name like "OceanBase community edition" or OceanBase CE to differenciate. What do you think? @yuanoOo
As there are several OceanBase editions (community, enterprise, cloud, etc), to avoid confusing, I recommend this to use a more specific name like "OceanBase community edition" or OceanBase CE to differenciate. What do you think? @yuanoOo
Agree, I think this is a good suggestion.
@yuanoOo Thanks for your idea and work!
I think creating a complete OB catalog is a long-term project. I have seen your design document, which is a good start. While refining the document, we may also need to further break down the implementation plan, which may require several PRs to complete.
So could you create an epic issue to track all related matters of the upcoming OB catalog? Thank you! Feel free to ping me if you have any questions!
@mchades Thank you for your suggestion. I have just created a corresponding EPIC issue: https://github.com/apache/gravitino/issues/4848
close this since it is duplicated with #4848