You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/10/14 21:06:13 UTC

[GitHub] [geode-native] davebarnes97 opened a new pull request #675: GEODE-8593: Update geode-native examples to use builder pattern: C++

davebarnes97 opened a new pull request #675:
URL: https://github.com/apache/geode-native/pull/675


   Modified examples and the docs that refer to them to show pool creation using the builder pattern.
   Reduced the Using Connection Pools section by about half to its Configuration-related material (removed load-balancing).
   Improved format of the example README files.
   Built and ran all examples under MacOS (did not test under Windows).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode-native] davebarnes97 merged pull request #675: GEODE-8593: Update geode-native examples to use builder pattern: C++

Posted by GitBox <gi...@apache.org>.
davebarnes97 merged pull request #675:
URL: https://github.com/apache/geode-native/pull/675


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode-native] davebarnes97 commented on a change in pull request #675: GEODE-8593: Update geode-native examples to use builder pattern: C++

Posted by GitBox <gi...@apache.org>.
davebarnes97 commented on a change in pull request #675:
URL: https://github.com/apache/geode-native/pull/675#discussion_r506703285



##########
File path: docs/geode-native-docs-cpp/getting-started/getting-started-nc-client.html.md.erb
##########
@@ -37,36 +37,37 @@ To connect to a server, your application must follow these steps:
 1. Instantiate a `CacheFactory`, setting characteristics of interest (for example, `log-level`).
 1. Create a cache and use it to instantiate a `PoolFactory`, specifying the hostname and port for the server locator.
 1. Create a named pool of network connections.
-1. Instantiate a region of the desired type (usually CACHING_PROXY or PROXY) and connect it by name to its counterpart on the server.
+1. Instantiate a region of the desired type (usually PROXY, sometimes CACHING_PROXY) and connect it by name to its counterpart on the server.
 
 Once the connection pool and the shared region are in place, your client application is ready to share data with the server.
 
 **Server Connection: C++ Example**
 
-This example of connecting to the server is taken from the C++ `put-get-remove` example.
-
-Instantiate a `CacheFactory` and set its characteristics:
+Create a cache and use it to instantiate a `CacheFactory` and set its characteristics:
 
 ``` cpp
-  auto cacheFactory = CacheFactory();             // instantiate cache factory
-  cacheFactory.set("log-level", "none");          // set cache log-level characteristics
+auto cache = CacheFactory()
+    .set("log-level", "debug")
+    .set("ssl-enabled", "true")
+    .set("ssl-truststore", clientTruststore.string())
+    .create();
 ```
 
-Create a cache and use it to instantiate a `PoolFactory`:
+Create a pool of network connections, and instantiate a region of the desired type:

Review comment:
       Good catch - thanks!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode-native] pdxcodemonkey commented on a change in pull request #675: GEODE-8593: Update geode-native examples to use builder pattern: C++

Posted by GitBox <gi...@apache.org>.
pdxcodemonkey commented on a change in pull request #675:
URL: https://github.com/apache/geode-native/pull/675#discussion_r506695830



##########
File path: docs/geode-native-docs-cpp/getting-started/getting-started-nc-client.html.md.erb
##########
@@ -37,36 +37,37 @@ To connect to a server, your application must follow these steps:
 1. Instantiate a `CacheFactory`, setting characteristics of interest (for example, `log-level`).
 1. Create a cache and use it to instantiate a `PoolFactory`, specifying the hostname and port for the server locator.
 1. Create a named pool of network connections.
-1. Instantiate a region of the desired type (usually CACHING_PROXY or PROXY) and connect it by name to its counterpart on the server.
+1. Instantiate a region of the desired type (usually PROXY, sometimes CACHING_PROXY) and connect it by name to its counterpart on the server.
 
 Once the connection pool and the shared region are in place, your client application is ready to share data with the server.
 
 **Server Connection: C++ Example**
 
-This example of connecting to the server is taken from the C++ `put-get-remove` example.
-
-Instantiate a `CacheFactory` and set its characteristics:
+Create a cache and use it to instantiate a `CacheFactory` and set its characteristics:
 
 ``` cpp
-  auto cacheFactory = CacheFactory();             // instantiate cache factory
-  cacheFactory.set("log-level", "none");          // set cache log-level characteristics
+auto cache = CacheFactory()
+    .set("log-level", "debug")
+    .set("ssl-enabled", "true")
+    .set("ssl-truststore", clientTruststore.string())
+    .create();
 ```
 
-Create a cache and use it to instantiate a `PoolFactory`:
+Create a pool of network connections, and instantiate a region of the desired type:

Review comment:
       This should probably just read "Create a pool of network connections".  The next block is the one that instantiates the region.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org