[ 
https://issues.apache.org/jira/browse/GEODE-8593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17215634#comment-17215634
 ] 

ASF GitHub Bot commented on GEODE-8593:
---------------------------------------

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:
us...@infra.apache.org


> Update native client examples to use Builder pattern
> ----------------------------------------------------
>
>                 Key: GEODE-8593
>                 URL: https://issues.apache.org/jira/browse/GEODE-8593
>             Project: Geode
>          Issue Type: Improvement
>          Components: docs, native client
>    Affects Versions: 1.13.0
>            Reporter: Dave Barnes
>            Priority: Major
>              Labels: pull-request-available
>
> For both C++ and .NET examples, the section of code that creates the 
> connection pool should be improved to better illustrate the Builder pattern. 
> For example, in the C++ examples, current code is:
> ```
>   auto cacheFactory = CacheFactory();
>   cacheFactory.set("log-level", "none");
>   auto cache = cacheFactory.create();
>   auto poolFactory = cache.getPoolManager().createFactory();
>  
>   poolFactory.addLocator("localhost", 10334);
>   auto pool = poolFactory.create("pool");
> ```
> The improved version would be:
> ```
> auto cache = CacheFactory()
>                    .set("log-level", "debug")
>                    .set("ssl-enabled", "true")
>                    .set("ssl-truststore", clientTruststore.string())
>                    .create();
>   cache.getPoolManager()
>       .createFactory()
>       .addLocator("localhost", 10334)
>       .create("pool");
> ```
> Similarly for .NET examples.
> These doc snippets also appear in the user guides, so they'll need updating 
> in the docs, as well.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to