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

add configuration overview chapter documentation #342

Merged

Conversation

furkansenharputlu
Copy link
Contributor

This PR adds documentation for Configuration Overview chapter in the issue #340.

@furkansenharputlu
Copy link
Contributor Author

verify

Copy link
Member

@Serdaro Serdaro left a comment

Choose a reason for hiding this comment

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

Reviewed.

README.md Outdated

### 1.1. Programmatic Configuration

For programmatic configuration of the Hazelcast Java Client, just instantiate a ClientConfig object and configure the
Copy link
Member

Choose a reason for hiding this comment

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

...of the Hazelcast Node.js Client, just instantiate a ClientConfig object and...

README.md Outdated
return HazelcastClient.newHazelcastClient(cfg);
```

Refer to [Hazelcast Node.js Client API Docs](http://hazelcast.github.io/hazelcast-nodejs-client/api/current/docs) for details.
Copy link
Contributor

Choose a reason for hiding this comment

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

"Refer to Config class documentation at .... for details" may be better.

README.md Outdated

### 1.1. Programmatic Configuration

For programmatic configuration of the Hazelcast Java Client, just instantiate a `ClientConfig` object and configure the
Copy link
Contributor

Choose a reason for hiding this comment

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

Hazelcast Java Client typo

@@ -97,11 +103,154 @@ Please see Hazelcast Node.js [code samples](https://github.com/hazelcast/hazelca

You can also refer to Hazelcast Node.js [API Documentation](http://hazelcast.github.io/hazelcast-nodejs-client/api/current/docs/).

# Configuration
# Configuration Overview
Copy link
Contributor

Choose a reason for hiding this comment

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

Empty titles are not good to have. I think we can get rid of Configuration Options title and tell what it says there just under this title

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a description here so the title is not empty.

Copy link
Member

@Serdaro Serdaro left a comment

Choose a reason for hiding this comment

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

Reviewed.

README.md Outdated
# Configuration
# Configuration Overview

## 1. Configuration Options
Copy link
Member

Choose a reason for hiding this comment

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

Let's remove the Configuration Options subtitle.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But, what should be the indexes of subsections 1.1. Programmatic Configuration and 1.2. Declarative Configuration (JSON)? Configuration Options makes them meaningful. Like 1.x.

README.md Outdated

### 1.1. Programmatic Configuration

For programmatic configuration of the Hazelcast Java Client, just instantiate a `ClientConfig` object and configure the
Copy link
Member

Choose a reason for hiding this comment

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

...of the Hazelcast Node.js client, just instantiate...

README.md Outdated

### 1.2. Declarative Configuration (JSON)

For declarative configuration, the Hazelcast client looks at the following places for the client configuration file.
Copy link
Member

Choose a reason for hiding this comment

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

For declarative configuration, the client checks the following places for the JSON configuration file, in the given order:

the client looks for the configuration file in the specified location.
2. Current working directory: If there is no environment variable set, the client tries to load `hazelcast-client.json`
from the current working directory.
3. Default configuration: If all of the above methods fail, the client starts with the default configuration.
Copy link
Member

Choose a reason for hiding this comment

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

Can we give the location/whereabout of the default JSON configuration file? Where can I find this default file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There isn't any default file. Default configuration is programmatic. If user wants to override, he needs to create hazelcast-client.json.

Copy link
Member

Choose a reason for hiding this comment

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

Can we put this above explanation of yours about the default configuration? -> Please add an explanatory content/sentence to the number 3 above. It may include the fact that default configuration is programmatic for which I assume the ClientConfig object has some default properties (which can be given here too), and the fact that if the default configuration does not meet the user's requirements, he/she should create a hazelcast-client.json file which should reside in the current working directory.

"connectionAttemptLimit": 3
}
}
```
Copy link
Member

Choose a reason for hiding this comment

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

Please provide a cross-reference like relational text here. Something like:

"In the following chapters you will learn the description of all elements included in a JSON configuration file used to configure Hazelcast Node.js client."

README.md Outdated

## 2. Importing Multiple Configurations

You can compose the declarative configuration of your Hazelcast client from multiple declarative
Copy link
Member

Choose a reason for hiding this comment

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

..of your Node.js client...

README.md Outdated
}
```

To get your example Hazelcast declarative configuration out of the above two, use the `import` element as
Copy link
Member

Choose a reason for hiding this comment

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

...example client configuration out of the above...

@furkansenharputlu furkansenharputlu force-pushed the confOverviewDoc branch 3 times, most recently from d1bf11d to de5d092 Compare September 7, 2018 14:15
Copy link
Member

@Serdaro Serdaro left a comment

Choose a reason for hiding this comment

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

More reviews.

the client looks for the configuration file in the specified location.
2. Current working directory: If there is no environment variable set, the client tries to load `hazelcast-client.json`
from the current working directory.
3. Default configuration: If all of the above methods fail, the client starts with the default configuration.
Copy link
Member

Choose a reason for hiding this comment

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

Can we put this above explanation of yours about the default configuration? -> Please add an explanatory content/sentence to the number 3 above. It may include the fact that default configuration is programmatic for which I assume the ClientConfig object has some default properties (which can be given here too), and the fact that if the default configuration does not meet the user's requirements, he/she should create a hazelcast-client.json file which should reside in the current working directory.

README.md Outdated

### 1.2. Declarative Configuration (JSON)

For declarative configuration, the client looks at the following places for the client configuration file.
Copy link
Contributor

Choose a reason for hiding this comment

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

If the client is not supplied with a programmatic configuration at the time of initialization, it will look for a configuration file named hazelcast-client.json. If this file exists, then the configuration is loaded from it. Otherwise, the client will start with the default configuration. The following are the places that the client looks for a hazelcast-client.json in order:


In the following chapters you will learn the description of all elements included in a JSON configuration file used to configure Hazelcast Node.js client.

## 2. Importing Multiple Configurations
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we sure that this section is an Guide to using the Node.js Client with Hazelcast section? It feels a bit unneccessary for someone trying to get started with Node.js client. If we are going to keep CONFIG.md in the end, this should be only there I think. @Serdaro

Copy link
Member

Choose a reason for hiding this comment

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

@mustafaiman , What I think is: since this "composing a configuration" is a Hazelcast feature, it would look nice to mention it with examples (as it is now) here, so that the user can learn how the importing mechanism works when a Node.js client is being configured. And since I think we agreed on moving the CONFIG.md content to the main README, there is no harm keeping this here.

Copy link
Contributor

Choose a reason for hiding this comment

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

sure 👍

Copy link
Member

@Serdaro Serdaro left a comment

Choose a reason for hiding this comment

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

👍

@furkansenharputlu furkansenharputlu merged commit e81aa55 into hazelcast:master Sep 20, 2018
@furkansenharputlu furkansenharputlu moved this from In progress to Done in 0.10 Oct 1, 2018
harunalpak pushed a commit to harunalpak/hazelcast-nodejs-client that referenced this pull request Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
0.10
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants