Comments (6)
Are you trying to promisify node-rfc API ? If yes, please check if examples in napi branch README and unit tests fit your needs? You can uninstall node-rfc and run npm install node-rfc@next
, to install this napi based prerelease. Please feel free to try, feedback welcome.
from node-rfc.
I'm not trying to promisify it, its just the way I like to code. =)
My concern is, why it is blocking the event loop like that? The code is correct, it should not block it.
from node-rfc.
I tested on Linux with nodejs 8.11.3 and on Windows with nodejs 10.4.1. In either case I could not reproduce performance or blocking issue.
Could you please post the log and how it differs from expected?
Which SAP NW RFC SDK version is used (glClient.getVersion()) ?
Please find the Windows log here:
executeClient: 1.051ms
executeClient: 0.055ms
executeClient: 0.068ms
executeClient: 0.065ms
executeClient: 0.065ms
executeClient: 0.054ms
executeClient: 0.053ms
executeClient: 0.122ms
executeClient: 0.136ms
executeClient: 0.062ms
executeClient: 0.137ms
executeClient: 0.091ms
executeClient: 0.066ms
executeClient: 0.065ms
executeClient: 0.052ms
executeClient: 0.037ms
executeClient: 0.061ms
executeClient: 0.061ms
executeClient: 0.077ms
executeClient: 0.084ms
executeClient: 0.116ms
executeClient: 0.056ms
executeClient: 0.041ms
executeClient: 0.097ms
executeClient: 0.045ms
executeClient: 0.076ms
executeClient: 0.043ms
executeClient: 0.130ms
executeClient: 0.067ms
executeClient: 0.128ms
executeClient: 0.128ms
executeClient: 0.092ms
executeClient: 0.090ms
executeClient: 0.096ms
executeClient: 0.090ms
executeClient: 0.080ms
executeClient: 0.050ms
executeClient: 0.158ms
executeClient: 0.071ms
executeClient: 0.044ms
executeClient: 0.093ms
executeClient: 0.056ms
executeClient: 0.175ms
executeClient: 0.056ms
executeClient: 0.118ms
executeClient: 0.038ms
executeClient: 0.055ms
executeClient: 0.032ms
executeClient: 0.086ms
executeClient: 0.044ms
executeClient: 0.099ms
executeClient: 0.047ms
executeClient: 0.042ms
executeClient: 0.108ms
executeClient: 0.047ms
executeClient: 0.027ms
executeClient: 0.120ms
executeClient: 0.048ms
executeClient: 0.088ms
executeClient: 0.056ms
executeClient: 0.073ms
executeClient: 0.046ms
executeClient: 0.092ms
executeClient: 0.040ms
executeClient: 0.052ms
executeClient: 0.132ms
executeClient: 0.066ms
executeClient: 0.054ms
executeClient: 0.058ms
executeClient: 0.045ms
executeClient: 0.084ms
executeClient: 0.030ms
executeClient: 0.033ms
executeClient: 0.059ms
executeClient: 0.148ms
executeClient: 0.075ms
executeClient: 0.049ms
executeClient: 0.032ms
executeClient: 0.044ms
executeClient: 0.031ms
executeClient: 0.029ms
executeClient: 0.079ms
executeClient: 0.041ms
executeClient: 0.091ms
executeClient: 0.049ms
executeClient: 0.038ms
executeClient: 0.088ms
executeClient: 0.045ms
executeClient: 0.033ms
executeClient: 0.043ms
executeClient: 0.062ms
executeClient: 0.089ms
executeClient: 0.047ms
executeClient: 0.048ms
executeClient: 0.036ms
executeClient: 0.073ms
executeClient: 0.105ms
executeClient: 0.043ms
executeClient: 0.046ms
executeClient: 0.037ms
from node-rfc.
Thanks for the response!
That's strange. I'm running on Windows, updated to node 8.11.3.
SAP NW RFC SDK is { major: 7500, minor: 0, patchLevel: 1 }.
"node-rfc": "^0.1.16"
The results:
executeClient: 83.359ms
executeClient: 5001.281ms
executeClient: 4999.365ms
executeClient: 5000.776ms
executeClient: 5000.485ms
executeClient: 5000.605ms
executeClient: 5000.756ms
executeClient: 4999.922ms
executeClient: 5001.896ms
executeClient: 5000.368ms
executeClient: 5000.196ms
executeClient: 5000.124ms
executeClient: 5001.024ms
executeClient: 5000.983ms
executeClient: 5000.690ms
executeClient: 5000.107ms
executeClient: 5000.821ms
executeClient: 4999.915ms
executeClient: 5000.077ms
executeClient: 5000.376ms
executeClient: 4999.794ms
from node-rfc.
Hi @zig999,
I tested again and it works just as you described, on Linux and on Windows. The reason I did not reproduce at first is that I tested with pre-release, in which this issue apparently does not occur.
Briefly comparing prerelease (@next) and 0.1.16 sources I didn't find anything suspicious and need to investigate further.
Would you mind using prerelease version for the time being ?
On Windows you may experience an annoying issue during installation, described in node-pre-gyp issue 367.
As a workaround:
-
Download and unpack
sapnwrfc.node
from 0.20.0-rc2/rfc-node-v57-win32-x64.tar.gz -
Force node-rfc@next install
npm install node-rfc@next --save --force
- Copy
sapnwrfc.node
tonode_modules\node-rfc\lib\binding\node-v57-win32-x64
In this prerelease please also change:
var rfc = require('node-rfc');
var glClient = new rfc.Client({
"user": "XXX",
"passwd": "XXX",
});
to:
var rfcClient = require('node-rfc');
var glClient = new rfcClient({
"user": "XXX",
"passwd": "XXX",
});
Hope this helps,
Srdjan
from node-rfc.
Thanks @bsrdjan , glad to hear it is fixed on the next version. =)
I'll give it a try.
from node-rfc.
Related Issues (20)
- The specified module could not be found. node.napi.node HOT 2
- Docker container hung if sap does not respond to RFM call HOT 1
- error: ‘condition_variable’ in namespace ‘std’ does not name a type
- Can't able to upload excel file using node rfc HOT 1
- Change we change the default port 3300 to 3600 without changing connection string HOT 4
- receving idoc using node-rfc HOT 3
- Installation fails HOT 14
- [rl-reuse_tool-2] Violation against OSS Rules of Play
- [rl-reuse_tool-4] Violation against OSS Rules of Play
- Problem with node 20.10 LTS HOT 1
- Can't get environment on Windows env HOT 2
- Dynamic Connection and Cache HOT 8
- node-rfc installation not working HOT 2
- Difference between client.call and client.invoke HOT 4
- Using node-rfc on web workers HOT 1
- Getting Error: Conversion Error between Character Sets HOT 1
- SAP document listener in node js HOT 1
- TypeScript types for exceptions
- Node Js server crashes after a few RFC calls
- device or resource busy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-rfc.