Comments (1)
I used node worker threads, not web workers. Do you mean these web workers nodejs/node#43583 ?
It looks like violation of RFC SDK threading rules, described on pg. 34 of SAP NetWeaver RFC SDK 7.50 Programming Guide
This seems to be an appropriate point to say a few words about thread-safety. Of course, the NW RFC Library is thread-safe in the sense that you can call any API simultaneously in different threads. However, that does not mean the application can also use the same “object”, like a connection or a table, in several threads at the same time and expect something reasonable to happen. Here are two typical examples, that were implemented in practice:
* A connection handle is shared between two threads and both of them are trying to execute a function call at the same time. Common sense already indicates that this can lead to no good. This would be similar to opening one single HTTP connection to an HTTP server and then sending two different GET or POST requests over that connection at the same time from two parallel threads. Even if the HTTP server would somehow be able to correctly recognize and serve both requests, there would be no guarantee as to which of the two threads receives which HTTP response... Most probably both threads would end up reading parts of each other’s responses.
As is the case with any kind of connection-based network programming (like HTTP connections, ODBC connections, etc.) an RFC_CONNECTION_HANDLE must not be shared between different threads.
* A table handle is shared across two threads, and both threads start filling rows into that table. Even if the insert operations were synchronized, it would not help: the end result would still be a completely intermingled sequence of thread A’s and thread B’s data, depending mainly on how the CPU distributes the time-slots between the two threads.
Therefore, for best performance, the NW RFC API does not synchronize any table operations and relies on table handles not being shared between two threads.
Consequently, as a general rule, all NW RFC library objects that are represented by a HANDLE, must not be shared across threads, the exception being immutable objects like metadata descriptions.
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
- 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.