This is an automated email from the ASF dual-hosted git repository.

dmagda pushed a commit to branch IGNITE-7595
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/IGNITE-7595 by this push:
     new a66ea1d  Improving documentation of the compute, cluster and services 
APIs for the Java and .NET thin clients
a66ea1d is described below

commit a66ea1d8cab0a34ca62a84ff52f4231dc70dda31
Author: Denis Magda <dma...@gridgain.com>
AuthorDate: Fri Oct 2 13:21:57 2020 -0700

    Improving documentation of the compute, cluster and services APIs for the 
Java and .NET thin clients
---
 .../org/apache/ignite/snippets/JavaThinClient.java | 11 ++--
 docs/_docs/thin-clients/dotnet-thin-client.adoc    | 50 +++++++++---------
 docs/_docs/thin-clients/java-thin-client.adoc      | 60 ++++++++++------------
 3 files changed, 61 insertions(+), 60 deletions(-)

diff --git 
a/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/JavaThinClient.java
 
b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/JavaThinClient.java
index 2b60262..8cdab57 100644
--- 
a/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/JavaThinClient.java
+++ 
b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/JavaThinClient.java
@@ -383,8 +383,9 @@ public class JavaThinClient {
         ClientConfiguration clientCfg = new 
ClientConfiguration().setAddresses("127.0.0.1:10800");
         //tag::client-compute-task[]
         try (IgniteClient client = Ignition.startClient(clientCfg)) {
-            // Suppose MyTask class is already deployed to the cluster
-            client.compute().execute(MyTask.class.getName(), "argument");
+            // Suppose that the MyTask class is already deployed in the cluster
+            client.compute().execute(
+                MyTask.class.getName(), "argument");
         }
         //end::client-compute-task[]
     }
@@ -393,8 +394,10 @@ public class JavaThinClient {
         ClientConfiguration clientCfg = new 
ClientConfiguration().setAddresses("127.0.0.1:10800");
         //tag::client-services[]
         try (IgniteClient client = Ignition.startClient(clientCfg)) {
-            // Suppose implementation of MyService interface is already 
deployed to the cluster as a service with name "MyService"
-            client.services().serviceProxy("MyService", 
MyService.class).myServiceMethod();
+            // Executing the service named MyService
+            // that is already deployed in the cluster.
+            client.services().serviceProxy(
+                "MyService", MyService.class).myServiceMethod();
         }
         //end::client-services[]
     }
diff --git a/docs/_docs/thin-clients/dotnet-thin-client.adoc 
b/docs/_docs/thin-clients/dotnet-thin-client.adoc
index 1acc02c..b227e37 100644
--- a/docs/_docs/thin-clients/dotnet-thin-client.adoc
+++ b/docs/_docs/thin-clients/dotnet-thin-client.adoc
@@ -148,41 +148,47 @@ include::{sourceCodeFile}[tag=executingSql,indent=0]
 ----
 
 
-== Cluster API
+== Using Cluster API
 
-Cluster functionality (APIs for accessing cluster and nodes) is provided via 
the `IClientCluster` interface.
-You can get an instance of `IClientCluster` from `IIgniteClient` as follows:
+The cluster APIs let you create a group of cluster nodes and run various 
operations against the group. The `IClientCluster`
+interface is the entry-point to the APIs that can be used as follows:
+
+* Get or change the state of a cluster
+* Get a list of all cluster nodes
+* Create logical groups our of cluster nodes and use other Ignite APIs to 
perform certain operations on the group
+
+Use the instance of `IClientCluster` to obtain a reference to the 
`IClientCluster` that comprises all cluster nodes, and
+activate the whole cluster as well as write-ahead-logging for the `my-cache` 
cache:
 [source, csharp]
 -------------------------------------------------------------------------------
 include::{sourceCodeFile}[tag=client-cluster,indent=0]
 -------------------------------------------------------------------------------
 
-Through the `IClientCluster` interface you can:
-
-* Get or set cluster state
-* Get a list of all cluster members
-* Create logical groups of nodes
-
 === Logical nodes grouping
 
-API to create logical groups of nodes within your cluster is provided by 
`IClientClusterGroup` interface.
-Instance of this interface can be obtained from a parent `IClientClusterGroup` 
instance using node-filtering methods.
-
-The `IClientCluster` instance implements `IClientClusterGroup` and is a root 
cluster group, which includes all nodes in the cluster.
+You can use the `IClientClusterGroup` interface of the cluster APIs to create 
various groups of cluster nodes. For instance,
+one group can comprise all servers nodes, while the other group can include 
only those nodes that match a specific
+TCP/IP address format. The example below shows how to create a group of server 
nodes located in the `dc1` data center:
 
-Here is how you can use this API to get all server nodes in certain 
data-center (assuming node attribute "dc" is set to bind node and data-center):
 [source, csharp]
 -------------------------------------------------------------------------------
 include::{sourceCodeFile}[tag=client-cluster-groups,indent=0]
 -------------------------------------------------------------------------------
 
-Refer to link:distributed-computing/cluster-groups[Cluster groups] to get more 
information about logical nodes grouping.
+Note, the `IClientCluster` instance implements `IClientClusterGroup` which is 
the root cluster group that includes all
+nodes of the cluster.
 
+Refer to the main link:distributed-computing/cluster-groups[cluster groups] 
documentation page for more details on the capability.
 
-== Executing compute tasks
+== Executing Compute Tasks
 
-Thin client has basic functionality to execute compute tasks. This feature is 
disabled by default on the server side.
-Set `ThinClientConfiguration.MaxActiveComputeTasksPerConnection` to a non-zero 
value to enable:
+Presently, the Java thin client supports basic 
link:distributed-computing/distributed-computing[compute capabilities]
+by letting you execute those compute tasks that are *already deployed* in the 
cluster. You can either run a task across all
+cluster nodes or a specific 
link:thin-clients/dotnet-thin-client#logical-nodes-grouping[cluster group].
+
+By default, the execution of tasks, triggered by the thin client, is disabled 
on the cluster side. You need to set the
+`ThinClientConfiguration.MaxActiveComputeTasksPerConnection` parameter to a 
non-zero value in the configuration of your
+server nodes and thick clients:
 
 [tabs]
 --
@@ -208,17 +214,13 @@ 
include::{sourceCodeFile}[tag=client-compute-setup,indent=0]
 ----
 --
 
-Compute functionality is provided by `IComputeClient` interface, which can be 
obtained from `IIgniteClient` instance.
-
-Currently, thin clients can run already deployed tasks by class name. Task 
classes should be depoyed in advance to the server nodes.
+The example below shows how to get access to the compute APIs via the 
`IComputeClient` interface and execute the compute
+task named `org.foo.bar.AddOneTask` passing `1` as an input parameter:
 [source, java]
 -------------------------------------------------------------------------------
 include::{sourceCodeFile}[tag=client-compute-task,indent=0]
 -------------------------------------------------------------------------------
 
-See link:distributed-computing/distributed-computing[distributed computing] 
for more information about compute grid functionality.
-
-
 == Security
 
 === SSL/TLS
diff --git a/docs/_docs/thin-clients/java-thin-client.adoc 
b/docs/_docs/thin-clients/java-thin-client.adoc
index 3dde17b..af3282c 100644
--- a/docs/_docs/thin-clients/java-thin-client.adoc
+++ b/docs/_docs/thin-clients/java-thin-client.adoc
@@ -181,38 +181,44 @@ NOTE: The `getAll()` method retrieves the results from 
the cursor and closes it.
 
 Read more about using `SqlFieldsQuery` and SQL API in the 
link:SQL/sql-api[Using SQL API] section.
 
-== Cluster API
+== Using Cluster APIs
 
-Cluster functionality (APIs for accessing cluster and nodes) is provided via 
the `ClientCluster` interface. You can get an instance of `ClientCluster` from 
`IgniteClient` as follows:
+The cluster APIs let you create a group of cluster nodes and run various 
operations against the group. The `ClientCluster`
+interface is the entry-point to the APIs that can be used as follows:
+
+* Get or change the state of a cluster
+* Get a list of all cluster nodes
+* Create logical groups our of cluster nodes and use other Ignite APIs to 
perform certain operations on the group
+
+Use the instance of `IgniteClient` to obtain a reference to the 
`ClientCluster` interface:
 [source, java]
 -------------------------------------------------------------------------------
 include::{sourceCodeFile}[tag=client-cluster,indent=0]
 -------------------------------------------------------------------------------
 
-Through the `ClientCluster` interface you can:
-
-* Get or set cluster state
-* Get a list of all cluster members
-* Create logical groups of nodes
-
-=== Logical nodes grouping
-
-API to create logical groups of nodes within your cluster is provided by 
`ClientClusterGroup` interface. Instance of this interface can be obtained from 
a parent `ClientClusterGroup` instance using node-filtering methods.
+=== Logical Nodes Grouping
 
-The `ClientCluster` instance it's a root cluster nodes group, which includes 
all nodes in the cluster.
+You can use the `ClientClusterGroup` interface of the cluster APIs to create 
various groups of cluster nodes. For instance,
+one group can comprise all servers nodes, while the other group can include 
only those nodes that match a specific
+TCP/IP address format. The example below shows how to create a group of server 
nodes located in the `dc1` data center:
 
-Here is how you can use this API to get all server nodes in certain 
data-center (assuming node attribute "dc" is set to bind node and data-center):
 [source, java]
 -------------------------------------------------------------------------------
 include::{sourceCodeFile}[tag=client-cluster-groups,indent=0]
 -------------------------------------------------------------------------------
 
-Refer to link:distributed-computing/cluster-groups[Cluster groups] to get more 
information about logical nodes grouping.
+Refer to the main link:distributed-computing/cluster-groups[cluster groups] 
documentation page for more details on the capability.
 
-== Executing compute tasks
+== Executing Compute Tasks
 
-The Java thin client has basic functionality to execute compute tasks. By 
default this feature is disabled on server-side. To enable this functionality 
server-side configuration property `maxActiveComputeTasksPerConnection` should 
be set explicitly to value more than 0:
+Presently, the Java thin client supports basic 
link:distributed-computing/distributed-computing[compute capabilities]
+by letting you execute those compute tasks that are *already deployed* in the 
cluster. You can either run a task across all
+cluster nodes or a specific 
link:thin-clients/java-thin-client#logical-nodes-grouping[cluster group]. The 
deployment
+assumes that you create a JAR file with the compute tasks and add the JAR to 
the cluster nodes' classpath.
 
+By default, the execution of tasks, triggered by the thin client, is disabled 
on the cluster side. You need to set the
+`ThinClientConfiguration.maxActiveComputeTasksPerConnection` parameter to a 
non-zero value in the configuration of your
+server nodes and thick clients:
 [tabs]
 --
 tab:XML[]
@@ -237,34 +243,24 @@ 
include::{sourceCodeFile}[tag=client-compute-setup,indent=0]
 ----
 --
 
-Compute tasks execution functionality provided by `ClientCompute` interface, 
which can be obtained from `IgniteClient` instance.
-
-Currently, thin client only have an ability to run already deployed tasks by 
task name. To run some custom task users should deploy classes related to this 
task to the server manually.
+The example below shows how to get access to the compute APIs via the 
`ClientCompute` interface and execute the compute
+task named `MyTask`:
 [source, java]
 -------------------------------------------------------------------------------
 include::{sourceCodeFile}[tag=client-compute-task,indent=0]
 -------------------------------------------------------------------------------
 
-Nodes set to execute compute tasks can be limited using cluster groups and 
corresponding `IgniteClient.compute(ClientClusterGroup)` method.
-
-See link:distributed-computing/distributed-computing[distributed computing] 
for more information about compute grid functionality.
-
-== Service invocation
+== Executing Ignite Services
 
-The Java thin client is able to invoke grid-managed services. API for this 
functionality is provided by `ClientServices` interface, which can be obtained 
from `IgniteClient` instance.
+You can use the `ClientServices` APIs of the Java thin client to invoke an 
link:services/services[Ignite Service] that
+is *already deployed* in the cluster.
 
-Only already deployed to cluster services can be invoked, there is no 
functionality to deploy services by thin clients.
+The example below shows how to invoke the service named `MyService`:
 [source, java]
 -------------------------------------------------------------------------------
 include::{sourceCodeFile}[tag=client-services,indent=0]
 -------------------------------------------------------------------------------
 
-////
-*TODO: fix link*
-////
-
-See link:services/services[Services] for more information about Ignite 
services.
-
 == Handling Exceptions
 
 === Handling Node Failures

Reply via email to