profile
viewpoint
John Barboza jBarz Software developer

ibmruntimes/vsam.js 7

Reading and writing vsam files using NodeJS

ibmruntimes/citgm 0

Canary in the Gold Mine

jBarz/acmeair-nodejs 0

A Node.js implementation of the Acme Air Sample Application. With datastore support of MongoDB, Cloudant, Cassandra. With runtime support of Bluemix/CloudFoundry, Docker... With Micro-Services.

jBarz/appmetrics 0

Node Application Metrics provides a foundational infrastructure for collecting resource and performance monitoring data for Node.js-based applications.

jBarz/bitcoin 0

Bitcoin Core integration/staging tree

jBarz/build 0

Better build and test infra for Node.

jBarz/express 0

Fast, unopinionated, minimalist web framework for node.

jBarz/generator 0

Rails-inspired generator system that provides scaffolding for your apps

startedOffchainLabs/arbitrum

started time in 8 hours

startedjovanbulck/sgx-step

started time in a day

issue commentlibuv/help

The problem with integrating libuv into another event loop.

Right, I see what you're saying. Yes, that won't work. I'll move this back to the bug tracker.

libuvreporter

comment created time in a day

issue closedlibuv/help

How to use sleep function reasonably?

Hello, author I used libuv to write a network library, I used him to send UDP messages, sending 1400 bytes each time, but my speed has not been able to go up. I debugged the code and found that the recv callback is only triggered once in each loop. Because I want to reduce the CPU utilization, I called sleep (1) in idling, so the number of cycles per second is only hundreds, so the receiving speed of UDP can only be 1400 * (hundreds) per second, I want to know how to reduce the CPU frequency reasonably without affecting the network receiving speed

Version:1.19.2 Platform:windows

closed time in 2 days

tkzcfc

issue commentlibuv/help

The problem with integrating libuv into another event loop.

Libuv takes care of all that. You as an embedder just need to monitor the backend fd for readability.

I was hoping so. But as far as I can see in the source code, the function uv_poll_start () calls first uv__io_start () and then uv__handle_start (). uv__io_start () adds an watcher to the watchers queue. uv__handle_start () also does not update the epoll file descriptor. How does libuv update the uv_backend_fd file descriptor event mask after calling uv_poll_start ()?

libuvreporter

comment created time in 3 days

issue commentlibuv/help

The problem with integrating libuv into another event loop.

Libuv takes care of all that. You as an embedder just need to monitor the backend fd for readability.

libuvreporter

comment created time in 3 days

issue commentlibuv/help

The problem with integrating libuv into another event loop.

The idea is that you couple uv_backend_fd() with uv_backend_timeout() and then call uv_run(loop, UV_RUN_NOWAIT).

If I call uv_run (), the registered callback will probably be called. This callback can modify the event mask on any file descriptor. In order for these modifications to be applied on the file descriptor returned by uv_backend_fd (), you must call uv_run () again. But calling uv_run () again can call callbacks ..... so uv_backend_fd is potentially out of sync with the required monitoring event mask.

libuvreporter

comment created time in 3 days

issue commentlibuv/help

The problem with integrating libuv into another event loop.

The idea is that you couple uv_backend_fd() with uv_backend_timeout() and then call uv_run(loop, UV_RUN_NOWAIT).

UV_RUN_ONCE should work too because you're calling uv_run() when there is definitely work to do, either processing I/O or expiring timers.

libuvreporter

comment created time in 3 days

issue openedlibuv/help

The problem with integrating libuv into another event loop.

Hello. I am trying to integrate an event loop lib with another event loop. And I found out some issue. The file descriptor returned by function uv_backend_fd() is not suitable for polling. The reason for this is that some callback can add or remove event monitoring on some file descriptor, for example, using function uv_poll_start(). However, the real modification of epoll in libuv library occurs only in uv_run() function.

Maybe I misunderstand something?

  • Version: commit 9c3d692b3941a2a4171629fb52af2e1029c415e8
  • Platform: Linux 5.4.0-62-generic Ubuntu SMP x86_64

created time in 3 days

startedwhid-injector/WHID

started time in 3 days

startedwhid-injector/whid-31337

started time in 3 days

startedappliedzkp/maci

started time in 4 days

PR opened ibmruntimes/vsam.js

resolve issues reported by a customer's testing

Most of the updates in this PR are a result of issues encountered and reported to myself by a customer. The changes are large (for one PR) because of continued work with the customer: customer reports an issue, we fix it, customer does more testing, encounters another issue, repeat - and they needed the fixes urgently.

Fixes:

  1. fix a runtime crash
  2. change default read-write open mode from ab+ to rb+ (to fix a locking issue when multiple processes open the same dataset)
  3. fix a bug in the async functions in which an exception was thrown instead of passing an error message to the user's callback
  4. handle undefined fields in the record passed to write and update (previously "undefined" would be written)
  5. report an error if a field length exceeds its maxLength, instead of truncating it; also add more validation of user's arguments and I/O functions, and report failures
  6. handle API calls made on a closed dataset (previously would crash)
  7. add missing code that was documented with TODOs
  8. remove unnecessary flags, xcode_settings and msvs_settings from binding.gyp

New functionality:

  1. add 'update' and 'delete' overloaded methods that find and update/delete record(s) in a single call
  2. add synchronous version for all APIs
  3. enable concurrent (interleaved) dataset access:
    • use a thread per open dataset to handle all I/O (addresses https://www.ibm.com/support/knowledgecenter/SSLTBW_2.3.0/com.ibm.zos.v2r3.cbcpx01/cbc1p2274.htm)
    • parameters specific to a JS call (key, record, callback function, etc.) are now passed in each uv_work_t request, instead of shared in the VsamFile object, to support interleaved JS calls on the same dataset
  4. enable key to be in any field, not just the first
  5. allow 0x in a hexadecimal field
  6. add support for new attribute 'minLength' in the schema JSON file

Other:

  1. test: add diagnostics tests, concurrent read-access (previously would hang), write and update of undefined fields (previously wuld fail), test write and update of duplicate key, updating a key, etc. and a sync version of all async tests
  2. doc: README.md updates
  3. update version to 3.0.0 in package.json
  4. create a wrapper WrappedVsam for the JS-C++ interface and moved the actual VSAM dataset implementation into a separate VsamFile class, to help with code maintenance
+4621 -1224

0 comment

16 changed files

pr created time in 4 days

issue commentlibuv/help

how to generate x86 specific sln using cmake

Yes, but that's not a libuv-specific question. Look up how to do cross-compiling (changing the build target) with cmake.

lovelypp777

comment created time in 8 days

issue openedlibuv/help

how to generate x86 specific sln using cmake

I have generate x64 sln for successfully using "cmake .." in windows 10. but is there any defines to generate x86 specific sln ?

thanks!

created time in 8 days

startedseansing/proof-of-snake

started time in 9 days

fork shayanb/metrics

📊 An image generator with 20+ metrics about your GitHub account such as activity, community, repositories, coding habits, website performances, music played, starred topics, etc. that you can put on your profile or elsewhere!

https://metrics.lecoq.io

fork in 10 days

created repositoryshayanb/shayanb

created time in 10 days

push eventibmruntimes/vsam.js

Gaby Baghdadi

commit sha e825614f22e3290a28751bc570994f871fb76e8a

test: rename reference to a .json file

view details

push time in 10 days

push eventibmruntimes/vsam.js

Gaby Baghdadi

commit sha b66b37ee2e7c813ce9d7177bc5c61496e1884299

doc: update README.md to include new functions in vsam.js v3.0.0 Also added more details to the existing functions' description and fixed incorrect details including wrong arguments for close(), findfirst() and findlast(), as well as wrong info on wite().

view details

Gaby Baghdadi

commit sha 69907ef9b4bf2b0a7ea88dba1d7865934d9d4267

build: update version to 3.0.0

view details

Gaby Baghdadi

commit sha 09f224c050b542f207ce05df1c6073f38d59ef46

test: rename .js and .json files and their references To match those renamed in the README.md in b66b37ee2e.

view details

Gaby Baghdadi

commit sha 6e4acf48d2322ecb07e7ca7375290a9278fb627d

src: stop search if key length provided matches record's key kength This saves an unneeded read, compare, etc. when updating or deleting record(s) based on a given recordKey, since such a key must be unique.

view details

push time in 10 days

startedlowlighter/metrics

started time in 11 days

startedamirhoseinsalimi/programmer-fa

started time in 11 days

push eventibmruntimes/vsam.js

Gaby Baghdadi

commit sha e83fb8641de9a903572055e3c0ac90370ac1b78e

src: handle API calls made on a closed dataset If user called an API, say close() or write(), while the dataset is already closed, send an error to the callback or throw an error for the Sync APIs, otherwise the user app will crash while accessing a NULL pVsamFile pointer, unless built with -DDEBUG, in which case the APIs would fail with an assertion error, except for close() which didn't have that. Also fix FindDelete_() to return the exit code from Find(), instead of always return 0.

view details

Gaby Baghdadi

commit sha 7eebde5c717638ca0386d11d0550af21d67e92ed

test: handling of API calls made on a closed dataset Tests commit e83fb8641.

view details

push time in 12 days

startedawesomerobot/discourse-isabelle-theme

started time in 13 days

starteddan-da/hd-wallet-derive

started time in 14 days

startedgoupaz/goupaz.com

started time in 14 days

startedOWASP/Amass

started time in 14 days

push eventibmruntimes/vsam.js

Gaby Baghdadi

commit sha 24f99779b9d5913e25bd79e3b3f4af92a3721810

src: change default read-write open mode from ab+ to rb+ It seems the original ab+ mode was intended to create the file if it didn't exist, but if it didn't exist, the dataset requires that it's allocated first (so it must exist before openSync() is called). The 'ab+' mode also caused open to fail in read-write mode while another process already has the dataset (even if in read-only mode), with error: EDC5061I An error occurred when attempting to define a file to the system. (errno2=0xc00b0403). With 'ab+' mode, the error doesn't occur if multiple read-only and one read-write open is performed from the same process.

view details

Gaby Baghdadi

commit sha 85d84d2349e8b2f679d0db75fd2dd3dd4f2d48db

test: change for the ab+ to rb+ default open mode This is to test the change following commit 24f99779b9.

view details

Gaby Baghdadi

commit sha 105a039c4cc411b46a4f6dfab9e0039ce4de8879

test: change for the ab+ to rb+ default open mode This is to test the change following commit 24f99779b9. Also remove openSync tests already performed in test/ksds2.js

view details

push time in 16 days

startedpaulrberg/create-eth-app

started time in 16 days

issue commentibmruntimes/node

Illegal instruction with a cross-compiled node.js binary on a Freescale Qoriq CPU

adam@g5box ~ $ node
Welcome to Node.js v14.5.0.
Type ".help" for more information.
> .helpIllegal instruction
adam@g5box ~ $ node
Welcome to Node.js v15.3.0.
Type ".help" for more information.
> .help
.break    Sometimes you get stuck, this gets you out
.clear    Alias for .break
.editor   Enter editor mode
.exit     Exit the REPL
.help     Print this help message
.load     Load JS from a file into the REPL session
.save     Save all evaluated commands in this REPL session to a file

Press Ctrl+C to abort current expression, Ctrl+D to exit the REPL
> 

Promising so far (before vs after patch). I'll do a bit more testing - is there anything simple I should try in the interpreter?

jussikan

comment created time in 17 days

more