-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Is it possible to use node-oracledb in client alone "clean"? #1497
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
Comments
I wouldn't say that node-oracledb converts to Node-Gyp. I would say it is C code that uses Node-API. Node-oracledb can be used on the client - but you need Node.js. You can't embed it in a browser. In general it would be better positioned as a mid-tier so you can make good use of connection pooling. Browsers can make REST or GraphQL calls to a Node.js application that uses node-oracledb, or you can skip using Node.js altogether and just call from the browser to Oracle's ORDS. We are close to releasing a 'Thin' driver for Python and are starting to explore how we can do something similar for Node.js. Note I said Node.js, not JavaScript since we will probably need to make use of some Node.js libraries. But this is yet to be explored. I hope this explains it for you. |
Very nice news. I always thought that Oracle would never release the client code sources.
I propose to go towards the WebStream standards at the network socket interface and database BLOB implementation. This will make it easier to use on environments other than Node. |
@sosoba the Python Thin driver is available: https://medium.com/@cjones-oracle/open-source-python-thin-driver-for-oracle-database-e82aac7ecf5a |
Yes, I was already browsing the source code with curiosity. Does the |
There is no public doc on the protocol. We'll have a high level blog soon, but it won't go into details - that would be a big project. |
Closing. No response from filer so I assume the question was answered. |
Very cool - are there any plans for a node thin driver? |
That is being explored but in the early stages yet. @cjbj will let you know when that is closer to becoming reality. :-) |
Ah cool. That sounds great! For context: my interest in this stems from an app we have that needs to talk to Oracle only in prod and My understanding is that:
This is perhaps a little off-topic for this issue, but are these assumptions/thoughts accurate? |
Yes, those assumptions/thoughts are accurate. :-) |
@rmainseas Point 1 isn't true if you are using node-oracledb from npm. The Oracle Client libraries are only loaded at runtime by node-oracledb. In fact, they are loaded at point of first connection, so you can even do a However if you installed node-oracledb via some package manager e.g. yum, then the package dependencies may force Instant Client to be installed. |
Even if it's a POC that just connects to database and can only do "SELECT SYSDATE FROM DUAL" would be worth seeing. |
@sosoba we do plan to share a pre-release branch, but not quite yet. I need to do some paperwork for approvals, and the code needs some work first. |
I'll have to double check on this, but my recollection is that the project won't even install without the client libraries.... |
Maybe you recall the Linux RPMs? If you google for DPI-1047, you'll find plenty of people with a runtime error saying the libraries can't be loaded. All the library loading code is performed at runtime: https://github.com/oracle/odpi/blob/v4.4.1/src/dpiOci.c#L52-L60 |
So, this was on a Debian based system, so likely not the RPMs. In addition, the version of |
Hi cjbj, Is there a performance different between node-oracledb and oracle ords? |
But in most real applications, it will not matter because the dominant feature is the time the operation is performed by the database, not the transmission to the client. |
Having a thin client in node would be absolutely awesome and simplify my life tremendously as having to include the instant client stuff with our electron app easily outweighs the rest of our code in size.
Unless you're on a system that doesn't have prebuilt binaries available like M1...
|
I will close this as it has run its course. The team is working hard on the Thin driver mode project. Side note: You should be able to use the current node-oracledb on M1 by using Rosetta. You need to use/invoke the Intel Node.js binary - and compile the driver yourselves. |
Thin mode of python-oracledb is available, see https://github.com/oracle/python-oracledb#dependencies-and-interoperability. Hope thin mode of |
For future readers, node-oracledb 6.0 has been released. It has a Thin mode and can be used without Instant Client. |
hello,
We are currently planning a project that requires direct connection to "OracleDB" from a node client.
However, we encountered numerous problems in Addon and Node-gyp during pilot application development before enter project.
In addition, it was confirmed that "Node-OracleDB" also adopts the method of converting C++ and C to Node-Gyp, not pure JavaScript.
And, like other libraries using Node-Gyp, "OracleDB" also returned numerous errors and problems depending on the environment and dependencies.
The case is identical to the many issues that can be found by searching "React", "Electron", "Webpack", "Node-Gyp".
Our question is:
I would like to know if there is a guideline for using "node-oracledb" in Windows and Linux environment clients and browsers.
Connectors developed with pure Javascript such as Mysql and Postgresql do not cause the following problems. I would like to know if Oracle has any plans to provide a Connector developed in pure Javascript.
As a developer in the Oracle ecosystem, I would like to hear your advice on whether it is appropriate to use "node-oracledb" in a client application project to directly connect to db, that needs to be deployed in a Window, Linux environment, or Browser environment.
Thanks for reading. I am waiting for your reply.
The text was updated successfully, but these errors were encountered: