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

Updates infinispan client intelligence section #37068

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions docs/src/main/asciidoc/infinispan-client-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -95,29 +95,43 @@

quarkus.infinispan-client.username=admin <2>
quarkus.infinispan-client.password=password <3>

quarkus.infinispan-client.client-intelligence=BASIC <4>
----
<1> Sets Infinispan Server address list, separated with commas
<2> Sets the authentication username
<3> Sets the authentication password
<4> Sets the client intelligence. Use BASIC as a workaround if using Docker for Mac.

Alternatively, you can use uri connection by providing a single connection property

Check warning on line 103 in docs/src/main/asciidoc/infinispan-client-reference.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Spelling] Use correct American English spelling. Did you really mean 'uri'? Raw Output: {"message": "[Quarkus.Spelling] Use correct American English spelling. Did you really mean 'uri'?", "location": {"path": "docs/src/main/asciidoc/infinispan-client-reference.adoc", "range": {"start": {"line": 103, "column": 28}}}, "severity": "WARNING"}
[source,properties]
----
quarkus.infinispan-client.uri=hotrod://admin:password@localhost:11222 <1>
quarkus.infinispan-client.client-intelligence=BASIC <2>
----
<1> Sets Infinispan URI connection. The following properties will be ignored: hosts, username and password.
<2> Sets the client intelligence. Use BASIC as a workaround if using Docker for Mac

[TIP]
====
Use Infinispan Dev Services to run a server and connect without configuration.
====

=== Client intelligence
Infinispan client uses intelligence mechanisms to efficiently send requests to Infinispan Server clusters.
By default, the *HASH_DISTRIBUTION_AWARE* intelligence mechanism is enabled.
However, locally with Docker for Mac, you might experience connectivity issues.
In this case, configure the client intelligence to *BASIC*.

Learn more in the https://infinispan.org/docs/stable/titles/hotrod_java/hotrod_java.html#hotrod-client-intelligence_hotrod-java-client[Infinispan documentation].

[source,properties]
----
quarkus.infinispan-client.client-intelligence=BASIC <1>
----
<1> Docker for Mac workaround.

[IMPORTANT]
====
Don't use *BASIC* in production environments by default, performance might be impacted.
====

=== Configuring backup clusters in Cross-Site Replication

Check warning on line 134 in docs/src/main/asciidoc/infinispan-client-reference.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Headings] Use sentence-style capitalization in 'Configuring backup clusters in Cross-Site Replication'. Raw Output: {"message": "[Quarkus.Headings] Use sentence-style capitalization in 'Configuring backup clusters in Cross-Site Replication'.", "location": {"path": "docs/src/main/asciidoc/infinispan-client-reference.adoc", "range": {"start": {"line": 134, "column": 5}}}, "severity": "INFO"}
In High Availability production deployments, it is common to have multiple Infinispan Clusters that are
distributed across various Data Centers worldwide. Infinispan offers the capability to connect these clusters and
configure backups between them. This enables seamless switching between clusters through both automated and manual
Expand Down
12 changes: 10 additions & 2 deletions docs/src/main/asciidoc/infinispan-client.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -305,17 +305,25 @@
%prod.quarkus.infinispan-client.username=admin <2>
%prod.quarkus.infinispan-client.password=password <3>

## Docker 4 Mac workaround
%prod.quarkus.infinispan-client.client-intelligence=BASIC <4>
## Docker 4 Mac workaround. Uncomment only if you are using Docker for Mac.
## Read more about it in the Infinispan Reference Guide
# %prod.quarkus.infinispan-client.client-intelligence=BASIC <4>
----
<1> Sets Infinispan Server address list, separated with commas
<2> Sets the authentication username
<3> Sets the authentication password
<4> Sets the client intelligence. Use BASIC as a workaround if using Docker for Mac.

Check warning on line 315 in docs/src/main/asciidoc/infinispan-client.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using 'because' or 'while' rather than 'as'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using 'because' or 'while' rather than 'as'.", "location": {"path": "docs/src/main/asciidoc/infinispan-client.adoc", "range": {"start": {"line": 315, "column": 45}}}, "severity": "INFO"}

Check warning on line 315 in docs/src/main/asciidoc/infinispan-client.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using 'by using' or 'that uses' rather than 'using'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using 'by using' or 'that uses' rather than 'using'.", "location": {"path": "docs/src/main/asciidoc/infinispan-client.adoc", "range": {"start": {"line": 315, "column": 63}}}, "severity": "INFO"}

[IMPORTANT]
====
Client intelligence changes impact your performance in production.
Don't change the client intelligence unless strictly necessary for your case.
Read more in the xref:infinispan-client-reference.adoc[Infinispan Client extension reference guide].
====

== Packaging and running in JVM mode

You can run the application as a conventional jar file.

Check warning on line 326 in docs/src/main/asciidoc/infinispan-client.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using 'because' or 'while' rather than 'as'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using 'because' or 'while' rather than 'as'.", "location": {"path": "docs/src/main/asciidoc/infinispan-client.adoc", "range": {"start": {"line": 326, "column": 29}}}, "severity": "INFO"}

Check warning on line 326 in docs/src/main/asciidoc/infinispan-client.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.CaseSensitiveTerms] Use 'JAR file' rather than 'jar file'. Raw Output: {"message": "[Quarkus.CaseSensitiveTerms] Use 'JAR file' rather than 'jar file'.", "location": {"path": "docs/src/main/asciidoc/infinispan-client.adoc", "range": {"start": {"line": 326, "column": 47}}}, "severity": "INFO"}

First, we will need to package it:

Expand Down