Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ limitations under the License.
<li class="has_submenu">
<a href="/docs/geode-native/<%=vars.product_version_nodot%>/getting-started/getting-started-nc-client.html">Getting Started with the Native Library</a>
<ul>
<li>
<a href="/docs/geode-native/<%=vars.product_version_nodot%>/getting-started/getting-started-nc-client.html#set_up_dev_environment">Set Up Your Development Environment</a>
</li>
<li>
<a href="/docs/geode-native/<%=vars.product_version_nodot%>/getting-started/getting-started-nc-client.html#establish_cluster_access">Establish Access to a <%=vars.product_name%> Cluster</a>
</li>
Expand Down
5 changes: 3 additions & 2 deletions docs/geode-native-docs/configuring/configuration.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ Setting a property programmatically:

``` cpp
auto regionFactory = cache.createRegionFactory(RegionShortcut::CACHING_PROXY);
auto region = regionFactory.setRegionTimeToLive(ExpirationAction::INVALIDATE, 120)
auto region = regionFactory.setRegionTimeToLive(ExpirationAction::INVALIDATE,
std::chrono::seconds(120))
.create("exampleRegion0");
```

Expand All @@ -47,7 +48,7 @@ XML equivalent:
<region name="exampleRegion0" refid="CACHING_PROXY">
<region-attributes pool-name="default">
<region-time-to-live>
<expiration-attributes timeout="120" action="invalidate"/>
<expiration-attributes timeout="120s" action="invalidate"/>
</region-time-to-live>
</region-attributes>
</region>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@ You can pass in specific properties programmatically by using a `Properties` obj
Example:

``` pre
PropertiesPtr systemProps = Properties::create();
systemProps->insert( "statistic-archive-file", "stats.gfs" );
systemProps->insert( "cache-xml-file", "./myapp-cache.xml" );
systemProps->insert( "stacktrace-enabled", "true" );
CacheFactoryPtr systemPtr = CacheFactory::createCacheFactory(systemProps);

auto systemProps = Properties::create();
systemProps->insert("statistic-archive-file", "stats.gfs");
systemProps->insert("cache-xml-file", "./myapp-cache.xml");
systemProps->insert("stacktrace-enabled", "true");
auto cache = CacheFactory(systemProps).create();
```

## <a id="native-client-config__section_67D24B8F8C6C46CDA3474E6E42963D04"></a>About the geode.properties Configuration File
Expand Down Expand Up @@ -129,4 +128,4 @@ The typical configuration procedure for a client includes the high-level steps l

If you start a client without any configuration, it uses any attributes set programmatically plus any hard-coded defaults (listed in [System Properties](sysprops.html#attributes-gfcpp)). Running with the defaults is a convenient way to learn the operation of the distributed system and to test which attributes need to be reconfigured for your environment.

Running based on defaults is not recommended for production systems, as important components, such as security, might be overlooked.
Running based on defaults is not recommended for production systems, as important components, such as security, might be overlooked.
11 changes: 6 additions & 5 deletions docs/geode-native-docs/function-execution.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,10 @@ The client:
- provides the execution object with a populated input parameter array
- invokes the object's execute method to invoke the server-side function

If the client expects results, it must create a result object. The C++ example uses a result object to hold the function results.
Alternatively, the client can use a provided Result Collector which offers some predefined methods for iterating over and processing return values.
The .NET example uses a built-in result collector (`IResultCollector.getRestults()`) to retrieve the function results.
If the client expects results, it must create a result object.
The .NET example uses a built-in result collector (`IResultCollector.getResults()`) to retrieve the function results.

The C++ example creates a result variable to hold the results from the collector.

## <a id="dotnet_example"></a>.NET Example
This section contains code snippets showing highlights of the .NET function execution example. They are not intended for cut-and-paste execution.
Expand Down Expand Up @@ -262,7 +263,7 @@ The client creates an execution object using `Client.FunctionService.OnRegion` a
auto functionService = FunctionService::onServer(region->getRegionService());
```

The client then calls the server side function with its input arguments and stores the results in a Client.IResultCollector.
The client then calls the server side function with its input arguments and stores the results in a vector.

```cpp
if(auto executeFunctionResult = functionService.withArgs(arguments).execute(getFuncIName)->getResult()) {
Expand All @@ -279,7 +280,7 @@ The client then calls the server side function with its input arguments and stor
}
```

It then loops through the results and prints the retrieved values.
It then loops through the results vector and prints the retrieved values.

```cpp
void printResults(const std::vector<std::string>& resultList) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ To connect to a server, your application must follow these steps:

Once the connection pool and the shared region are in place, your client application is ready to share data with the server.

**C++ Example**
**Server Connection: C++ Example**

This example of connecting to the server is taken from the C++ `put-get-remove` example.

Expand Down Expand Up @@ -69,7 +69,7 @@ Create a named pool of network connections, and instantiate a region of the desi
auto region = regionFactory.setPoolName("pool").create("example_userinfo"); // create a connection to the region "example_userinfo" on the server
```

**.NET Example**
**Server Connection: .NET Example**

This example of connecting to the server is taken from the .NET `PutGetRemove` example.

Expand Down Expand Up @@ -120,32 +120,38 @@ CMake files are located at each level of the directory structure to allow exampl

The directory structure resembles this hierarchy (some entries are omitted for clarity):

```
MyProject/
cmake/
CMakeLists.txt
examples/
BUILDING.md
BUILD-EXAMPLES.md
CMakeLists.txt
CMakeLists.txt.in
cmake/
cpp/
BUILD-CPP-EXAMPLES.md
CMakeLists.txt
authinitialize/
continuousquery/
dataserializable/
functionexecution/
pdxserializable/
pdxserializer/
put-get-remove/
putgetremove/
remotequery/
sslputget/
transaction/
dotnet/
AuthInitialize/
BUILD-DOTNET-EXAMPLES.md
CMakeLists.txt
DataSerializableCs/
PdxAutoSerializer/
PdxSerializableCs/
PutGetRemove/
RemoteQueryCs/

See the `BUILD-platform-EXAMPLES.md` or `README.md` file in each directory for detailed instructions on building
and executing the examples, and read the source code to understand how the examples are constructed.
authinitialize/
continuousquery/
dataserializable/
functionexecution/
pdxautoserializer/
pdxserializable/
putgetremove/
remotequery/
sslputget/
transaction/
```

See the `BUILD-EXAMPLES.md` file for detailed instructions on building and executing the examples,
and read the source code to understand how the examples are constructed.
2 changes: 1 addition & 1 deletion docs/geode-native-docs/regions/regions.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Like the programmatic examples above, the following example creates two regions

```

The `cache.xml` file contents must conform to the XML described in the XSD file provided in your distribution's `xsd`
The `cache.xml` file contents must conform to the XML described in the `cpp-cache-1.0.xsd` file provided in your distribution's `xsds`
subdirectory.


Expand Down
12 changes: 0 additions & 12 deletions docs/geode-native-docs/remote-queries.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,6 @@ A `Query` is obtained from a `QueryService`, which is obtained from one of two s
- For .NET, use `Apache::Geode::Client::Cache::GetQueryService()`.
- For C++, use ` apache::geode::client::Cache::getQueryService()`.

[**QUESTION**] These are also available - when are they used?

.NET:

- Apache::Geode::Client::IRegionService::GetQueryService()

C++:

- apache::geode::client::RegionService::getQueryService()
- apache::geode::client::AuthenticatedView::getQueryService()


### <a id="ExecutingAQuery"></a>Executing a Query from the Client

The essential steps to create and execute a query are:
Expand Down
30 changes: 2 additions & 28 deletions docs/geode-native-docs/security/sslclientserver.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,33 +45,7 @@ Download and install OpenSSL 1.1.1 for your specific operating system.
The <%=vars.product_name%> server requires keys and keystores in the Java Key Store (JKS) format while the native client requires them in the clear PEM format. Thus you need to be able to generate private/public keypairs in either format and convert between the two using the `keytool` utility and the `openssl` command.


## Step 2. Configure environment variables

Configure your system environment to run OpenSSL by adding the appropriate executable and library directories to your paths.
For example, for Bourne and Korn shells (sh, ksh, bash), environment setup would look something like this:
<code>
% LD\_LIBRARY\_PATH=$LD\_LIBRARY\_PATH:_client-install-dir_/lib:_client-install-dir_/ssl\_libs:_openssl-install-dir_/lib<br />
% export LD\_LIBRARY\_PATH<br />
% CLASSPATH=_server-install-dir_/lib/libcryptoImpl.jar:$CLASSPATH
</code>

where:

_client-install-dir_ is the directory in which you installed your client.

_openssl-install-dir_ is the directory in which you installed OpenSSL.

_server-install-dir_ is the directory in which you installed your server.

For Windows, environment setup might resemble this:
<code>
\> set PATH=_jdk-or-jre-path_\bin;_client-install-dir_\bin;_client-install-dir_\ssl\_libs;_openssl-install-dir_\bin;%PATH%<br />
\> set CLASSPATH=_server-installdir_\lib\libcryptoImpl.jar;%CLASSPATH%
</code>

where _jdk-or-jre-path_ is the directory in which Java is installed.

## Step 3. Enable SSL on the server and on the client
## Step 2. Enable SSL on the server and on the client

1. On the server, enable SSL for the `locator` and `server` components, as the SSL-enabled client
must be able to communicate with both locator and server components.
Expand All @@ -88,7 +62,7 @@ SSL properties as described and with the servers or locators specified as usual.

Specifically, ensure that:

- OpenSSL and ACE\_SSL `DLL`s locations are in the right environment variables for your system: `PATH` for Windows, and `LD_LIBRARY_PATH` for Unix.
- The OpenSSL and <%=vars.product_name%> DLLs are in the right environment variables for your system: `PATH` for Windows, and `LD_LIBRARY_PATH` for Unix.
- You have generated the keys and keystores.
- You have set the system properties.

Expand Down