Giter VIP home page Giter VIP logo

js-client's Introduction

Infinispan

Version License Project Chat

Infinispan, In-Memory Distributed Data Store

Infinispan is an open-source in-memory data grid that offers flexible deployment options and robust capabilities for storing, managing, and processing data.

Infinispan provides a key/value data store that can hold all types of data, from Java objects to plain text.

Infinispan distributes your data across elastically scalable clusters to guarantee high availability and fault tolerance, whether you use Infinispan as a volatile cache or a persistent data store.

Getting Started

Contributing

For contributing guidelines please refer to this document. All contributions are subject to Developer Certificate of Origin (DCO).

The Infinispan project team

js-client's People

Contributors

andyuk1986 avatar bethgriggs avatar crumby avatar davidkhala avatar dependabot[bot] avatar domiborges avatar fabriziosta avatar galderz avatar gustavolira avatar helio-frota avatar karesti avatar lance avatar lholmquist avatar neerajgartia21 avatar oranod avatar pruivo avatar rigazilla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

js-client's Issues

Implement Hotrod query operation without projection

Reference in the Hotrod implementation is here
Query request and response proto definition are here

Query without projection: i.e. `from sample_bank_account.User u where u.name = "John"
How to unroll the QueryResponse object. Some c# code as reference is here

Let's leave the query with projection, i.e. select u.name, u.surname, u.age from sample_bank_account.User u where u.age is null to a different issue

Implement PING v3.0 operation

Client now support 2.9 hotrod protocol.

Task
Implement PING operation v3.0 so client can work with hotrod 3.0 protocol

migrate off of request module

Request has been formally deprecated - https://www.npmjs.com/package/request

It's only used for tests in this module so is not urgent. But, it could be a potential good first issue to move off of it.

I'd probably recommend node-fetch as an alternative. But axios and got are also good options (though have more dependencies, and axios has not yet reached v1.0.0).

Extend protostream enc/decoder to basic types

Current protostream implementation only decodes user message, but protrostream has dedicated fields for basic types.
Each supported basic type has its own tag and accessor and needs to be managed correctly.
an example of code handling "basic types" vs "user message" in C# is here (this is improperly provided as part of the query feature)
An equivalent implementation is needed for the enc/decoderProtobuf

wrong protobuff path

When I run import infinispan from 'infinispan'; with version 0.11.0

It has a critical error

Exception during run: Error: ENOENT: no such file or directory, open 'C:\Users\david\Documents\GitHub\node-databases\redhat\infinispan\node_modules\infinispan\lib\protostream\Protos\message-wrapping.proto'
    at Object.openSync (node:fs:581:18)
    at Object.readFileSync (node:fs:457:35)
    at fetch (C:\Users\david\Documents\GitHub\node-databases\redhat\infinispan\node_modules\protobufjs\src\root.js:173:34)
    at process (C:\Users\david\Documents\GitHub\node-databases\redhat\infinispan\node_modules\protobufjs\src\root.js:133:29)
    at fetch (C:\Users\david\Documents\GitHub\node-databases\redhat\infinispan\node_modules\protobufjs\src\root.js:179:13)
    at Root.load (C:\Users\david\Documents\GitHub\node-databases\redhat\infinispan\node_modules\protobufjs\src\root.js:207:13)
    at Root.loadSync (C:\Users\david\Documents\GitHub\node-databases\redhat\infinispan\node_modules\protobufjs\src\root.js:248:17)
    at Object.loadSync (C:\Users\david\Documents\GitHub\node-databases\redhat\infinispan\node_modules\protobufjs\src\index-light.js:69:17)
    at C:\Users\david\Documents\GitHub\node-databases\redhat\infinispan\node_modules\infinispan\lib\codec.js:489:23
    at Object.<anonymous> (C:\Users\david\Documents\GitHub\node-databases\redhat\infinispan\node_modules\infinispan\lib\codec.js:498:4)
    at Object.<anonymous> (C:\Users\david\Documents\GitHub\node-databases\redhat\infinispan\node_modules\infinispan\lib\codec.js:500:3)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (C:\Users\david\Documents\GitHub\node-databases\redhat\infinispan\node_modules\infinispan\lib\infinispan.js:14:15)
    at Object.<anonymous> (C:\Users\david\Documents\GitHub\node-databases\redhat\infinispan\node_modules\infinispan\lib\infinispan.js:960:3)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (C:\Users\david\Documents\GitHub\node-databases\redhat\infinispan\node_modules\infinispan\index.js:1:18)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at cjsLoader (node:internal/modules/esm/translators:345:17)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:294:7)
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
    at async importModuleDynamicallyWrapper (node:internal/vm/module:431:15)
    at async formattedImport (C:\Users\david\Documents\GitHub\node-databases\redhat\infinispan\node_modules\mocha\lib\nodejs\esm-utils.js:9:14)
    at async exports.requireOrImport (C:\Users\david\Documents\GitHub\node-databases\redhat\infinispan\node_modules\mocha\lib\nodejs\esm-utils.js:42:28)
    at async exports.loadFilesAsync (C:\Users\david\Documents\GitHub\node-databases\redhat\infinispan\node_modules\mocha\lib\nodejs\esm-utils.js:100:20)
    at async singleRun (C:\Users\david\Documents\GitHub\node-databases\redhat\infinispan\node_modules\mocha\lib\cli\run-helpers.js:125:3)
    at async exports.handler (C:\Users\david\Documents\GitHub\node-databases\redhat\infinispan\node_modules\mocha\lib\cli\run.js:370:5) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: 'C:\\Users\\david\\Documents\\GitHub\\node-databases\\redhat\\infinispan\\node_modules\\infinispan\\lib\\protostream\\Protos\\message-wrapping.proto'
}

Add a MediaType for `application/x-protostream`

Protostream is a Protobuf based serialization library, is used by Infinispan to serialize cache entries preserving their type.

Protostream message is defined here link

Client should support protobuf encode/decode for mediatype application/x-protostream.
MediaType initialization seems to be here link

Protostream encoder/decoder should be added here link

I've found an example of js protobuf usage here link based on protobufjs, but maybe better examples are available...

Typescript adaptor

A Typescript adaptation layer should be provide so to ease Infinispan-based Typescript applications dev

Replace heapdump dependency with NodeJs internal heap dump functionality

It is not possible to build (run 'npm install') for js-client on RHEL9 or Fedora 35 with Node.JS version v16.14.0, because of heapdump dependency. Getting the folling error:

npm ERR! code 1
npm ERR! path /home/amanukya/IdeaProjects/js-client/node_modules/heapdump
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/home/amanukya/IdeaProjects/js-client/node_modules/heapdump/build'
npm ERR!   CXX(target) Release/obj.target/addon/src/heapdump.o
npm ERR! make: Leaving directory '/home/amanukya/IdeaProjects/js-client/node_modules/heapdump/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info find Python using Python version 3.10.2 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/amanukya/IdeaProjects/js-client/node_modules/heapdump/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/amanukya/.cache/node-gyp/16.14.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/amanukya/.cache/node-gyp/16.14.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/amanukya/.cache/node-gyp/16.14.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/amanukya/IdeaProjects/js-client/node_modules/heapdump',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! make: g++: No such file or directory
npm ERR! make: *** [addon.target.mk:111: Release/obj.target/addon/src/heapdump.o] Error 127
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Linux 5.16.12-200.fc35.x86_64
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/amanukya/IdeaProjects/js-client/node_modules/heapdump
npm ERR! gyp ERR! node -v v16.14.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok

I want to suggest to remove the heapdump dependency (it is used for testing purposes for dumping heap and is not used regularly) and replace it with heap dump functionality that NodeJs new version has in it's Core API.

Missing License file

It looks like there is no license file. Can we get a license file so that I can use it in the product (JDG)?

Implement query with projection

Implement query with projection: i.e. select u.name, u.surname, u.age from sample_bank_account.User u where u.age is null.

Depends from #86

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.