ibmdb / node-ibm_db

IBM DB2 and IBM Informix bindings for node
MIT License
188 stars 151 forks source link

New Feature/Enhancement Request: Binary release (and make it small) #963

Open data-henrik opened 8 months ago

data-henrik commented 8 months ago

Is your feature request related to a problem? Please describe. It requires some infrastructure to use the driver.

Describe the solution you'd like Distribute a small, directly usable library / module. No compilation, small in size, core features blazing fast.

Additional context The Db2 driver is not working in certain compute environments like Functions as a Service.

data-henrik commented 8 months ago

image

https://github.com/ibmdb/node-ibm_db#prerequisite

bimalkjha commented 7 months ago

@data-henrik

Distribute a small, directly usable library / module. No compilation, small in size, core features blazing fast.

ibm_db uses clidriver for connectivity which is different for different platform. If we add clidriver also with ibm_db, size will be very large, we can't avoid that. If you check unpacked size of current ibm_db at https://www.npmjs.com/package/ibm_db, it is of 14.1MB under which https://github.com/ibmdb/node-ibm_db/blob/master/build.zip is of 11.2MB. So, actual size of ibm_db is less than 3MB and it is also due to 2MB of test files.

Currently, we are already shipping precompiled windows binaries for all node versions > 12.0 and electron binaries for electron version > 19 in build.zip file. If we add pre-compiled binaries for other platforms also like Linuxx64, MacOS, AIX, LinuxPPCLE, LinuxPPC64, zLinux, z/OS, other platforms, the size of build.zip will grow more than 70MB itself which will make this package very bulky and burden on us too to generate so many binaries before every release. Since, ibm_db uses C++ code as add-on binary and for add-on binaries, nodejs suggest to use local compilation. Same is for other packages with add on binaries or they support very limited OS.

The Db2 driver is not working in certain compute environments like Functions as a Service.

We would certainly like to know more about this issue. If you can share why it is not working and what is blocking, we can try to fix it. Also, let me know, how I can reproduce this problem myself which will help to fix faster. Thanks.

data-henrik commented 7 months ago

I would focus on typical container runtimes which is Linux on x86. Some vendors have native drivers, so basically a DRDA implementation in Typescript would be needed.

bimalkjha commented 7 months ago

Opened Epic in Internal Jira to add pre-compiled Linux binaries in ibm_db driver: https://jira.rocketsoftware.com/browse/DBC-14897. Currently, this Epic is scheduled for 2024.

We can not implement DRDA in any open source language as we'll loose control over requirement of db2connect license for z/OS and iSeries servers. A DRDA implementation in open source can be modified by any user to bypass license check. We can not support or maintain any open source driver that do not use IBM ODBC or JDBC driver for connectivity. Thanks.