You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Charlin S <Ch...@hotelhub.com> on 2023/01/12 09:40:18 UTC

C# Ignite thin client - how to connect specific grid

Hi All,
My requirement is to connect a specific grid(server has multiple grids)
from c# thin client, since its support only 10800 ports.

Regards,
Charlin

Re: C# Ignite thin client - how to connect specific grid

Posted by Charlin S <Ch...@hotelhub.com>.
Hi All,
Thank you very much.
I am able to connect two different grid in one server with different port
configuration as below
Grid 1
<property name="clientConnectorConfiguration">
         <bean
class="org.apache.ignite.configuration.ClientConnectorConfiguration">
             <property name="port" value="10800"/>
         </bean>
     </property>
Grid 2
<property name="clientConnectorConfiguration">
         <bean
class="org.apache.ignite.configuration.ClientConnectorConfiguration">
             <property name="port" value="10900"/>
         </bean>
     </property>

One observation I am not able to point multiple server node( Endpoints =
new[] { "Server1IP:10800", "Server2IP10800" }) with 10800 but same time
able to connect other grid2  with 10900 port).

Regards,
Charlin


On Thu, 12 Jan 2023 at 18:03, Charlin S <Ch...@hotelhub.com> wrote:

> Hi,
> Thank you Stephen and Pavel.
>
> I will try these options and keep you posted.
>
> Regards,
> Charlin
>
>
> On Thu, 12 Jan 2023 at 17:45, Pavel Tupitsyn <pt...@apache.org> wrote:
>
>> Set different client connector ports for different grids like this:
>>
>>     <bean class="org.apache.ignite.configuration.IgniteConfiguration">
>>         <property name="clientConnectorConfiguration">
>>             <bean
>> class="org.apache.ignite.configuration.ClientConnectorConfiguration">
>>                 <property name="port" value="10900"/>
>>             </bean>
>>         </property>
>>         ...
>>
>> On Thu, Jan 12, 2023 at 2:01 PM Stephen Darlington <
>> stephen.darlington@gridgain.com> wrote:
>>
>>> Those ports are for thick-clients and servers. Thin clients connect to
>>> 10800. The second server to start will be on 10801, etc.
>>>
>>> You can configure the thin-client port with
>>> ClientConnectorConfiguration: getting-started-with-thin-clients
>>> <https://ignite.apache.org/docs/latest/thin-clients/getting-started-with-thin-clients#configuring-thin-client-connector>
>>>
>>> On 12 Jan 2023, at 11:56, Charlin S <Ch...@hotelhub.com> wrote:
>>>
>>> Hi Pavel,
>>> Thanks for your reply.
>>> I am having two grids in one server and grid configuration as below.
>>> Which port should I use for connecting grid1 and grid2?
>>>
>>> <image.png>
>>>
>>> As per my understanding, I should be able to connect thin clients like
>>> this. Please correct me if I am wrong.
>>>
>>> //for Grid 1
>>>
>>> var clientCfgGrid1 = new IgniteClientConfiguration
>>> {
>>>     Endpoints = new[] { "10.201.30.116: <http://127.0.0.1:10901/>48500","10.201.30.117: <http://127.0.0.1:10901/>48500" }
>>>
>>> };
>>>
>>> // for Grid 2
>>>
>>> var clientCfgGrid2 = new IgniteClientConfiguration
>>> {
>>>     Endpoints = new[] { "10.201.30.116: <http://127.0.0.1:10901/>55800","10.201.30.117: <http://127.0.0.1:10901/>55800" }
>>>
>>> };
>>>
>>>
>>> Regards,
>>> Charlin
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Thu, 12 Jan 2023 at 15:37, Pavel Tupitsyn <pt...@apache.org>
>>> wrote:
>>>
>>>>
>>>> C# thin client can connect to any port, specify it in the endpoint
>>>> string like this:
>>>>
>>>> var clientCfg = new IgniteClientConfiguration("127.0.0.1:10901");
>>>> var client = Ignition.StartClient(clientCfg);
>>>>
>>>>
>>>> or
>>>>
>>>> var clientCfg2 = new IgniteClientConfiguration
>>>> {
>>>>     Endpoints = new[] { "127.0.0.1:10901" }
>>>> };
>>>>
>>>>
>>>> On Thu, Jan 12, 2023 at 11:41 AM Charlin S <Ch...@hotelhub.com>
>>>> wrote:
>>>>
>>>>> Hi All,
>>>>> My requirement is to connect a specific grid(server has multiple
>>>>> grids) from c# thin client, since its support only 10800 ports.
>>>>>
>>>>> Regards,
>>>>> Charlin
>>>>>
>>>>>
>>>>>
>>>>>
>>>

Re: C# Ignite thin client - how to connect specific grid

Posted by Charlin S <Ch...@hotelhub.com>.
Hi,
Thank you Stephen and Pavel.

I will try these options and keep you posted.

Regards,
Charlin


On Thu, 12 Jan 2023 at 17:45, Pavel Tupitsyn <pt...@apache.org> wrote:

> Set different client connector ports for different grids like this:
>
>     <bean class="org.apache.ignite.configuration.IgniteConfiguration">
>         <property name="clientConnectorConfiguration">
>             <bean
> class="org.apache.ignite.configuration.ClientConnectorConfiguration">
>                 <property name="port" value="10900"/>
>             </bean>
>         </property>
>         ...
>
> On Thu, Jan 12, 2023 at 2:01 PM Stephen Darlington <
> stephen.darlington@gridgain.com> wrote:
>
>> Those ports are for thick-clients and servers. Thin clients connect to
>> 10800. The second server to start will be on 10801, etc.
>>
>> You can configure the thin-client port with ClientConnectorConfiguration:
>> getting-started-with-thin-clients
>> <https://ignite.apache.org/docs/latest/thin-clients/getting-started-with-thin-clients#configuring-thin-client-connector>
>>
>> On 12 Jan 2023, at 11:56, Charlin S <Ch...@hotelhub.com> wrote:
>>
>> Hi Pavel,
>> Thanks for your reply.
>> I am having two grids in one server and grid configuration as below.
>> Which port should I use for connecting grid1 and grid2?
>>
>> <image.png>
>>
>> As per my understanding, I should be able to connect thin clients like
>> this. Please correct me if I am wrong.
>>
>> //for Grid 1
>>
>> var clientCfgGrid1 = new IgniteClientConfiguration
>> {
>>     Endpoints = new[] { "10.201.30.116: <http://127.0.0.1:10901/>48500","10.201.30.117: <http://127.0.0.1:10901/>48500" }
>>
>> };
>>
>> // for Grid 2
>>
>> var clientCfgGrid2 = new IgniteClientConfiguration
>> {
>>     Endpoints = new[] { "10.201.30.116: <http://127.0.0.1:10901/>55800","10.201.30.117: <http://127.0.0.1:10901/>55800" }
>>
>> };
>>
>>
>> Regards,
>> Charlin
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Thu, 12 Jan 2023 at 15:37, Pavel Tupitsyn <pt...@apache.org>
>> wrote:
>>
>>>
>>> C# thin client can connect to any port, specify it in the endpoint
>>> string like this:
>>>
>>> var clientCfg = new IgniteClientConfiguration("127.0.0.1:10901");
>>> var client = Ignition.StartClient(clientCfg);
>>>
>>>
>>> or
>>>
>>> var clientCfg2 = new IgniteClientConfiguration
>>> {
>>>     Endpoints = new[] { "127.0.0.1:10901" }
>>> };
>>>
>>>
>>> On Thu, Jan 12, 2023 at 11:41 AM Charlin S <Ch...@hotelhub.com>
>>> wrote:
>>>
>>>> Hi All,
>>>> My requirement is to connect a specific grid(server has multiple grids)
>>>> from c# thin client, since its support only 10800 ports.
>>>>
>>>> Regards,
>>>> Charlin
>>>>
>>>>
>>>>
>>>>
>>

Re: C# Ignite thin client - how to connect specific grid

Posted by Pavel Tupitsyn <pt...@apache.org>.
Set different client connector ports for different grids like this:

    <bean class="org.apache.ignite.configuration.IgniteConfiguration">
        <property name="clientConnectorConfiguration">
            <bean
class="org.apache.ignite.configuration.ClientConnectorConfiguration">
                <property name="port" value="10900"/>
            </bean>
        </property>
        ...

On Thu, Jan 12, 2023 at 2:01 PM Stephen Darlington <
stephen.darlington@gridgain.com> wrote:

> Those ports are for thick-clients and servers. Thin clients connect to
> 10800. The second server to start will be on 10801, etc.
>
> You can configure the thin-client port with ClientConnectorConfiguration:
> getting-started-with-thin-clients
> <https://ignite.apache.org/docs/latest/thin-clients/getting-started-with-thin-clients#configuring-thin-client-connector>
>
> On 12 Jan 2023, at 11:56, Charlin S <Ch...@hotelhub.com> wrote:
>
> Hi Pavel,
> Thanks for your reply.
> I am having two grids in one server and grid configuration as below. Which
> port should I use for connecting grid1 and grid2?
>
> <image.png>
>
> As per my understanding, I should be able to connect thin clients like
> this. Please correct me if I am wrong.
>
> //for Grid 1
>
> var clientCfgGrid1 = new IgniteClientConfiguration
> {
>     Endpoints = new[] { "10.201.30.116: <http://127.0.0.1:10901/>48500","10.201.30.117: <http://127.0.0.1:10901/>48500" }
>
> };
>
> // for Grid 2
>
> var clientCfgGrid2 = new IgniteClientConfiguration
> {
>     Endpoints = new[] { "10.201.30.116: <http://127.0.0.1:10901/>55800","10.201.30.117: <http://127.0.0.1:10901/>55800" }
>
> };
>
>
> Regards,
> Charlin
>
>
>
>
>
>
>
>
>
> On Thu, 12 Jan 2023 at 15:37, Pavel Tupitsyn <pt...@apache.org> wrote:
>
>>
>> C# thin client can connect to any port, specify it in the endpoint string
>> like this:
>>
>> var clientCfg = new IgniteClientConfiguration("127.0.0.1:10901");
>> var client = Ignition.StartClient(clientCfg);
>>
>>
>> or
>>
>> var clientCfg2 = new IgniteClientConfiguration
>> {
>>     Endpoints = new[] { "127.0.0.1:10901" }
>> };
>>
>>
>> On Thu, Jan 12, 2023 at 11:41 AM Charlin S <Ch...@hotelhub.com>
>> wrote:
>>
>>> Hi All,
>>> My requirement is to connect a specific grid(server has multiple grids)
>>> from c# thin client, since its support only 10800 ports.
>>>
>>> Regards,
>>> Charlin
>>>
>>>
>>>
>>>
>

Re: C# Ignite thin client - how to connect specific grid

Posted by Stephen Darlington <st...@gridgain.com>.
Those ports are for thick-clients and servers. Thin clients connect to 10800. The second server to start will be on 10801, etc.

You can configure the thin-client port with ClientConnectorConfiguration: getting-started-with-thin-clients <https://ignite.apache.org/docs/latest/thin-clients/getting-started-with-thin-clients#configuring-thin-client-connector>

> On 12 Jan 2023, at 11:56, Charlin S <Ch...@hotelhub.com> wrote:
> 
> Hi Pavel,
> Thanks for your reply.
> I am having two grids in one server and grid configuration as below. Which port should I use for connecting grid1 and grid2?
> 
> <image.png>
> 
> As per my understanding, I should be able to connect thin clients like this. Please correct me if I am wrong.
> //for Grid 1
> var clientCfgGrid1 = new IgniteClientConfiguration
> {
>     Endpoints = new[] { "10.201.30.116: <http://127.0.0.1:10901/>48500","10.201.30.117: <http://127.0.0.1:10901/>48500" }
> };
> // for Grid 2
> var clientCfgGrid2 = new IgniteClientConfiguration
> {
>     Endpoints = new[] { "10.201.30.116: <http://127.0.0.1:10901/>55800","10.201.30.117: <http://127.0.0.1:10901/>55800" }
> };
> 
> Regards,
> Charlin
> 
> 
> 
> 
>  
> 
> 
> 
> 
> On Thu, 12 Jan 2023 at 15:37, Pavel Tupitsyn <ptupitsyn@apache.org <ma...@apache.org>> wrote:
> 
> C# thin client can connect to any port, specify it in the endpoint string like this:
> 
> var clientCfg = new IgniteClientConfiguration("127.0.0.1:10901 <http://127.0.0.1:10901/>");
> var client = Ignition.StartClient(clientCfg);
> 
> or
> 
> var clientCfg2 = new IgniteClientConfiguration
> {
>     Endpoints = new[] { "127.0.0.1:10901 <http://127.0.0.1:10901/>" }
> };
> 
> On Thu, Jan 12, 2023 at 11:41 AM Charlin S <Charlin.s@hotelhub.com <ma...@hotelhub.com>> wrote:
> Hi All,
> My requirement is to connect a specific grid(server has multiple grids) from c# thin client, since its support only 10800 ports.
> 
> Regards,
> Charlin
> 
> 
> 


Re: C# Ignite thin client - how to connect specific grid

Posted by Charlin S <Ch...@hotelhub.com>.
Hi Pavel,
Thanks for your reply.
I am having two grids in one server and grid configuration as below. Which
port should I use for connecting grid1 and grid2?

[image: image.png]

As per my understanding, I should be able to connect thin clients like
this. Please correct me if I am wrong.

//for Grid 1

var clientCfgGrid1 = new IgniteClientConfiguration
{
    Endpoints = new[] { "10.201.30.116:
<http://127.0.0.1:10901/>48500","10.201.30.117:
<http://127.0.0.1:10901/>48500" }

};

// for Grid 2

var clientCfgGrid2 = new IgniteClientConfiguration
{
    Endpoints = new[] { "10.201.30.116:
<http://127.0.0.1:10901/>55800","10.201.30.117:
<http://127.0.0.1:10901/>55800" }

};


Regards,
Charlin









On Thu, 12 Jan 2023 at 15:37, Pavel Tupitsyn <pt...@apache.org> wrote:

>
> C# thin client can connect to any port, specify it in the endpoint string
> like this:
>
> var clientCfg = new IgniteClientConfiguration("127.0.0.1:10901");
> var client = Ignition.StartClient(clientCfg);
>
>
> or
>
> var clientCfg2 = new IgniteClientConfiguration
> {
>     Endpoints = new[] { "127.0.0.1:10901" }
> };
>
>
> On Thu, Jan 12, 2023 at 11:41 AM Charlin S <Ch...@hotelhub.com> wrote:
>
>> Hi All,
>> My requirement is to connect a specific grid(server has multiple grids)
>> from c# thin client, since its support only 10800 ports.
>>
>> Regards,
>> Charlin
>>
>>
>>
>>

Re: C# Ignite thin client - how to connect specific grid

Posted by Pavel Tupitsyn <pt...@apache.org>.
C# thin client can connect to any port, specify it in the endpoint string
like this:

var clientCfg = new IgniteClientConfiguration("127.0.0.1:10901");
var client = Ignition.StartClient(clientCfg);


or

var clientCfg2 = new IgniteClientConfiguration
{
    Endpoints = new[] { "127.0.0.1:10901" }
};


On Thu, Jan 12, 2023 at 11:41 AM Charlin S <Ch...@hotelhub.com> wrote:

> Hi All,
> My requirement is to connect a specific grid(server has multiple grids)
> from c# thin client, since its support only 10800 ports.
>
> Regards,
> Charlin
>
>
>
>