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
add usages of data structures to documentation #378
add usages of data structures to documentation #378
Conversation
verify |
Are there any notes/exceptional situations/gotchas/important-to-knows for these data structures' usages in the Node.js client? |
@Serdaro I think there is no exception. @mustafaiman Wdyt ? |
@Serdaro @furkansenharputlu I dont think there is any difference worth mentioning. I only have one suggestion: Add one sentence on top of each structure to explain what they are. You can take these from Hazelcast Reference Manual. For instance flake id can be explained like this: |
cfa2cb2
to
c852a99
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few comments. Will be enhanced this weekend.
README.md
Outdated
|
||
## 7.4.9 Using Lock | ||
|
||
Hazelcast Lock(`ILock`) is a distributed lock implementation. You can synchronize hazelcast members and clients using a Lock. For details refer to [Lock section](https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#lock) in the Hazelcast IMDG Reference Manual. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... Hazelcast members ...
README.md
Outdated
|
||
Hazelcast `PNCounter` (Positive-Negative Counter) is a distributed counter implementation where each Hazelcast instance can increment and decrement the counter value and these updates are propagated to all replicas. For details refer to [PN Counter section](https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#pn-counter) in the Hazelcast IMDG Reference Manual. | ||
|
||
A CRDT Counter usage example is shown below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A PN Counter usage ...
c852a99
to
29b1267
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general when you say "For details refer to [Semaphore section]", it gives the impression that there is a Semaphore section in this document. I'd say "For details refer to [Hazelcast Reference Manual#Semaphore]"
README.md
Outdated
@@ -1493,6 +1504,8 @@ map.put(1, 'Furkan').then(function (oldValue) { | |||
|
|||
### 7.4.2. Using MultiMap | |||
|
|||
Hazelcast `MultiMap` is a specialized map where you can store multiple values under a single key. Just like any other distributed data structure implementation in Hazelcast, MultiMap is distributed. For details refer to [MultiMap section](https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#multimap) in the Hazelcast IMDG Reference Manual. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not every data structure is distributed in Hazelcast.
README.md
Outdated
@@ -1525,6 +1540,8 @@ replicatedMap.put(1, 'Furkan').then(function () { | |||
|
|||
### 7.4.4. Using Queue | |||
|
|||
Hazelcast Queue(`IQueue`) is a distributed queue which enables all cluster members to interact with it. Using Hazelcast distributed queue, you can add an item in one cluster member and remove it from another one. For details refer to [Queue section](https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#queue) in the Hazelcast IMDG Reference Manual. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second sentence is redundant I think
README.md
Outdated
var list; | ||
hazelcastClient.getList('myList').then(function (l) { | ||
list = l; | ||
return list.add('Mali'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is Mali
a name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is an abbreviation like Tomas-> Tom :)
But I will change it.
README.md
Outdated
|
||
## 7.4.8. Using Reliable Topic | ||
|
||
Hazelcast `ReliableTopic` is backed up by the `Ringbuffer` data structure. For details refer to [Reliable Topic section](https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#reliable-topic) in the Hazelcast IMDG Reference Manual. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hazelcast `ReliableTopic` is backed up by the `Ringbuffer` data structure. For details refer to [Reliable Topic section](https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#reliable-topic) in the Hazelcast IMDG Reference Manual. | |
Hazelcast `ReliableTopic` is a distributed topic implementation backed up by the `Ringbuffer` data structure. For details refer to [Reliable Topic section](https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#reliable-topic) in the Hazelcast IMDG Reference Manual. |
README.md
Outdated
|
||
## 7.4.9 Using Lock | ||
|
||
Hazelcast Lock(`ILock`) is a distributed lock implementation. You can synchronize Hazelcast Members and clients using a Lock. For details refer to [Lock section](https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#lock) in the Hazelcast IMDG Reference Manual. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Members
-> members
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Serdaro requested that change. as Hazelcast Members
README.md
Outdated
lock = l; | ||
return lock.lock(); | ||
}).then(function () { | ||
// critical section |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe the intention would be more understandable if we put cluster wide critical section
instead of critical section
README.md
Outdated
|
||
## 7.4.12 Using PN Counter | ||
|
||
Hazelcast `PNCounter` (Positive-Negative Counter) is a distributed counter implementation where each Hazelcast instance can increment and decrement the counter value and these updates are propagated to all replicas. For details refer to [PN Counter section](https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#pn-counter) in the Hazelcast IMDG Reference Manual. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hazelcast `PNCounter` (Positive-Negative Counter) is a distributed counter implementation where each Hazelcast instance can increment and decrement the counter value and these updates are propagated to all replicas. For details refer to [PN Counter section](https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#pn-counter) in the Hazelcast IMDG Reference Manual. | |
Hazelcast `PNCounter` (Positive-Negative Counter) is a CRDT positive-negative counter implementation. It is an eventually consistent counter given there is no member failure. For details refer to [PN Counter section](https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#pn-counter) in the Hazelcast IMDG Reference Manual. |
README.md
Outdated
|
||
## 7.4.13 Using Flake ID Generator | ||
|
||
Hazelcast `FlakeIdGenerator` is used to generate cluster-wide unique identifiers. Generated identifiers are long primitive values and are k-ordered (roughly ordered). IDs are in the range from 0 to Long.MAX_VALUE. For details refer to [FlakeIdGenerator section](https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#flakeidgenerator) in the Hazelcast IMDG Reference Manual. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Long.MAX_VALUE
is a Java constant. I'd say 2^63-1 (maximum signed long value)
ae1d7e2
to
0923f4e
Compare
0923f4e
to
ef47d2a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
verify |
2 similar comments
verify |
verify |
* add usages of data structures to documentation * add brief explanations and give links to reference manual
This PR adds the usages of remaining data structures. #340