Skip to content
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

Issue 354: Nodejs StreamManager #355

Conversation

thekingofcity
Copy link
Collaborator

@thekingofcity thekingofcity commented Mar 4, 2022

Signed-off-by: thekingofcity 3353040+thekingofcity@users.noreply.github.com

Change log description
Add StreamManager support to Nodejs bindings.

Purpose of the change
Fixes #354

What the code does
Use neon-bindings to wrap the rust client.

How to verify it

  1. npm i
  2. npm run build-debug
  3. node --loader ts-node/esm tests/stream_manager.ts should pass in a clean Pravega standalone deployment.

Signed-off-by: thekingofcity <3353040+thekingofcity@users.noreply.github.com>
@thekingofcity
Copy link
Collaborator Author

thekingofcity commented Mar 4, 2022

If this is merged, the Supported APIs may be updated to this.

API details Java RUST Python 3.6, 3.7, 3.8, 3.9 NodeJs
EventWriter X X X -
EventReader X X X[1] -
ReaderGroup X X X -
TxnWriter X X X -
Transaction X X X -
ByteStreamWriter X X X -
ByteStreamReader X X X -
StateSynchronizer X - - -
TableSynchronizer - X - -
KeyValueTable X X - -
StreamManager#create_scope X X X X[3]
StreamManager#delete_scope X X X X[3]
StreamManager#list_scopes X X - X[3]
StreamManager#create_stream X X X X[3]
StreamManager#update_stream X X X X[3]
StreamManager#get_stream_tags X[2] X[2] X[2] X[2][3]
StreamManager#seal_stream X X X X[3]
StreamManager#delete_stream X X X X[3]
StreamManager#list_streams X X - X[3]
  1. StreamReader provides an Async Python binding. It requires at least Python 3.6+.
  2. This requires PRAVEGA 0.10.x, enabled as part of PR Issue 280: Enable Stream tags for Python bindings. #281
  3. Local npm and cargo build is required via npm run build-debug or npm run install.

@@ -0,0 +1,460 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to check in the package lock? Or would it be better for this to be excluded and autogenerated?

Copy link
Collaborator Author

@thekingofcity thekingofcity Mar 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package-lock.json should be committed and is suggested by the npm official doc.

https://docs.npmjs.com/cli/v8/configuring-npm/package-lock-json

This file is intended to be committed into source repositories, and serves various purposes:

npm ci will use the versions in package-lock.json and produces a deterministic build.

This may change if we release platform-specific builds as different platforms need different packages versions.

nodejs/src/stream_manager.rs Outdated Show resolved Hide resolved
Signed-off-by: thekingofcity <3353040+thekingofcity@users.noreply.github.com>
Signed-off-by: thekingofcity <3353040+thekingofcity@users.noreply.github.com>
nodejs/tsconfig.json Outdated Show resolved Hide resolved
nodejs/.prettierrc Outdated Show resolved Hide resolved
nodejs/src/lib.rs Outdated Show resolved Hide resolved
Signed-off-by: thekingofcity <3353040+thekingofcity@users.noreply.github.com>
Signed-off-by: thekingofcity <3353040+thekingofcity@users.noreply.github.com>
nodejs/Cargo.toml Show resolved Hide resolved
nodejs/src/stream_manager.rs Show resolved Hide resolved
@tkaitchuck tkaitchuck closed this May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nodejs StreamManager
3 participants