Closed rhtpandeyIN closed 3 years ago
Unfortunately, I had to open this issue here as I got no response from the "loopback-connector-informix" repository. I opened one issue there on Sept 21, 2020, and till now I have not got any response on that.
Repo: https://github.com/strongloop/loopback-connector-informix Issue: https://github.com/strongloop/loopback-connector-informix/issues/58
Please help us to reach out to the correct team.
Thank you for starting this discussion, @rhtpandeyIN.
I am afraid we don't have any Informix/DB2 experts on the maintainers team any more, so we don't have enough knowledge to be able to judge your proposal.
I don't think we can simply change loopback-ibmdb
to use informixdb
instead of ibm_db
, because loopback-ibmdb
is used by other connectors like loopback-connector-db2
and I don't think IBM DB2 supports Informix/SQLI protocol?
Also when I look at the stats, ibm_db
seems like a much popular option:
ibm_db
: 8k downloads/week, 39 contributors, used by 1.6k projects according to GitHubinformixdb
: 23 downloads/week, 3 contributors, used by 4 projectsIf you are convinced that your Informix driver is a better option, then my advice is to fork loopback-connector-informix
and then rework the code to use informixdb
instead of loopback-ibmdb
+ ibm_db
modules. Feel free to copy any relevant code from loopback-ibmdb
into your forked driver project, as needed.
Once you have a version that's good enough for regular use, feel free to open a pull request to list your connector on our docs page listing community-maintained extensions - see https://loopback.io/doc/en/lb4/Community-extensions.html
Thanks for the quick response @bajtos Yes, "ibm_db" has more traffic as it is an older library in comparison to "informixdb". And also, "Db2" has more customers, and I am not sure how many of them are using "node-ibm_db" for Informix connectivity. So these numbers don't actually represent the real Informix users.
Also, earlier Informix node.js driver did not have support for OpenSSL, but this new driver "informixdb" supports that and is mainly dedicated to support Informix Database.
But yes, "node-ibm_db" does work with Informix, but it will not be as efficient as "informixdb".
We do acknowledge your concerns, and we will try to come up with a PR for the same. Thanks for the recommendations.
Regards: Rohit
Description/Steps to reproduce
Request to use "node-informixdb" for the Informix connector rather "node-ibm_db"
Link to reproduction sandbox
this module's package.json contains below dependencies: "dependencies": { "async": "^1.5.0", "debug": "^3.1.0", "loopback-connector": "^4.0.0", "loopback-ibmdb": "^2.0.0", "strong-globalize": "^4.1.1" },
loopback-ibmdb has the below dependencies: "dependencies": { "async": "^2.6.1", "debug": "^3.1.0", "ibm_db": "^2.3.0", "loopback-connector": "^4.0.0", "strong-globalize": "^4.0.0" },
ibm_db is the designated connector for Db2 database and has limited support for Informix database.
ibm_db uses DRDA protocol to connect with the Informix whereas informixdb uses the SQLI protocol which is native to the Informix Database.
I know all this because I have been part of Db2 node.js driver (node-ibm_db)[https://github.com/ibmdb/node-ibm_db/graphs/contributors] and now I am an active contributor to the Informix database connector.
Expected result
To pursue this change you will have to change the dependency in the loopback-ibmdb module:
from this : "dependencies": { "async": "^2.6.1", "debug": "^3.1.0", "ibm_db": "^2.3.0", "loopback-connector": "^4.0.0", "strong-globalize": "^4.0.0" },
to this: "dependencies": { "async": "^2.6.1", "debug": "^3.1.0", "informixdb": "^2.1.0", "loopback-connector": "^4.0.0", "strong-globalize": "^4.0.0" },
and will have to change some code in the both "loopback-connector-informix" and "loopback-ibmdb" modules. These changes are not that significant (just a few lines changes) and the existing code will work like magic. So, please let me know if you think this request has some weight. The only thing that concerns me is Informix does not provide the latest support for DRDA layer and ibm_db would be missing a major part of Informix features (for future developments as well).
Additional information
node-informixdb : https://github.com/OpenInformix/node-informixdb node-ibmdb : https://github.com/ibmdb/node-ibm_db/
and the best part is their codebase is almost the same, so loopback existing code will work without much effort.