Connections
Connecting to a GridGain 9 cluster from the Java, .NET, .NET LINQ, C++, and Python clients, and via the Python DB API.
You can connect to your cluster by using the following clients:
Connection URI and API credentials
All examples below use the following values:
{connectionUri}-- obtain from the Connections widget{login}and{password}-- obtain from the My cluster tab.
Java client
The Java thin client connects to the cluster via a standard socket connection. It does not become a part of the cluster topology, never holds any data, and is not used as a destination for compute calculations. The thin client simply establishes a socket connection to a standard node and performs all operations through that node.
Add the following dependencies to your Maven project:
<repositories> <repository> <id>GridGain External Repository</id> <url>https://www.gridgainsystems.com/nexus/content/repositories/external</url> </repository> </repositories> <dependencies> <dependency> <groupId>org.gridgain</groupId> <artifactId>ignite-core</artifactId> <version>${gg.version}</version> </dependency> </dependencies>Create a client configuration and replace the
{login}and{password}placeholders with your cluster credentials. Replace the{connectionUri}with the connection URI from the Connections widget.public static void main(String[] args) { SslConfiguration sslConfiguration = new SslConfigurationBuilder() .enabled(true) .build(); IgniteClientAuthenticator auth = BasicAuthenticator.builder() .username("{login}") .password("{password}") .build(); // Connect to the cluster. try (IgniteClient client = IgniteClient.builder() .addresses("{connectionUri}:10800") .authenticator(auth) .ssl(sslConfiguration) .build()) { // Query the table using SQL. client.sql().execute(null, "CREATE TABLE IF NOT EXISTS Person (id VARCHAR PRIMARY KEY, name VARCHAR)"); } }
For more information on Java client, see this article.
C++ client
Add the GridGain C++ client library to your project. Include the following headers:
ignite/client/ignite_client.hignite/client/basic_authenticator.h
Create a client configuration and replace the
{login}and{password}placeholders with your cluster credentials. Replace the{connectionUri}with the connection URI from the Connections widget.
For more information on C++ client, see this article.
.NET client
Supported runtimes: .NET 8.0+
Install .NET SDK
Copy the Program and dependency example files to an empty folder.
Replace
{gg.version}with the version of the managed cluster.Replace the
{login}and{password}placeholders with your cluster API credentials.Execute
dotnet runin that folder.
For more information on .NET client, see this article.
.NET LINQ client
Supported runtimes: .NET 8.0+
Install .NET SDK
Copy the Program and dependency example files to an empty folder.
Replace
{gg.version}with the version of the managed cluster.Replace the
{login}and{password}placeholders with your cluster API credentials.Execute
dotnet runin that folder.
For more information on .NET LINQ client, see this article.
Python client
Install the pygridgain package:
Create a client configuration and replace the
{login}and{password}placeholders with your cluster credentials. Replace the{connectionUri}with the connection URI from the Connections widget.
For more information on Python client, see this article.
Python DB API
Install the pygridgain_dbapi package:
Create a connection and replace the
{login}and{password}placeholders with your cluster credentials. Replace the{connectionUri}with the connection URI from the Connections widget.
For more information on Python DB API, see this article.
Last updated
Was this helpful?

