[Java] JDBC driver too large
- Ngôn ngữ chính
- Java
- Star
- 94
- Fork
- 152
- Merge trung bình
- 3 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 11
Mô tả
### Describe the bug, including details regarding any error messages, version, and platform.
If you add flight-sql-jdbc-driver as a dependency to a java appllication it pulls in 70MB of dependencies including 8 platform specific versions of netty and 1000s of files. H2 database which includes a JDBC driver and a database engine is 2.5MB. If you want smaller, here is JDBC implemented as a single file (https://github.com/KxSystems/kdb/blob/master/c/jdbc.java), this is used by 100s of users globally.
I admire the idea of a common data format but tying it to a 70MB verbose implementation when someone just wants a java driver isn't convincing me.
Eclipse, apache, google, gson, flatbuffer - it's basically every popular java dependency in the world.
- **There's a 256kb suffix list text file from mozilla in there.** What's that for? No attempt has been made at crafting something beautiful. 256kb is 10% of the size of H2 database and JDBC driver.
- 13 MB for platform specific nettys is larger than 80% of other database drivers alone. (screenshot below)

mozilla\public-suffix-list.txt
```
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// Please pull this list from, and only from https://publicsuffix.org/list/public_suffix_list.dat,
// rather than any other VCS sites. Pulling from any other URL is not guaranteed to be supported.
// Instructions on pulling and using this list can be found at https://publicsuffix.org/list/.
// ===BEGIN ICANN DOMAINS===
// ac : http://nic.ac/rules.htm
ac
com.ac
edu.ac
gov.ac
net.ac
mil.ac
org.ac
// ad : https://en.wikipedia.org/wiki/.ad
ad
nom.ad
// ae : https://tdra.gov.ae/en/aeda/ae-policies
ae
co.ae
net.ae
org.ae
sch.ae
ac.ae
```
Platform specific netty takes 13MB.

### Component(s)
Java
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách kiểm tra cây dependency của flight-sql-jdbc-driver, đặc biệt chú ý đến mozilla/public-suffix-list.txt và các artifact Netty dành riêng cho từng platform được đề cập trong báo cáo. Xác nhận dependency nào chiếm phần kích thước được báo cáo và xem xét các entry point đóng gói JDBC driver. Công việc được xem là hoàn tất khi đạt được mức giảm footprint của dependency có thể đo lường và đã được thống nhất, mà không làm hỏng Java JDBC driver.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- databases
- Loại issue
- Lỗi
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100