All Projects → hazelcast → Hazelcast Nodejs Client

hazelcast / Hazelcast Nodejs Client

Licence: apache-2.0
Hazelcast IMDG Node.js Client

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Hazelcast Nodejs Client

Hazelcast Python Client
Hazelcast IMDG Python Client
Stars: ✭ 92 (-25.81%)
Mutual labels:  big-data, caching, in-memory, clustering, scalability, distributed, datagrid
Hazelcast Cpp Client
Hazelcast IMDG C++ Client
Stars: ✭ 67 (-45.97%)
Mutual labels:  big-data, caching, in-memory, clustering, scalability, distributed, datagrid
Hazelcast
Open-source distributed computation and storage platform
Stars: ✭ 4,662 (+3659.68%)
Mutual labels:  big-data, caching, in-memory, clustering, scalability, distributed, datagrid
hazelcast-csharp-client
Hazelcast .NET Client
Stars: ✭ 98 (-20.97%)
Mutual labels:  caching, big-data, clustering, scalability, distributed, in-memory, datagrid
Hazelcast Go Client
Hazelcast IMDG Go Client
Stars: ✭ 140 (+12.9%)
Mutual labels:  big-data, caching, in-memory, clustering, scalability, distributed, datagrid
Coherence
Oracle Coherence Community Edition
Stars: ✭ 328 (+164.52%)
Mutual labels:  caching, in-memory, clustering, scalability, distributed
insightedge
InsightEdge Core
Stars: ✭ 22 (-82.26%)
Mutual labels:  big-data, distributed, in-memory, datagrid
Olric
Distributed cache and in-memory key/value data store. It can be used both as an embedded Go library and as a language-independent service.
Stars: ✭ 2,067 (+1566.94%)
Mutual labels:  caching, in-memory, distributed
Clustering4Ever
C4E, a JVM friendly library written in Scala for both local and distributed (Spark) Clustering.
Stars: ✭ 126 (+1.61%)
Mutual labels:  big-data, clustering, scalability
dxram
A distributed in-memory key-value storage for billions of small objects.
Stars: ✭ 25 (-79.84%)
Mutual labels:  big-data, distributed, in-memory
nebula
A distributed, fast open-source graph database featuring horizontal scalability and high availability
Stars: ✭ 8,196 (+6509.68%)
Mutual labels:  big-data, scalability, distributed
Moosefs
MooseFS – Open Source, Petabyte, Fault-Tolerant, Highly Performing, Scalable Network Distributed File System (Software-Defined Storage)
Stars: ✭ 1,025 (+726.61%)
Mutual labels:  big-data, clustering, scalability
Crate
CrateDB is a distributed SQL database that makes it simple to store and analyze massive amounts of data in real-time.
Stars: ✭ 3,254 (+2524.19%)
Mutual labels:  big-data, distributed
Infinit
The Infinit policy-based software-defined storage platform.
Stars: ✭ 363 (+192.74%)
Mutual labels:  scalability, distributed
hekate
Java Library for Distributed Services
Stars: ✭ 17 (-86.29%)
Mutual labels:  scalability, distributed
Scanner
Efficient video analysis at scale
Stars: ✭ 569 (+358.87%)
Mutual labels:  big-data, distributed
H2o 3
H2O is an Open Source, Distributed, Fast & Scalable Machine Learning Platform: Deep Learning, Gradient Boosting (GBM) & XGBoost, Random Forest, Generalized Linear Modeling (GLM with Elastic Net), K-Means, PCA, Generalized Additive Models (GAM), RuleFit, Support Vector Machine (SVM), Stacked Ensembles, Automatic Machine Learning (AutoML), etc.
Stars: ✭ 5,656 (+4461.29%)
Mutual labels:  big-data, distributed
Titanoboa
Titanoboa makes complex workflows easy. It is a low-code workflow orchestration platform for JVM - distributed, highly scalable and fault tolerant.
Stars: ✭ 787 (+534.68%)
Mutual labels:  big-data, distributed
Awesome Scalability
The Patterns of Scalable, Reliable, and Performant Large-Scale Systems
Stars: ✭ 36,688 (+29487.1%)
Mutual labels:  big-data, scalability
pytorch kmeans
Implementation of the k-means algorithm in PyTorch that works for large datasets
Stars: ✭ 38 (-69.35%)
Mutual labels:  big-data, clustering

Hazelcast Node.js Client

NPM version Chat on Slack Follow on Twitter


Hazelcast is an open-source distributed in-memory data store and computation platform that provides a wide variety of distributed data structures and concurrency primitives.

Hazelcast Node.js client is a way to communicate to Hazelcast IMDG clusters and access the cluster data. The client provides a Promise-based API with a builtin support for native JavaScript objects.

Installation

Hazelcast

Hazelcast Node.js client requires a working Hazelcast IMDG cluster to run. This cluster handles the storage and manipulation of the user data.

A Hazelcast IMDG cluster consists of one or more cluster members. These members generally run on multiple virtual or physical machines and are connected to each other via the network. Any data put on the cluster is partitioned to multiple members transparent to the user. It is therefore very easy to scale the system by adding new members as the data grows. Hazelcast IMDG cluster also offers resilience. Should any hardware or software problem causes a crash to any member, the data on that member is recovered from backups and the cluster continues to operate without any downtime.

The quickest way to start a single member cluster for development purposes is to use our Docker images.

docker run -p 5701:5701 hazelcast/hazelcast:4.1.1

You can also use our ZIP or TAR distributions as described here.

Client

npm install hazelcast-client

Overview

Usage

const { Client } = require('hazelcast-client');

// Connect to Hazelcast cluster
const client = await Client.newHazelcastClient();

// Get or create the 'distributed-map' on the cluster
const map = await client.getMap('distributed-map');

// Put 'key', 'value' pair into the 'distributed-map'
await map.put('key', 'value');

// Get the value associated with the given key from the cluster
const value = await map.get('key');
console.log(value); // Outputs 'value'

// Shutdown the client
await client.shutdown();

NOTE: For the sake of brevity we are going to omit boilerplate parts in the above code snippet. Refer to the Code Samples section to see samples with the complete code.

If you are using Hazelcast IMDG and the Node.js client on the same machine, the default configuration should work out-of-the-box. However, you may need to configure the client to connect to cluster nodes that are running on different machines or to customize client properties.

Configuration

const { Client } = require('hazelcast-client');

// Initialize the client with the given configuration
const client = await Client.newHazelcastClient({
    clusterName: 'cluster-name',
    network: {
        clusterMembers: [
            '10.90.0.2:5701',
            '10.90.0.3:5701'
        ]
    },
    lifecycleListeners: [
        (state) => {
            console.log('Lifecycle Event >>> ' + state);
        }
    ]
});

console.log('Connected to cluster');
await client.shutdown();

Refer to the documentation to learn more about supported configuration options.

Features

  • Distributed, partitioned and queryable in-memory key-value store implementation, called Map
  • Eventually consistent cache implementation to store a subset of the Map data locally in the memory of the client, called Near Cache
  • Additional data structures and simple messaging constructs such as Set, MultiMap, Queue, Topic
  • Cluster-wide unique ID generator, called FlakeIdGenerator
  • Distributed, CRDT based counter, called PNCounter
  • Distributed concurrency primitives from CP Subsystem such as FencedLock, Semaphore, AtomicLong
  • Integration with Hazelcast Cloud
  • Support for serverless and traditional web service architectures with Unisocket and Smart operation modes
  • Ability to listen client lifecycle, cluster state and distributed data structure events
  • and many more.

Getting Help

You can use the following channels for your questions and development/usage issues:

Contributing

We encourage any type of contribution in the form of issue reports or pull requests.

Issue Reports

For issue reports, please share the following information with us to quickly resolve the problems.

  • Hazelcast IMDG and the client version that you use
  • General information about the environment and the architecture you use like Node.js version, cluster size, number of clients, Java version, JVM parameters, operating system etc.
  • Logs and stack traces, if any.
  • Detailed description of the steps to reproduce the issue.

Pull Requests

Contributions are submitted, reviewed and accepted using the pull requests on GitHub. For an enhancement or larger feature, create a GitHub issue first to discuss.

Development

  1. Clone the GitHub repository.
  2. Run npm install to automatically download and install all the required modules.
  3. Do the work.
  4. Hazelcast Node.js client developed using TypeScript. Run npm run compile to compile TypeScript files to JavaScript.
  5. To have a consistent code style across the code base, Hazelcast Node.js client uses a style checker. Run npm run lint and fix the reported issues, if any.

Testing

In order to test Hazelcast Node.js client locally, you will need the following:

  • Java 8 or newer
  • Maven

Following command starts the tests:

npm test

Test script automatically downloads hazelcast-remote-controller and Hazelcast IMDG. The script uses Maven to download those.

In order to run specific tests, you can give a pattern to the test command like the following:

npm test pattern

This command will only run the tests matching the pattern. The pattern can be a string or regex in the same form grep command accepts.

License

Apache 2.0 License.

Copyright

Copyright (c) 2008-2021, Hazelcast, Inc. All Rights Reserved.

Visit www.hazelcast.com for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].