Re: Replicated cache in C++

2022-06-23 Thread F.D.
Ok thanks very much.

Il mer 22 giu 2022, 02:54 Ilya Korol  ha scritto:

> Hi,
>
> Asterisk (*) in cache name is just a flag for Ignite to not initiate
> this cache but instead register it as a template, that for example can
> be used further for SQL table creations:
>
> CREATE TABLE IF NOT EXISTS Person (
>id int,
>city_id int,
>name varchar,
>age int,
>company varchar,
>PRIMARY KEY (id, city_id)
> ) WITH "template=partitioned,backups=1,affinity_key=city_id,
> key_type=PersonKey, value_type=MyPerson";
>
> Since you are going to create just a simple REPLICATED cache, there is
> no need for cache template defined first.
> If you need to create multiple caches with similar config just write a
> some kind of factory method in C++ that will return properly formed
> cache configuration that can be tuned in required on per-cache basis.
>
>
> On 2022/06/21 11:46:19 "F.D." wrote:
>  > Hi Igniters,
>  > I'd like to create a new replicated cache using C++. I suppose I'll
> have to
>  > use a cache template, but it's not clear, for me, how to set the name of
>  > the template... for example the meaning of '*'.
>  >
>  > Thanks,
>  > F.D.
>  >
>


Replicated cache in C++

2022-06-21 Thread F.D.
Hi Igniters,
I'd like to create a new replicated cache using C++. I suppose I'll have to
use a cache template, but it's not clear, for me, how to set the name of
the template... for example the meaning of '*'.

Thanks,
   F.D.


Nodejs ThinClient and compute

2022-02-18 Thread F.D.
Hi,
is it possible to launch a "distributed compute" from a thin client of
node.js? If not, do you have a workaround about it?

Thanks,
 F.D.


Re: Nodejs cache problem.

2022-02-17 Thread F.D.
I solved putting INTEGER_ARRAY.

Thanks,
   F.D.

On Tue, Feb 15, 2022 at 12:11 AM F.D.  wrote:

> Hi Eduard,
> sorry for my late reply. I've attached it to this email. But now I got a
> different error message:
> "Value "220" can not be cast to byte"
> or
> "Value "238" can not be cast to byte"
>
> The line where I got the error is:
>   await cache.put(key, value);
>
> Where value is
> [image: image.png]
>
> Thank you in advance.
>
> F.D.
>
>
> On Tue, Feb 1, 2022 at 6:32 PM Eduard Rakhmankulov 
> wrote:
>
>> Good day, F.D.!
>>
>> Can you provide ignite logs related to this problem?
>>
>>
>>
>> On Tue, 1 Feb 2022 at 10:46, F.D.  wrote:
>>
>>> Hi,
>>> I'm trying to use Apache Ignite to store protobuf messages in cache,
>>> trying to speed up our web interface.
>>> I'm using the thin client for nodejs, and the 2.12.0 of Ignite.
>>>
>>> I've 2 function:
>>> async function get_cache_value(name, key)
>>> {
>>>const igniteClient = new IgniteClient();
>>>let value = null;
>>>try {
>>>   await igniteClient.connect(new IgniteClientConfiguration(ignite_ip
>>> + ':10800'));
>>>   const cache = (await igniteClient.getOrCreateCache(name)).
>>>  setKeyType(ObjectType.PRIMITIVE_TYPE.STRING).
>>>  setValueType(ObjectType.PRIMITIVE_TYPE.BYTE_ARRAY);
>>>
>>>   value = await cache.get(key);
>>>}
>>>catch(err) {
>>>   console.log(err.message);
>>>}
>>>finally {
>>>   igniteClient.disconnect();
>>>}
>>>
>>>return value;
>>> }
>>>
>>> async function put_cache_value(name, key, value)
>>> {
>>>const igniteClient = new IgniteClient();
>>>try {
>>>   await igniteClient.connect(new IgniteClientConfiguration(ignite_ip
>>> + ':10800'));
>>>   const cache = await igniteClient.getCache(name).
>>>   setKeyType(ObjectType.PRIMITIVE_TYPE.STRING).
>>>   setValueType(ObjectType.PRIMITIVE_TYPE.BYTE_ARRAY);
>>>
>>>   await cache.put(key, value);
>>>}
>>>catch(err) {
>>>   console.log(err.message);
>>>}
>>>finally {
>>>   igniteClient.disconnect();
>>>}
>>> }
>>>
>>> The put seems work well, but I'm not sure, but when I try to do the get
>>> I got this error: "Type "BinaryObject" can not be cast to byte array". I'm
>>> putting the protobuf serialized message that should be a byte array.
>>>
>>> What's wrong?
>>>
>>> Thanks,
>>>F.D.
>>>
>>>
>>>
>>>
>>>
>>
>> --
>> Best regards, Eduard.
>>
>


Re: Nodejs Think clint problem with byte array.

2022-02-17 Thread F.D.
Ok, solved. I used INTEGER_ARRAY.

F.D.


On Wed, Feb 16, 2022 at 12:54 PM F.D.  wrote:

> Hi,
> I've a problem putting in a cache entry a byte array. I've tried to use
> BYTE_ARRAY directly, or  passing by a ComplexObjectType where one field was
> a BYTE_ARRAY, but it didn't work.
>
> And watching the following table:
>
>  * | JavaScript type   | Ignite type code  |
>  * | - | --|
>  * | number| DOUBLE|
>  * | boolean   | BOOLEAN   |
>  * | string| STRING|
>  * | Date  | DATE  |
>  * | Timestamp*| TIMESTAMP |
>  * | EnumItem* | ENUM  |
>  * | Decimal** | DECIMAL   |
>  * | BinaryObject* | COMPLEX_OBJECT|
>  * | Array of number   | DOUBLE_ARRAY  |
>  * | Array of boolean  | BOOLEAN_ARRAY |
>  * | Array of string   | STRING_ARRAY  |
>  * | Array of Date | DATE_ARRAY|
>  * | Array of Timestamp*   | TIMESTAMP_ARRAY   |
>  * | Array of EnumItem*| ENUM_ARRAY|
>  * | Array of Decimal**| DECIMAL_ARRAY |
>  * | Array of BinaryObject*| OBJECT_ARRAY  |
>  * | Array of any other Object | OBJECT_ARRAY  |
>  * | Set   | COLLECTION (HASH_SET) |
>  * | Map   | MAP (HASH_MAP)|
>  * | any other Object  | COMPLEX_OBJECT|
>
> seems that no mapping is present between a uint8array and a ignite type
> code.
> Can you help me?
>
> Thanks,
> F.D.
>
>


Nodejs Think clint problem with byte array.

2022-02-16 Thread F.D.
Hi,
I've a problem putting in a cache entry a byte array. I've tried to use
BYTE_ARRAY directly, or  passing by a ComplexObjectType where one field was
a BYTE_ARRAY, but it didn't work.

And watching the following table:

 * | JavaScript type   | Ignite type code  |
 * | - | --|
 * | number| DOUBLE|
 * | boolean   | BOOLEAN   |
 * | string| STRING|
 * | Date  | DATE  |
 * | Timestamp*| TIMESTAMP |
 * | EnumItem* | ENUM  |
 * | Decimal** | DECIMAL   |
 * | BinaryObject* | COMPLEX_OBJECT|
 * | Array of number   | DOUBLE_ARRAY  |
 * | Array of boolean  | BOOLEAN_ARRAY |
 * | Array of string   | STRING_ARRAY  |
 * | Array of Date | DATE_ARRAY|
 * | Array of Timestamp*   | TIMESTAMP_ARRAY   |
 * | Array of EnumItem*| ENUM_ARRAY|
 * | Array of Decimal**| DECIMAL_ARRAY |
 * | Array of BinaryObject*| OBJECT_ARRAY  |
 * | Array of any other Object | OBJECT_ARRAY  |
 * | Set   | COLLECTION (HASH_SET) |
 * | Map   | MAP (HASH_MAP)|
 * | any other Object  | COMPLEX_OBJECT|

seems that no mapping is present between a uint8array and a ignite type
code.
Can you help me?

Thanks,
F.D.


Re: Nodejs cache problem.

2022-02-14 Thread F.D.
Hi Eduard,
sorry for my late reply. I've attached it to this email. But now I got a
different error message:
"Value "220" can not be cast to byte"
or
"Value "238" can not be cast to byte"

The line where I got the error is:
  await cache.put(key, value);

Where value is
[image: image.png]

Thank you in advance.

F.D.


On Tue, Feb 1, 2022 at 6:32 PM Eduard Rakhmankulov 
wrote:

> Good day, F.D.!
>
> Can you provide ignite logs related to this problem?
>
>
>
> On Tue, 1 Feb 2022 at 10:46, F.D.  wrote:
>
>> Hi,
>> I'm trying to use Apache Ignite to store protobuf messages in cache,
>> trying to speed up our web interface.
>> I'm using the thin client for nodejs, and the 2.12.0 of Ignite.
>>
>> I've 2 function:
>> async function get_cache_value(name, key)
>> {
>>const igniteClient = new IgniteClient();
>>let value = null;
>>try {
>>   await igniteClient.connect(new IgniteClientConfiguration(ignite_ip
>> + ':10800'));
>>   const cache = (await igniteClient.getOrCreateCache(name)).
>>  setKeyType(ObjectType.PRIMITIVE_TYPE.STRING).
>>  setValueType(ObjectType.PRIMITIVE_TYPE.BYTE_ARRAY);
>>
>>   value = await cache.get(key);
>>}
>>catch(err) {
>>   console.log(err.message);
>>}
>>finally {
>>   igniteClient.disconnect();
>>}
>>
>>return value;
>> }
>>
>> async function put_cache_value(name, key, value)
>> {
>>const igniteClient = new IgniteClient();
>>try {
>>   await igniteClient.connect(new IgniteClientConfiguration(ignite_ip
>> + ':10800'));
>>   const cache = await igniteClient.getCache(name).
>>   setKeyType(ObjectType.PRIMITIVE_TYPE.STRING).
>>   setValueType(ObjectType.PRIMITIVE_TYPE.BYTE_ARRAY);
>>
>>   await cache.put(key, value);
>>}
>>catch(err) {
>>   console.log(err.message);
>>}
>>finally {
>>   igniteClient.disconnect();
>>}
>> }
>>
>> The put seems work well, but I'm not sure, but when I try to do the get I
>> got this error: "Type "BinaryObject" can not be cast to byte array". I'm
>> putting the protobuf serialized message that should be a byte array.
>>
>> What's wrong?
>>
>> Thanks,
>>F.D.
>>
>>
>>
>>
>>
>
> --
> Best regards, Eduard.
>


ignite-e39d51be.0.log
Description: Binary data


Nodejs cache problem.

2022-01-31 Thread F.D.
Hi,
I'm trying to use Apache Ignite to store protobuf messages in cache, trying
to speed up our web interface.
I'm using the thin client for nodejs, and the 2.12.0 of Ignite.

I've 2 function:
async function get_cache_value(name, key)
{
   const igniteClient = new IgniteClient();
   let value = null;
   try {
  await igniteClient.connect(new IgniteClientConfiguration(ignite_ip +
':10800'));
  const cache = (await igniteClient.getOrCreateCache(name)).
 setKeyType(ObjectType.PRIMITIVE_TYPE.STRING).
 setValueType(ObjectType.PRIMITIVE_TYPE.BYTE_ARRAY);

  value = await cache.get(key);
   }
   catch(err) {
  console.log(err.message);
   }
   finally {
  igniteClient.disconnect();
   }

   return value;
}

async function put_cache_value(name, key, value)
{
   const igniteClient = new IgniteClient();
   try {
  await igniteClient.connect(new IgniteClientConfiguration(ignite_ip +
':10800'));
  const cache = await igniteClient.getCache(name).
  setKeyType(ObjectType.PRIMITIVE_TYPE.STRING).
  setValueType(ObjectType.PRIMITIVE_TYPE.BYTE_ARRAY);

  await cache.put(key, value);
   }
   catch(err) {
  console.log(err.message);
   }
   finally {
  igniteClient.disconnect();
   }
}

The put seems work well, but I'm not sure, but when I try to do the get I
got this error: "Type "BinaryObject" can not be cast to byte array". I'm
putting the protobuf serialized message that should be a byte array.

What's wrong?

Thanks,
   F.D.


C++ Node doesnot shut down

2020-02-21 Thread F.D.
Hi igniters,
I'm using a client node in C++ to lanch several compute on a cluster, and
it's working quite well, but when I try to close the node with every king
of Ignition::Stop/StopAll(true/false), my client remain freezed.

I'm using the 2.7.6. Do you have any suggestions?

Thanks,
   F.D.


Cores on a node

2020-02-09 Thread F.D.
Hi,
I'd like to know if is possible to know the number of logical/physical
cores on a node in a cluster?

Thanks,
   F.D.


Re: C++ computer delay

2019-02-25 Thread F.D.
Hi,

This is the command that I launched:

cmd /c  "" -m -l 7600
>> C:\temp\$(hostname).log


where 7600 is the PID of the JVM. Is it correct?

Thanks,
  F.D.

On Mon, Feb 25, 2019 at 10:52 AM Ilya Kasnacheev 
wrote:

> Hello!
>
> Regardless of extension your thread dumps almost do not contain anything
> relevant.
>
> There is one guess that can be made:
>
> 0x07fa7fe069c1ignite_dll!?save_object_ptr@
> ?$pointer_oserializer@Vportable_binary_oarchive
> @@VVolatilityCubeModel@credit@@@detail@archive@boost@
> @EEBAXAEAVbasic_oarchive@234@PEBX@Z + 0x4c901
>
> Maybe it's something about taking a lot of time to serialize your
> functions.
>
> Still it's hard to say without Java thread dump.
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> пн, 25 февр. 2019 г. в 11:39, F.D. :
>
>> Hi,
>> in my previous message there was the dump of the 4 servers. Maybe the
>> extension of the files is misleading.
>>
>> Thanks,
>>F.D.
>>
>> On Mon, Feb 25, 2019 at 7:48 AM Ilya Kasnacheev <
>> ilya.kasnach...@gmail.com> wrote:
>>
>>> Hello!
>>>
>>> Please post Java stack traces collected with jstack utility. Otherwise
>>> there's nothing there for us to see, unfortunately.
>>>
>>> Regards,
>>> --
>>> Ilya Kasnacheev
>>>
>>>
>>> чт, 21 февр. 2019 г. в 18:33, F.D. :
>>>
>>>> Hi,
>>>> I reduced the grid to only 4 server, so it was easier to collect dumps.
>>>> In the logs you'll find 3 attempts, the first and the third are dump of the
>>>> problem, the second it's a dump with the server in idle.
>>>>
>>>> Thanks for your support!
>>>>
>>>> On Thu, Feb 21, 2019 at 10:58 AM Ilya Kasnacheev <
>>>> ilya.kasnach...@gmail.com> wrote:
>>>>
>>>>> Hello!
>>>>>
>>>>> Preferably all nodes in the cluster.
>>>>>
>>>>> Regards,
>>>>> --
>>>>> Ilya Kasnacheev
>>>>>
>>>>>
>>>>> чт, 21 февр. 2019 г. в 12:39, F.D. :
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> thread log of the client?
>>>>>>
>>>>>> On Thu, Feb 21, 2019 at 10:29 AM Ilya Kasnacheev <
>>>>>> ilya.kasnach...@gmail.com> wrote:
>>>>>>
>>>>>>> Hello!
>>>>>>>
>>>>>>> Can you collect some thread dumps (Java ones, using jstack) during
>>>>>>> those 10 seconds freezes?
>>>>>>>
>>>>>>> Regards,
>>>>>>> --
>>>>>>> Ilya Kasnacheev
>>>>>>>
>>>>>>>
>>>>>>> ср, 20 февр. 2019 г. в 20:18, F.D. :
>>>>>>>
>>>>>>>> Hi igniters,
>>>>>>>> I've a problem when I launch a sequence of about 350 compute
>>>>>>>> funcions in my cluster of 10 node. I register a delay in the first 
>>>>>>>> launcher
>>>>>>>> od about 10 sec. after that, it works smoothly.
>>>>>>>> If I launch the same numbers of task on a single node, there 's no
>>>>>>>> delay.
>>>>>>>> It seems like a problem in the discovery process of the whole grid.
>>>>>>>>
>>>>>>>> Do you have any ideas?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>F. D.
>>>>>>>>
>>>>>>>


Re: C++ computer delay

2019-02-25 Thread F.D.
Hi,
in my previous message there was the dump of the 4 servers. Maybe the
extension of the files is misleading.

Thanks,
   F.D.

On Mon, Feb 25, 2019 at 7:48 AM Ilya Kasnacheev 
wrote:

> Hello!
>
> Please post Java stack traces collected with jstack utility. Otherwise
> there's nothing there for us to see, unfortunately.
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> чт, 21 февр. 2019 г. в 18:33, F.D. :
>
>> Hi,
>> I reduced the grid to only 4 server, so it was easier to collect dumps.
>> In the logs you'll find 3 attempts, the first and the third are dump of the
>> problem, the second it's a dump with the server in idle.
>>
>> Thanks for your support!
>>
>> On Thu, Feb 21, 2019 at 10:58 AM Ilya Kasnacheev <
>> ilya.kasnach...@gmail.com> wrote:
>>
>>> Hello!
>>>
>>> Preferably all nodes in the cluster.
>>>
>>> Regards,
>>> --
>>> Ilya Kasnacheev
>>>
>>>
>>> чт, 21 февр. 2019 г. в 12:39, F.D. :
>>>
>>>> Hi,
>>>>
>>>> thread log of the client?
>>>>
>>>> On Thu, Feb 21, 2019 at 10:29 AM Ilya Kasnacheev <
>>>> ilya.kasnach...@gmail.com> wrote:
>>>>
>>>>> Hello!
>>>>>
>>>>> Can you collect some thread dumps (Java ones, using jstack) during
>>>>> those 10 seconds freezes?
>>>>>
>>>>> Regards,
>>>>> --
>>>>> Ilya Kasnacheev
>>>>>
>>>>>
>>>>> ср, 20 февр. 2019 г. в 20:18, F.D. :
>>>>>
>>>>>> Hi igniters,
>>>>>> I've a problem when I launch a sequence of about 350 compute funcions
>>>>>> in my cluster of 10 node. I register a delay in the first launcher od 
>>>>>> about
>>>>>> 10 sec. after that, it works smoothly.
>>>>>> If I launch the same numbers of task on a single node, there 's no
>>>>>> delay.
>>>>>> It seems like a problem in the discovery process of the whole grid.
>>>>>>
>>>>>> Do you have any ideas?
>>>>>>
>>>>>> Thanks,
>>>>>>F. D.
>>>>>>
>>>>>


Re: C++ computer delay

2019-02-21 Thread F.D.
Hi,

thread log of the client?

On Thu, Feb 21, 2019 at 10:29 AM Ilya Kasnacheev 
wrote:

> Hello!
>
> Can you collect some thread dumps (Java ones, using jstack) during those
> 10 seconds freezes?
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> ср, 20 февр. 2019 г. в 20:18, F.D. :
>
>> Hi igniters,
>> I've a problem when I launch a sequence of about 350 compute funcions in
>> my cluster of 10 node. I register a delay in the first launcher od about 10
>> sec. after that, it works smoothly.
>> If I launch the same numbers of task on a single node, there 's no delay.
>> It seems like a problem in the discovery process of the whole grid.
>>
>> Do you have any ideas?
>>
>> Thanks,
>>F. D.
>>
>


C++ computer delay

2019-02-20 Thread F.D.
Hi igniters,
I've a problem when I launch a sequence of about 350 compute funcions in my
cluster of 10 node. I register a delay in the first launcher od about 10
sec. after that, it works smoothly.
If I launch the same numbers of task on a single node, there 's no delay.
It seems like a problem in the discovery process of the whole grid.

Do you have any ideas?

Thanks,
   F. D.


Re: C++ GetCompute() error

2019-02-12 Thread F.D.
Yes Igor, you're right. It's a my fault.

Thank you,
   F. D.


Il giorno mar 12 feb 2019, 13:35 Igor Sapego  ha
scritto:

> Hi,
>
> This exception may happen when you try to register the same callback
> several times. It should not happen when you call GetCompute().
>
> Best Regards,
> Igor
>
>
> On Tue, Feb 12, 2019 at 2:37 PM F.D.  wrote:
>
>> Hi igniters,
>>
>> I'm trying to port my code from 2.6 to 2.7. And now when I try to get a
>> Compute (in C++) I got this error message:
>> *Trying to register multiple PRC callbacks with the same ID. [type=4,
>> id=94355077]*
>>
>> Can you help me, why I got this?
>>
>> Thanks,
>>F.D.
>>
>


C++ GetCompute() error

2019-02-12 Thread F.D.
Hi igniters,

I'm trying to port my code from 2.6 to 2.7. And now when I try to get a
Compute (in C++) I got this error message:
*Trying to register multiple PRC callbacks with the same ID. [type=4,
id=94355077]*

Can you help me, why I got this?

Thanks,
   F.D.


Re: Ignite and dynamic linking

2019-01-29 Thread F.D.
Hi Igor,

thanks for your reply, I've added this code:

Snippet

void Ignition::DestroyJVM()
{
   factoryLock.Enter();

   JniErrorInfo jniErr;

   SharedPointer ctx(JniContext::Create(0, 0,
JniHandlers(), &jniErr));

   IgniteError err;
   IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);

   if(err.GetCode() == IgniteError::IGNITE_SUCCESS)
  ctx.Get()->DestroyJvm();

   factoryLock.Leave();
}

And call it before the FreeLibrary(), now when I call the start I got a
unknow error. Any ideas?

Thanks,
   F.D.


On Mon, Jan 28, 2019 at 5:08 PM Igor Sapego  wrote:

> Hi,
>
> Currently, Ignite on start creates JVM instance internally, but
> it never stops it. Also, it currently can not work with already started
> JVM.
>
> So when you start Ignite the first time, it loads JVM, when you stop
> and unload it, the JVM remains loaded in process memory. When
> you start Ignite again, it discovers that JVM was already loaded, and
> as it can not work with pre-loaded JVM, it just returns you the error.
>
> To solve the issue, the following ticket should be implemented [1], but
> currently, it is not. As a workaround you may try to call
> JNI_DestroyJavaVM() after you have unloaded Ignite, I'm not sure
> of the result though. This is simply is not a use case we have tested.
>
> [1] - https://issues.apache.org/jira/browse/IGNITE-4618
>
> Best Regards,
> Igor
>
>
> On Mon, Jan 28, 2019 at 3:49 PM F.D.  wrote:
>
>> Hi Igniters,
>> I'm trying to use Ignite in a dll (using c++) that is dinamically loaded.
>> I wrapped the method start/end/... bihind a "c" pure interface that I
>> export.
>>
>> It works quite well. I can call the LoadLibrary and start a Ignite node.
>> I can stop it and restart it again smoothly.
>>
>> I've the problem when I LoadLibrary and then I call FreeLibrary (and
>> until here it works), but when I try to LoadLibrary again and to start the
>> node, I get the error: Failed to initialize JVM* [errCls=, errMsg=JVM
>> already created.]*
>>
>> Do you any ideas why I got this error?
>>
>> Thanks,
>>F.D.
>>
>


Ignite and dynamic linking

2019-01-28 Thread F.D.
Hi Igniters,
I'm trying to use Ignite in a dll (using c++) that is dinamically loaded. I
wrapped the method start/end/... bihind a "c" pure interface that I export.

It works quite well. I can call the LoadLibrary and start a Ignite node. I
can stop it and restart it again smoothly.

I've the problem when I LoadLibrary and then I call FreeLibrary (and until
here it works), but when I try to LoadLibrary again and to start the node,
I get the error: Failed to initialize JVM* [errCls=, errMsg=JVM already
created.]*

Do you any ideas why I got this error?

Thanks,
   F.D.


Re: Ignite .NET in docker (linux)?

2019-01-08 Thread F.D.
Ok.

Thank you vary much,
   F.D.

On Fri, Jan 4, 2019 at 6:38 PM Pavel Tupitsyn  wrote:

> I see.
>
> Anyway, try the new image, it is more properly built:
> contains published files instead of source code, and includes only runtime
> (not sdk/jdk).
>
> Thanks,
> Pavel
>
> On Fri, Jan 4, 2019 at 7:13 PM F.D.  wrote:
>
>> Yes I agree with you. The proxy is needed because in my office is present
>> a firewall. But from my host can use nuget without problems, I got errors
>> only in docker.
>>
>> Thanks,
>>   F.D.
>>
>>
>> On Fri, Jan 4, 2019 at 4:30 PM Pavel Tupitsyn 
>> wrote:
>>
>>> Looks like you have some network issues and NuGet repository can not be
>>> accessed.
>>> Can you describe your environment? Why is the proxy needed?
>>>
>>> Also I've built and pushed Ignite.NET docker image to my personal hub,
>>> maybe this helps?
>>> *docker run ptupitsyn/ignite:ignite-net*
>>>
>>> Source code: https://github.com/ptupitsyn/ignite-net-docker
>>>
>>> Thanks,
>>> Pavel
>>>
>>> On Thu, Jan 3, 2019 at 5:20 PM F.D.  wrote:
>>>
>>>> I've done some further steps.
>>>>
>>>> now the docker file is:
>>>> FROM microsoft/dotnet:2.1-sdk
>>>>
>>>> ENV http_proxy='http://10.0.75.1:3128'
>>>> ENV https_proxy='https://10.0.75.1:3128'
>>>>
>>>> WORKDIR /app
>>>>
>>>> RUN apt update && apt install default-jdk -y --no-install-recommends
>>>>
>>>> COPY *.csproj ./
>>>> COPY nuget.config ./
>>>>
>>>> RUN dotnet restore --configfile nuget.config
>>>>
>>>> COPY . ./
>>>> ENTRYPOINT ["dotnet", "run"]
>>>>
>>>>
>>>> I've added some env variables to permits to the apt to install the jdk.
>>>> But now I've a problem with nuget.
>>>> I added a configuration file:
>>>> 
>>>> 
>>>> http://10.0.75.1:3128"; />
>>>> 
>>>> 
>>>>
>>>> But I got this error message:
>>>>
>>>>  ---> Running in 1f6391892153
>>>>>   Restoring packages for /app/ignite-docker-test.csproj...
>>>>> /app/ignite-docker-test.csproj : error NU1100: Unable to resolve
>>>>> 'Apache.Ignite (>= 2.7.0)' for '.NETCoreApp,Version=v2.1'.
>>>>>   Generating MSBuild file
>>>>> /app/obj/ignite-docker-test.csproj.nuget.g.props.
>>>>>   Generating MSBuild file
>>>>> /app/obj/ignite-docker-test.csproj.nuget.g.targets.
>>>>>   Restore failed in 192.91 ms for /app/ignite-docker-test.csproj.
>>>>> The command '/bin/sh -c dotnet restore --configfile nuget.config'
>>>>> returned a non-zero code: 1
>>>>>
>>>>
>>>> If I remove
>>>> --configfile nuget.config
>>>>
>>>> I got this error:
>>>>
>>>>  ---> Running in 525375280b79
>>>>>   Restoring packages for /app/ignite-docker-test.csproj...
>>>>> /usr/share/dotnet/sdk/2.1.502/NuGet.targets(114,5): error : Unable to
>>>>> load the service index for source https://api.nuget.org/v3/index.json.
>>>>> [/app/ignite-docker-test.csproj]
>>>>> /usr/share/dotnet/sdk/2.1.502/NuGet.targets(114,5): error :   The SSL
>>>>> connection could not be established, see inner exception.
>>>>> [/app/ignite-docker-test.csproj]
>>>>> /usr/share/dotnet/sdk/2.1.502/NuGet.targets(114,5): error :   The
>>>>> remote certificate is invalid according to the validation procedure.
>>>>> [/app/ignite-docker-test.csproj]
>>>>> The command '/bin/sh -c dotnet restore' returned a non-zero code: 1
>>>>>
>>>>
>>>> In any case I cannot build the image. Can you help me?
>>>>
>>>> Thanks,
>>>>F.D.
>>>>
>>>> On Thu, Jan 3, 2019 at 10:19 AM F.D.  wrote:
>>>>
>>>>> Ok, so your idea is to build an image starting from Microsoft .NET
>>>>> image. Then you add the java jdk, and make a c# project that launch the
>>>>> ignite node, is it right?
>>>>>
>>>>> Can you clarify to me these lines:
>>>>>
>>>>> ...
>

Re: Ignite .NET in docker (linux)?

2019-01-04 Thread F.D.
Yes I agree with you. The proxy is needed because in my office is present a
firewall. But from my host can use nuget without problems, I got errors
only in docker.

Thanks,
  F.D.


On Fri, Jan 4, 2019 at 4:30 PM Pavel Tupitsyn  wrote:

> Looks like you have some network issues and NuGet repository can not be
> accessed.
> Can you describe your environment? Why is the proxy needed?
>
> Also I've built and pushed Ignite.NET docker image to my personal hub,
> maybe this helps?
> *docker run ptupitsyn/ignite:ignite-net*
>
> Source code: https://github.com/ptupitsyn/ignite-net-docker
>
> Thanks,
> Pavel
>
> On Thu, Jan 3, 2019 at 5:20 PM F.D.  wrote:
>
>> I've done some further steps.
>>
>> now the docker file is:
>> FROM microsoft/dotnet:2.1-sdk
>>
>> ENV http_proxy='http://10.0.75.1:3128'
>> ENV https_proxy='https://10.0.75.1:3128'
>>
>> WORKDIR /app
>>
>> RUN apt update && apt install default-jdk -y --no-install-recommends
>>
>> COPY *.csproj ./
>> COPY nuget.config ./
>>
>> RUN dotnet restore --configfile nuget.config
>>
>> COPY . ./
>> ENTRYPOINT ["dotnet", "run"]
>>
>>
>> I've added some env variables to permits to the apt to install the jdk.
>> But now I've a problem with nuget.
>> I added a configuration file:
>> 
>> 
>> http://10.0.75.1:3128"; />
>> 
>> 
>>
>> But I got this error message:
>>
>>  ---> Running in 1f6391892153
>>>   Restoring packages for /app/ignite-docker-test.csproj...
>>> /app/ignite-docker-test.csproj : error NU1100: Unable to resolve
>>> 'Apache.Ignite (>= 2.7.0)' for '.NETCoreApp,Version=v2.1'.
>>>   Generating MSBuild file
>>> /app/obj/ignite-docker-test.csproj.nuget.g.props.
>>>   Generating MSBuild file
>>> /app/obj/ignite-docker-test.csproj.nuget.g.targets.
>>>   Restore failed in 192.91 ms for /app/ignite-docker-test.csproj.
>>> The command '/bin/sh -c dotnet restore --configfile nuget.config'
>>> returned a non-zero code: 1
>>>
>>
>> If I remove
>> --configfile nuget.config
>>
>> I got this error:
>>
>>  ---> Running in 525375280b79
>>>   Restoring packages for /app/ignite-docker-test.csproj...
>>> /usr/share/dotnet/sdk/2.1.502/NuGet.targets(114,5): error : Unable to
>>> load the service index for source https://api.nuget.org/v3/index.json.
>>> [/app/ignite-docker-test.csproj]
>>> /usr/share/dotnet/sdk/2.1.502/NuGet.targets(114,5): error :   The SSL
>>> connection could not be established, see inner exception.
>>> [/app/ignite-docker-test.csproj]
>>> /usr/share/dotnet/sdk/2.1.502/NuGet.targets(114,5): error :   The remote
>>> certificate is invalid according to the validation procedure.
>>> [/app/ignite-docker-test.csproj]
>>> The command '/bin/sh -c dotnet restore' returned a non-zero code: 1
>>>
>>
>> In any case I cannot build the image. Can you help me?
>>
>> Thanks,
>>F.D.
>>
>> On Thu, Jan 3, 2019 at 10:19 AM F.D.  wrote:
>>
>>> Ok, so your idea is to build an image starting from Microsoft .NET
>>> image. Then you add the java jdk, and make a c# project that launch the
>>> ignite node, is it right?
>>>
>>> Can you clarify to me these lines:
>>>
>>> ...
>>> RUN dotnet restore
>>> ...
>>> ENTRYPOINT ["dotnet", "run"]
>>>
>>> thanks,
>>>F.D.
>>>
>>>
>>>
>>> On Fri, Dec 21, 2018 at 6:09 PM Pavel Tupitsyn 
>>> wrote:
>>>
>>>> Here is a gist to run Ignite.NET in Docker on Linux & .NET Core:
>>>> https://gist.github.com/ptupitsyn/1cbbdaef1fef7cc4be22addda19cade4
>>>>
>>>> Confirmed to work with Ignite.NET Client on Windows.
>>>>
>>>> Let me know if you need more info.
>>>> Looks like you use some event API with remote filters, make sure that
>>>> remote filter class is available on server node and registered in
>>>> BinaryConfiguration.
>>>> Same is true for any other code that is executed remotely.
>>>>
>>>> Thanks,
>>>> Pavel
>>>>
>>>> On Fri, Dec 21, 2018 at 2:14 PM F.D.  wrote:
>>>>
>>>>> Thanks for your support, but I need more informations. Let me try to
>>>>> give you more details:
>>&

Re: Ignite .NET in docker (linux)?

2019-01-03 Thread F.D.
I've done some further steps.

now the docker file is:
FROM microsoft/dotnet:2.1-sdk

ENV http_proxy='http://10.0.75.1:3128'
ENV https_proxy='https://10.0.75.1:3128'

WORKDIR /app

RUN apt update && apt install default-jdk -y --no-install-recommends

COPY *.csproj ./
COPY nuget.config ./

RUN dotnet restore --configfile nuget.config

COPY . ./
ENTRYPOINT ["dotnet", "run"]


I've added some env variables to permits to the apt to install the jdk. But
now I've a problem with nuget.
I added a configuration file:


http://10.0.75.1:3128"; />



But I got this error message:

 ---> Running in 1f6391892153
>   Restoring packages for /app/ignite-docker-test.csproj...
> /app/ignite-docker-test.csproj : error NU1100: Unable to resolve
> 'Apache.Ignite (>= 2.7.0)' for '.NETCoreApp,Version=v2.1'.
>   Generating MSBuild file /app/obj/ignite-docker-test.csproj.nuget.g.props.
>   Generating MSBuild file
> /app/obj/ignite-docker-test.csproj.nuget.g.targets.
>   Restore failed in 192.91 ms for /app/ignite-docker-test.csproj.
> The command '/bin/sh -c dotnet restore --configfile nuget.config' returned
> a non-zero code: 1
>

If I remove
--configfile nuget.config

I got this error:

 ---> Running in 525375280b79
>   Restoring packages for /app/ignite-docker-test.csproj...
> /usr/share/dotnet/sdk/2.1.502/NuGet.targets(114,5): error : Unable to load
> the service index for source https://api.nuget.org/v3/index.json.
> [/app/ignite-docker-test.csproj]
> /usr/share/dotnet/sdk/2.1.502/NuGet.targets(114,5): error :   The SSL
> connection could not be established, see inner exception.
> [/app/ignite-docker-test.csproj]
> /usr/share/dotnet/sdk/2.1.502/NuGet.targets(114,5): error :   The remote
> certificate is invalid according to the validation procedure.
> [/app/ignite-docker-test.csproj]
> The command '/bin/sh -c dotnet restore' returned a non-zero code: 1
>

In any case I cannot build the image. Can you help me?

Thanks,
   F.D.

On Thu, Jan 3, 2019 at 10:19 AM F.D.  wrote:

> Ok, so your idea is to build an image starting from Microsoft .NET image.
> Then you add the java jdk, and make a c# project that launch the ignite
> node, is it right?
>
> Can you clarify to me these lines:
>
> ...
> RUN dotnet restore
> ...
> ENTRYPOINT ["dotnet", "run"]
>
> thanks,
>F.D.
>
>
>
> On Fri, Dec 21, 2018 at 6:09 PM Pavel Tupitsyn 
> wrote:
>
>> Here is a gist to run Ignite.NET in Docker on Linux & .NET Core:
>> https://gist.github.com/ptupitsyn/1cbbdaef1fef7cc4be22addda19cade4
>>
>> Confirmed to work with Ignite.NET Client on Windows.
>>
>> Let me know if you need more info.
>> Looks like you use some event API with remote filters, make sure that
>> remote filter class is available on server node and registered in
>> BinaryConfiguration.
>> Same is true for any other code that is executed remotely.
>>
>> Thanks,
>> Pavel
>>
>> On Fri, Dec 21, 2018 at 2:14 PM F.D.  wrote:
>>
>>> Thanks for your support, but I need more informations. Let me try to
>>> give you more details:
>>> I've launched a ignite node on docker with this command:
>>>
>>> docker run -it --rm --name ignite --net=host apacheignite/ignite
>>>
>>> Then I try to connect to my dotnet client with this configuration:
>>> Snippet
>>>
>>> Ignite = Ignition.Start(new IgniteConfiguration
>>> {
>>>Localhost = Dns.GetHostName(),
>>>ClientMode = true,
>>>DiscoverySpi = new TcpDiscoverySpi
>>>{
>>>   IpFinder = new TcpDiscoveryMulticastIpFinder
>>>   {
>>>  LocalAddress = "AAA.BBB.CCC.DDD"
>>>   },
>>>   SocketTimeout = TimeSpan.FromSeconds(0.3)
>>>},
>>>IncludedEventTypes = EventType.CacheAll,
>>> });
>>>
>>> But I got this errors on the server node:
>>>
>>> [10:36:28,512][SEVERE][sys-stripe-2-#3][query] CacheEntryEventFilter
>>> failed: class o.a.i.IgniteException: Platforms are not available
>>> [nodeId=861e0f56-6a8b-4ff9-9ea0-a6e5c4d3126b] (Use
>>> Apache.Ignite.Core.Ignition.Start() or Apache.Ignite.exe to start
>>> Ignite.NET nodes; ignite::Ignition::Start() or ignite.exe to start Ignite
>>> C++ nodes).
>>>
>>> I suppose I should start the .NET Ignite (the thing that I did when I
>>> didn't use docker). Can you help me?
>>>
>>> Thanks,
>>>F.D.
>>>
>>>
>>>
>>> On Thu, Dec 20, 2018 a

Re: Ignite .NET in docker (linux)?

2019-01-03 Thread F.D.
Ok, so your idea is to build an image starting from Microsoft .NET image.
Then you add the java jdk, and make a c# project that launch the ignite
node, is it right?

Can you clarify to me these lines:

...
RUN dotnet restore
...
ENTRYPOINT ["dotnet", "run"]

thanks,
   F.D.



On Fri, Dec 21, 2018 at 6:09 PM Pavel Tupitsyn  wrote:

> Here is a gist to run Ignite.NET in Docker on Linux & .NET Core:
> https://gist.github.com/ptupitsyn/1cbbdaef1fef7cc4be22addda19cade4
>
> Confirmed to work with Ignite.NET Client on Windows.
>
> Let me know if you need more info.
> Looks like you use some event API with remote filters, make sure that
> remote filter class is available on server node and registered in
> BinaryConfiguration.
> Same is true for any other code that is executed remotely.
>
> Thanks,
> Pavel
>
> On Fri, Dec 21, 2018 at 2:14 PM F.D.  wrote:
>
>> Thanks for your support, but I need more informations. Let me try to give
>> you more details:
>> I've launched a ignite node on docker with this command:
>>
>> docker run -it --rm --name ignite --net=host apacheignite/ignite
>>
>> Then I try to connect to my dotnet client with this configuration:
>> Snippet
>>
>> Ignite = Ignition.Start(new IgniteConfiguration
>> {
>>Localhost = Dns.GetHostName(),
>>ClientMode = true,
>>DiscoverySpi = new TcpDiscoverySpi
>>{
>>   IpFinder = new TcpDiscoveryMulticastIpFinder
>>   {
>>  LocalAddress = "AAA.BBB.CCC.DDD"
>>   },
>>   SocketTimeout = TimeSpan.FromSeconds(0.3)
>>},
>>IncludedEventTypes = EventType.CacheAll,
>> });
>>
>> But I got this errors on the server node:
>>
>> [10:36:28,512][SEVERE][sys-stripe-2-#3][query] CacheEntryEventFilter
>> failed: class o.a.i.IgniteException: Platforms are not available
>> [nodeId=861e0f56-6a8b-4ff9-9ea0-a6e5c4d3126b] (Use
>> Apache.Ignite.Core.Ignition.Start() or Apache.Ignite.exe to start
>> Ignite.NET nodes; ignite::Ignition::Start() or ignite.exe to start Ignite
>> C++ nodes).
>>
>> I suppose I should start the .NET Ignite (the thing that I did when I
>> didn't use docker). Can you help me?
>>
>> Thanks,
>>F.D.
>>
>>
>>
>> On Thu, Dec 20, 2018 at 7:10 PM Pavel Tupitsyn 
>> wrote:
>>
>>> 1. Yes, Ignite.NET will run in Linux docker container under .NET Core.
>>> You can use microsoft/dotnet:sdk base image, install Java there (apt
>>> install default-jdk), and run your app
>>>
>>> 2. There are no Windows containers with Ignite
>>>
>>> Thanks,
>>> Pavel
>>>
>>> On Thu, Dec 20, 2018 at 4:07 PM Ilya Kasnacheev <
>>> ilya.kasnach...@gmail.com> wrote:
>>>
>>>> Hello!
>>>>
>>>> For the first question: There's no reason that you would not be able to
>>>> run Java, Mono or dotnet core Ignite node inside docket, connect to it with
>>>> C# client.
>>>>
>>>> Should be working as soon as you configure it properly.
>>>>
>>>> Regards,
>>>> --
>>>> Ilya Kasnacheev
>>>>
>>>>
>>>> чт, 20 дек. 2018 г. в 12:36, F.D. :
>>>>
>>>>> Hi Igniters,
>>>>> I'd like to know if is it possible to use ignite docker (with linux
>>>>> O.S.) and connect a ignite client in C#. I suppose no, is it?
>>>>>
>>>>> So the second question, is already present in the docker repository an
>>>>> image for Ignite .NET (with windows O.S.)?
>>>>>
>>>>> Thanks,
>>>>>   F.D.
>>>>>
>>>>


Re: Ignite .NET in docker (linux)?

2018-12-21 Thread F.D.
Thanks for your support, but I need more informations. Let me try to give
you more details:
I've launched a ignite node on docker with this command:

docker run -it --rm --name ignite --net=host apacheignite/ignite

Then I try to connect to my dotnet client with this configuration:
Snippet

Ignite = Ignition.Start(new IgniteConfiguration
{
   Localhost = Dns.GetHostName(),
   ClientMode = true,
   DiscoverySpi = new TcpDiscoverySpi
   {
  IpFinder = new TcpDiscoveryMulticastIpFinder
  {
 LocalAddress = "AAA.BBB.CCC.DDD"
  },
  SocketTimeout = TimeSpan.FromSeconds(0.3)
   },
   IncludedEventTypes = EventType.CacheAll,
});

But I got this errors on the server node:

[10:36:28,512][SEVERE][sys-stripe-2-#3][query] CacheEntryEventFilter
failed: class o.a.i.IgniteException: Platforms are not available
[nodeId=861e0f56-6a8b-4ff9-9ea0-a6e5c4d3126b] (Use
Apache.Ignite.Core.Ignition.Start() or Apache.Ignite.exe to start
Ignite.NET nodes; ignite::Ignition::Start() or ignite.exe to start Ignite
C++ nodes).

I suppose I should start the .NET Ignite (the thing that I did when I
didn't use docker). Can you help me?

Thanks,
   F.D.



On Thu, Dec 20, 2018 at 7:10 PM Pavel Tupitsyn  wrote:

> 1. Yes, Ignite.NET will run in Linux docker container under .NET Core.
> You can use microsoft/dotnet:sdk base image, install Java there (apt
> install default-jdk), and run your app
>
> 2. There are no Windows containers with Ignite
>
> Thanks,
> Pavel
>
> On Thu, Dec 20, 2018 at 4:07 PM Ilya Kasnacheev 
> wrote:
>
>> Hello!
>>
>> For the first question: There's no reason that you would not be able to
>> run Java, Mono or dotnet core Ignite node inside docket, connect to it with
>> C# client.
>>
>> Should be working as soon as you configure it properly.
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> чт, 20 дек. 2018 г. в 12:36, F.D. :
>>
>>> Hi Igniters,
>>> I'd like to know if is it possible to use ignite docker (with linux
>>> O.S.) and connect a ignite client in C#. I suppose no, is it?
>>>
>>> So the second question, is already present in the docker repository an
>>> image for Ignite .NET (with windows O.S.)?
>>>
>>> Thanks,
>>>   F.D.
>>>
>>


Ignite .NET in docker (linux)?

2018-12-20 Thread F.D.
Hi Igniters,
I'd like to know if is it possible to use ignite docker (with linux O.S.)
and connect a ignite client in C#. I suppose no, is it?

So the second question, is already present in the docker repository an
image for Ignite .NET (with windows O.S.)?

Thanks,
  F.D.


Re: Number of threads in computations

2018-09-19 Thread F.D.
Perfect.

Thanks,
   F.D.

On Wed, Sep 19, 2018 at 11:23 AM Evgenii Zhuravlev 
wrote:

> Hi,
>
> You can use set FifoCollisionSpi.parallelJobsNum:
> https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/spi/collision/fifoqueue/FifoQueueCollisionSpi.html
>
> Evgenii
>
> ср, 19 сент. 2018 г. в 11:22, F.D. :
>
>> Hi,
>>
>> I'd like to know if is it possible to limit the number of threads,
>> launched when a distubuted closure arrive to the server?
>>
>> thanks,
>>   F.D.
>>
>


Number of threads in computations

2018-09-19 Thread F.D.
Hi,

I'd like to know if is it possible to limit the number of threads, launched
when a distubuted closure arrive to the server?

thanks,
  F.D.


Re: How works an ignite node?

2018-09-05 Thread F.D.
Hi Eduard,

I'm looking for maximum  throughput  , I thought so, but I found that I've
the best performance with the same number of ignite instance as the cores.
I've more than 8000 distributed closures that I want to execute on my
ignite node. At the beginning of the execution the CPU is at 100% of
utilizzation, but after about a minute, it collapses to around 20%.

Consider that the execution spent 18 min with 1 node and 3 min with 16
nodes (my server has 16 core). Any ideas?



On Tue, Sep 4, 2018 at 5:49 PM Eduard Shangareev <
eduard.shangar...@gmail.com> wrote:

> Hi, F.D.
>
> >> One for each physical core?
> Definitely, not, because ignite node launches dozens of threads.
>
> To answer your question you need to provide your use case. And what
> exactly you want to achieve (max throughput, latency, maximum memory usage,
> with persistence or not) .
>
>
> On Tue, Sep 4, 2018 at 6:08 PM F.D.  wrote:
>
>> Hi igniters,
>>
>> I'm testing my client/server nodes using C++ distributed closures. So,
>> I've a question or you: on my server, where I launched my server node, how
>> many instance of server I've to launch? One for each physical core?
>>
>> What's the rule for an optimal performance?
>>
>> Thanks,
>>F.D.
>>
>


Re: C++ client only

2018-09-04 Thread F.D.
Sorry. You're right, I did a change in my code and it deceived me.

Thanks,
F.D.

On Tue, Sep 4, 2018 at 5:13 PM Igor Sapego  wrote:

> Hi,
>
> It's weird. How do you see that?
>
> Best Regards,
> Igor
>
>
> On Tue, Sep 4, 2018 at 5:26 PM F.D.  wrote:
>
>> Hi Igniters,
>>
>> I've my client (C++) and I want to send my computations (distritubuted
>> closures) on a server. I want to prevent my client from participating in
>> the calculation.
>>
>> I've inserted in the client configuration file this line:
>>
>>   
>>
>> but I continue to see that part of the distributed closures are
>> continuing to be executed on the client side.
>>
>> Is there any other configuration to do?
>>
>> Thanks,
>> F.D.
>>
>


How works an ignite node?

2018-09-04 Thread F.D.
Hi igniters,

I'm testing my client/server nodes using C++ distributed closures. So, I've
a question or you: on my server, where I launched my server node, how many
instance of server I've to launch? One for each physical core?

What's the rule for an optimal performance?

Thanks,
   F.D.


C++ client only

2018-09-04 Thread F.D.
Hi Igniters,

I've my client (C++) and I want to send my computations (distritubuted
closures) on a server. I want to prevent my client from participating in
the calculation.

I've inserted in the client configuration file this line:

  

but I continue to see that part of the distributed closures are continuing
to be executed on the client side.

Is there any other configuration to do?

Thanks,
F.D.


Re: How close client connection to server

2018-09-03 Thread F.D.
Forget it! There was another problem.

Thanks,
  F.D.

On Sat, Sep 1, 2018 at 12:11 AM F.D.  wrote:

> Hi,
>
> yes I tried and I got the same error.
>
> On Thu, Aug 30, 2018 at 6:33 PM Ilya Kasnacheev 
> wrote:
>
>> Hello!
>>
>> Have you tried Ignition::StopAll(false); ?
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> чт, 30 авг. 2018 г. в 13:04, F.D. :
>>
>>> Hi Igniters,
>>>
>>> when in my c++ client I close the connection to the server, after a
>>> computation, I got this error:
>>>
>>> [11:29:51,542][SEVERE][grid-nio-worker-tcp-comm-1-#34][TcpCommunicationSpi]
>>> Failed to process selector key
>>> [...]
>>> java.io.IOException: An existing connection was forcibly closed by the
>>> remote host  at
>>> sun.nio.ch.SocketDispatcher.read0(Native Method)
>>> at
>>> sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
>>>   at
>>> sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
>>>   at
>>> sun.nio.ch.IOUtil.read(IOUtil.java:192)
>>> at
>>> sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
>>>   at
>>> org.apache.ignite.internal.util.nio.GridNioServer$DirectNioClientWorker.processRead(GridNioServer.java:1250)
>>>
>>> at
>>> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.processSelectedKeysOptimized(GridNioServer.java:2339)
>>>
>>> at
>>> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:2110)
>>>
>>> at
>>> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1764)
>>>
>>> at
>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>  at java.lang.Thread.run(Thread.java:748)
>>>
>>>
>>> To close the client I use this statment:
>>>   Ignition::StopAll(true);
>>>
>>> Is it possibile to avoid this error?
>>>
>>> Thanks,
>>>   F.D.
>>>
>>>


Re: How close client connection to server

2018-08-31 Thread F.D.
Hi,

yes I tried and I got the same error.

On Thu, Aug 30, 2018 at 6:33 PM Ilya Kasnacheev 
wrote:

> Hello!
>
> Have you tried Ignition::StopAll(false); ?
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> чт, 30 авг. 2018 г. в 13:04, F.D. :
>
>> Hi Igniters,
>>
>> when in my c++ client I close the connection to the server, after a
>> computation, I got this error:
>>
>> [11:29:51,542][SEVERE][grid-nio-worker-tcp-comm-1-#34][TcpCommunicationSpi]
>> Failed to process selector key
>> [...]
>> java.io.IOException: An existing connection was forcibly closed by the
>> remote host  at
>> sun.nio.ch.SocketDispatcher.read0(Native Method)
>> at
>> sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
>>   at
>> sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
>>   at
>> sun.nio.ch.IOUtil.read(IOUtil.java:192)
>> at
>> sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
>>   at
>> org.apache.ignite.internal.util.nio.GridNioServer$DirectNioClientWorker.processRead(GridNioServer.java:1250)
>>
>> at
>> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.processSelectedKeysOptimized(GridNioServer.java:2339)
>>
>> at
>> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:2110)
>>
>> at
>> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1764)
>>
>> at
>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>  at java.lang.Thread.run(Thread.java:748)
>>
>>
>> To close the client I use this statment:
>>   Ignition::StopAll(true);
>>
>> Is it possibile to avoid this error?
>>
>> Thanks,
>>   F.D.
>>
>>


Re: Connection between servers.

2018-08-31 Thread F.D.
Perfect!

Thank you
F.D.

On Fri, Aug 31, 2018 at 12:19 PM dkarachentsev 
wrote:

> Hi,
>
> Usually it's enough to open ports for communication and discovery, thair
> default values: 47500 and 47100.
> If you run more than one node per pachine, you'll need to open a port
> range:
> 47500..47509 and 47100...47109.
>
> You always can configure other values [1, 2]
>
> [1]
>
> https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.html#setLocalPort-int-
> [2]
>
> https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.html#setLocalPort-int-
>
> Thanks!
> -Dmitry
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


How close client connection to server

2018-08-30 Thread F.D.
Hi Igniters,

when in my c++ client I close the connection to the server, after a
computation, I got this error:

[11:29:51,542][SEVERE][grid-nio-worker-tcp-comm-1-#34][TcpCommunicationSpi]
Failed to process selector key
[...]
java.io.IOException: An existing connection was forcibly closed by the
remote host  at
sun.nio.ch.SocketDispatcher.read0(Native Method)
at
sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
  at
sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
  at
sun.nio.ch.IOUtil.read(IOUtil.java:192)
at
sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
  at
org.apache.ignite.internal.util.nio.GridNioServer$DirectNioClientWorker.processRead(GridNioServer.java:1250)

at
org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.processSelectedKeysOptimized(GridNioServer.java:2339)

at
org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:2110)

at
org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1764)

at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
 at java.lang.Thread.run(Thread.java:748)


To close the client I use this statment:
  Ignition::StopAll(true);

Is it possibile to avoid this error?

Thanks,
  F.D.


Connection between servers.

2018-08-30 Thread F.D.
Hi igniters,

I've  problem of connections between the servers, so I'd like to know which
must be open to permit the communication.

Thanks,
   F.D.


Re: Distributed closure with buffer of binary data

2018-08-09 Thread F.D.
You're right! My fault!

On Thu, Aug 9, 2018 at 2:37 PM Ilya Kasnacheev 
wrote:

> Hello!
>
> WriteInt8Array accepts pointer and len, so I don't see why you have to
> pass char by char.
>
> Regards,
>
> --
> Ilya Kasnacheev
>
> 2018-08-09 1:32 GMT+03:00 F.D. :
>
>> Ok, but I think it's the same like WriteArray.
>>
>> For the moment I solved in a different way,using a encode/decode
>> functions.
>>
>> Thanks,
>>
>> On Wed, Aug 8, 2018 at 11:06 AM Ilya Kasnacheev <
>> ilya.kasnach...@gmail.com> wrote:
>>
>>> Hello!
>>>
>>> How about WriteInt8Array
>>> <https://ignite.apache.org/releases/latest/cppdoc/classignite_1_1binary_1_1BinaryWriter.html#ada15c20651157acfb8baeb5fe8df1b5d>
>>> ()?
>>>
>>> Regards,
>>>
>>> --
>>> Ilya Kasnacheev
>>>
>>> 2018-08-08 11:19 GMT+03:00 F.D. :
>>>
>>>> Hello Igniters,
>>>>
>>>> My distributed closures work perfectly when the inputs are strings, but
>>>> when I try to pass a buffer of bytes I got an error.
>>>>
>>>> The buffer of bytes arrives to me in a std::string but when I to
>>>> use BinaryWriter::WriteString the string is truncated (ok, it was
>>>> predictable). The question is there a method of BinaryWriter/BinaryReader
>>>> to handles with buffer of char? (I found WriteArray, but I've to pass char
>>>> by char).
>>>>
>>>> Thanks,
>>>> F.D.
>>>>
>>>
>>>
>


Re: Distributed closure with buffer of binary data

2018-08-08 Thread F.D.
Ok, but I think it's the same like WriteArray.

For the moment I solved in a different way,using a encode/decode functions.

Thanks,

On Wed, Aug 8, 2018 at 11:06 AM Ilya Kasnacheev 
wrote:

> Hello!
>
> How about WriteInt8Array
> <https://ignite.apache.org/releases/latest/cppdoc/classignite_1_1binary_1_1BinaryWriter.html#ada15c20651157acfb8baeb5fe8df1b5d>
> ()?
>
> Regards,
>
> --
> Ilya Kasnacheev
>
> 2018-08-08 11:19 GMT+03:00 F.D. :
>
>> Hello Igniters,
>>
>> My distributed closures work perfectly when the inputs are strings, but
>> when I try to pass a buffer of bytes I got an error.
>>
>> The buffer of bytes arrives to me in a std::string but when I to
>> use BinaryWriter::WriteString the string is truncated (ok, it was
>> predictable). The question is there a method of BinaryWriter/BinaryReader
>> to handles with buffer of char? (I found WriteArray, but I've to pass char
>> by char).
>>
>> Thanks,
>> F.D.
>>
>
>


Distributed closure with buffer of binary data

2018-08-08 Thread F.D.
Hello Igniters,

My distributed closures work perfectly when the inputs are strings, but
when I try to pass a buffer of bytes I got an error.

The buffer of bytes arrives to me in a std::string but when I to
use BinaryWriter::WriteString the string is truncated (ok, it was
predictable). The question is there a method of BinaryWriter/BinaryReader
to handles with buffer of char? (I found WriteArray, but I've to pass char
by char).

Thanks,
F.D.


Contribution on Ignite

2018-08-03 Thread F.D.
Hi Igniters,
I want to thank you because, my distrubuted closures are working perfectly!
Now I'd like to do a step further. What I really need are the API for
Service in C++. I already know that are missing, and maybe C++ is not your
first thought.
So, I'd like to try to contribute to the project trying to devel this part.
But I need your help because I've no idea where to start.

Thanks,
   F.D.


Re: Distribute closures error: "Operation cannot be performed in raw mode."

2018-08-02 Thread F.D.
Ok perfect!

F.D.

On Thu, Aug 2, 2018 at 3:11 PM Igor Sapego  wrote:

> You may also use rawWriter. The point is, you should
> not use non-raw user, when you already started using raw.
>
> Best Regards,
> Igor
>
>
> On Thu, Aug 2, 2018 at 3:58 PM F.D.  wrote:
>
>> My fault!!! I modified the code in this way:
>>
>>static void Write(BinaryWriter& writer, const Calculation& obj)
>>{
>>   writer.WriteBool("local_log", obj.local_log_);
>>   writer.WriteString("service_name", obj.service_name_);
>>
>>   auto sa_writer = writer.WriteStringArray("input");
>>   for(const auto &s : obj.input_)
>>  sa_writer.Write(s);
>>   sa_writer.Close();
>>}
>>
>>static void Read(BinaryReader& reader, Calculation& dst)
>>{
>>   dst.local_log_ = reader.ReadBool("local_log");
>>   dst.service_name_ = reader.ReadString("service_name");
>>
>>   auto sa_reader = reader.ReadStringArray("input");
>>   while(sa_reader.HasNext())
>>  dst.input_.push_back(sa_reader.GetNext());
>>}
>>
>> and now work perfectly!
>>
>> Sorry and thanks again!
>>F.D.
>>
>>
>>
>> On Thu, Aug 2, 2018 at 2:52 PM F.D.  wrote:
>>
>>> Here we go. Maybe the problem is the vector inside the
>>> class Calculation.
>>>
>>> namespace ignite {
>>> namespace binary {
>>>
>>> template<>
>>> struct BinaryType
>>> {
>>>static int32_t GetTypeId()
>>>{
>>>   return GetBinaryStringHashCode("Calculation");
>>>}
>>>
>>>static void GetTypeName(std::string& dst)
>>>{
>>>   dst = "Calculation";
>>>}
>>>
>>>static int32_t GetFieldId(const char* name)
>>>{
>>>   return GetBinaryStringHashCode(name);
>>>}
>>>
>>>static int32_t GetHashCode(const Calculation& obj)
>>>{
>>>   return 0;
>>>}
>>>
>>>static bool IsNull(const Calculation& obj)
>>>{
>>>   return false;
>>>}
>>>
>>>static void GetNull(Calculation& dst)
>>>{
>>>   dst = Calculation();
>>>}
>>>
>>>static void Write(BinaryWriter& writer, const Calculation& obj)
>>>{
>>>   writer.RawWriter().WriteBool(obj.local_log_);
>>>   writer.RawWriter().WriteString(obj.service_name_);
>>>
>>>   auto sa_writer = writer.WriteStringArray("input");
>>>   for(const auto &s : obj.input_)
>>>  sa_writer.Write(s);
>>>   sa_writer.Close();
>>>}
>>>
>>>static void Read(BinaryReader& reader, Calculation& dst)
>>>{
>>>   dst.local_log_ = reader.RawReader().ReadBool();
>>>   dst.service_name_ = reader.RawReader().ReadString();
>>>
>>>   auto sa_reader = reader.ReadStringArray("input");
>>>   while(sa_reader.HasNext())
>>>  dst.input_.push_back(sa_reader.GetNext());
>>>}
>>> };
>>>
>>> template<>
>>> struct BinaryType>
>>> {
>>>typedef std::vector value_type;
>>>
>>>static int32_t GetTypeId()
>>>{
>>>   return GetBinaryStringHashCode("VectorOfString");
>>>}
>>>
>>>static void GetTypeName(std::string& dst)
>>>{
>>>   dst = "VectorOfString";
>>>}
>>>
>>>static int32_t GetFieldId(const char* name)
>>>{
>>>   return GetBinaryStringHashCode(name);
>>>}
>>>
>>>    static int32_t GetHashCode(const std::vector &obj)
>>>{
>>>   return 0;
>>>}
>>>
>>>static bool IsNull(const std::vector &obj)
>>>{
>>>   return !obj.size();
>>>}
>>>
>>>static void GetNull(std::vector &dst)
>>>{
>>>   dst = value_type();
>>>}
>>>
>>>static void Write(BinaryWriter &writer, const
>>> std::vector &obj)
>>>{
>>>   auto sa_writer = writer.WriteStringArray("items");
>>>   for(const auto &s : o

Re: Distribute closures error: "Operation cannot be performed in raw mode."

2018-08-02 Thread F.D.
 My fault!!! I modified the code in this way:

   static void Write(BinaryWriter& writer, const Calculation& obj)
   {
  writer.WriteBool("local_log", obj.local_log_);
  writer.WriteString("service_name", obj.service_name_);

  auto sa_writer = writer.WriteStringArray("input");
  for(const auto &s : obj.input_)
 sa_writer.Write(s);
  sa_writer.Close();
   }

   static void Read(BinaryReader& reader, Calculation& dst)
   {
  dst.local_log_ = reader.ReadBool("local_log");
  dst.service_name_ = reader.ReadString("service_name");

  auto sa_reader = reader.ReadStringArray("input");
  while(sa_reader.HasNext())
 dst.input_.push_back(sa_reader.GetNext());
   }

and now work perfectly!

Sorry and thanks again!
   F.D.



On Thu, Aug 2, 2018 at 2:52 PM F.D.  wrote:

> Here we go. Maybe the problem is the vector inside the class
> Calculation.
>
> namespace ignite {
> namespace binary {
>
> template<>
> struct BinaryType
> {
>static int32_t GetTypeId()
>{
>   return GetBinaryStringHashCode("Calculation");
>}
>
>static void GetTypeName(std::string& dst)
>{
>   dst = "Calculation";
>}
>
>static int32_t GetFieldId(const char* name)
>{
>   return GetBinaryStringHashCode(name);
>}
>
>static int32_t GetHashCode(const Calculation& obj)
>{
>   return 0;
>}
>
>static bool IsNull(const Calculation& obj)
>{
>   return false;
>}
>
>static void GetNull(Calculation& dst)
>{
>   dst = Calculation();
>}
>
>static void Write(BinaryWriter& writer, const Calculation& obj)
>{
>   writer.RawWriter().WriteBool(obj.local_log_);
>   writer.RawWriter().WriteString(obj.service_name_);
>
>   auto sa_writer = writer.WriteStringArray("input");
>   for(const auto &s : obj.input_)
>  sa_writer.Write(s);
>   sa_writer.Close();
>}
>
>static void Read(BinaryReader& reader, Calculation& dst)
>{
>   dst.local_log_ = reader.RawReader().ReadBool();
>   dst.service_name_ = reader.RawReader().ReadString();
>
>   auto sa_reader = reader.ReadStringArray("input");
>   while(sa_reader.HasNext())
>  dst.input_.push_back(sa_reader.GetNext());
>}
> };
>
> template<>
> struct BinaryType>
> {
>typedef std::vector value_type;
>
>static int32_t GetTypeId()
>{
>   return GetBinaryStringHashCode("VectorOfString");
>}
>
>static void GetTypeName(std::string& dst)
>{
>   dst = "VectorOfString";
>}
>
>static int32_t GetFieldId(const char* name)
>{
>   return GetBinaryStringHashCode(name);
>}
>
>static int32_t GetHashCode(const std::vector &obj)
>{
>   return 0;
>}
>
>static bool IsNull(const std::vector &obj)
>{
>   return !obj.size();
>}
>
>static void GetNull(std::vector &dst)
>{
>   dst = value_type();
>}
>
>static void Write(BinaryWriter &writer, const std::vector
> &obj)
>{
>   auto sa_writer = writer.WriteStringArray("items");
>   for(const auto &s : obj)
>  sa_writer.Write(s);
>   sa_writer.Close();
>}
>
>    static void Read(BinaryReader &reader, std::vector &dst)
>{
>   auto sa_reader = reader.ReadStringArray("items");
>   while(sa_reader.HasNext())
>  dst.push_back(sa_reader.GetNext());
>}
> };
>
> } } // namespace ignite binary
>
> Thanks,
>F.D.
>
>
> On Thu, Aug 2, 2018 at 10:14 AM Igor Sapego  wrote:
>
>> Hi,
>>
>> Can you show how you define BinaryType? Because the error
>> you are receiving is related to serialization/deserialization process.
>>
>> Best Regards,
>> Igor
>>
>>
>> On Thu, Aug 2, 2018 at 9:15 AM F.D.  wrote:
>>
>>> Hi Igniters,
>>>
>>> finally, I've compiled my code and run my test. But after I call my
>>> closure I got this errors: "Operation cannot be performed in raw mode.",
>>> and unfortunally I've no idea what it does mean.
>>>
>>> This is the code of call:
>>>
>>> IgniteConfiguration cfg;
>>> std::string home = getenv("IGNITE_HOME");
>>> fs::path cfg_path = fs::path(home) / "platforms" / "cpp" /
>>> "client_config.xml";
>&

Re: Distribute closures error: "Operation cannot be performed in raw mode."

2018-08-02 Thread F.D.
Here we go. Maybe the problem is the vector inside the class
Calculation.

namespace ignite {
namespace binary {

template<>
struct BinaryType
{
   static int32_t GetTypeId()
   {
  return GetBinaryStringHashCode("Calculation");
   }

   static void GetTypeName(std::string& dst)
   {
  dst = "Calculation";
   }

   static int32_t GetFieldId(const char* name)
   {
  return GetBinaryStringHashCode(name);
   }

   static int32_t GetHashCode(const Calculation& obj)
   {
  return 0;
   }

   static bool IsNull(const Calculation& obj)
   {
  return false;
   }

   static void GetNull(Calculation& dst)
   {
  dst = Calculation();
   }

   static void Write(BinaryWriter& writer, const Calculation& obj)
   {
  writer.RawWriter().WriteBool(obj.local_log_);
  writer.RawWriter().WriteString(obj.service_name_);

  auto sa_writer = writer.WriteStringArray("input");
  for(const auto &s : obj.input_)
 sa_writer.Write(s);
  sa_writer.Close();
   }

   static void Read(BinaryReader& reader, Calculation& dst)
   {
  dst.local_log_ = reader.RawReader().ReadBool();
  dst.service_name_ = reader.RawReader().ReadString();

  auto sa_reader = reader.ReadStringArray("input");
  while(sa_reader.HasNext())
 dst.input_.push_back(sa_reader.GetNext());
   }
};

template<>
struct BinaryType>
{
   typedef std::vector value_type;

   static int32_t GetTypeId()
   {
  return GetBinaryStringHashCode("VectorOfString");
   }

   static void GetTypeName(std::string& dst)
   {
  dst = "VectorOfString";
   }

   static int32_t GetFieldId(const char* name)
   {
  return GetBinaryStringHashCode(name);
   }

   static int32_t GetHashCode(const std::vector &obj)
   {
  return 0;
   }

   static bool IsNull(const std::vector &obj)
   {
  return !obj.size();
   }

   static void GetNull(std::vector &dst)
   {
  dst = value_type();
   }

   static void Write(BinaryWriter &writer, const std::vector
&obj)
   {
  auto sa_writer = writer.WriteStringArray("items");
  for(const auto &s : obj)
 sa_writer.Write(s);
  sa_writer.Close();
   }

   static void Read(BinaryReader &reader, std::vector &dst)
   {
  auto sa_reader = reader.ReadStringArray("items");
  while(sa_reader.HasNext())
 dst.push_back(sa_reader.GetNext());
   }
};

} } // namespace ignite binary

Thanks,
   F.D.


On Thu, Aug 2, 2018 at 10:14 AM Igor Sapego  wrote:

> Hi,
>
> Can you show how you define BinaryType? Because the error
> you are receiving is related to serialization/deserialization process.
>
> Best Regards,
> Igor
>
>
> On Thu, Aug 2, 2018 at 9:15 AM F.D.  wrote:
>
>> Hi Igniters,
>>
>> finally, I've compiled my code and run my test. But after I call my
>> closure I got this errors: "Operation cannot be performed in raw mode.",
>> and unfortunally I've no idea what it does mean.
>>
>> This is the code of call:
>>
>> IgniteConfiguration cfg;
>> std::string home = getenv("IGNITE_HOME");
>> fs::path cfg_path = fs::path(home) / "platforms" / "cpp" /
>> "client_config.xml";
>> cfg.springCfgPath = cfg_path.string();
>>
>> ignite = Ignition::Start(cfg);
>>
>> IgniteBinding binding = ignite.GetBinding();
>> binding.RegisterComputeFunc();
>>
>> Compute compute = ignite.GetCompute();
>>
>> [...]
>>
>> Calculation functor(name, args, false);
>> auto fut = compute.CallAsync(functor);
>>
>> [...]
>>
>> And Calculation is:
>>
>> class CalculationEngineIgniteServer: public
>> ignite::compute::ComputeFunc
>> {
>>friend struct
>> ignite::binary::BinaryType;
>> public:
>>CalculationEngineIgniteServer(
>>) = default;
>>CalculationEngineIgniteServer(
>>   const std::string &name,
>>   const std::vector &input,
>>   bool localLog
>>);
>>
>>virtual std::string Call();
>>
>> private:
>>std::string name_;
>>bool local_log_;
>>
>>std::vector input_;
>> };
>>
>> Then I defined BinaryType for Calculation and for
>> std::vector. I don't understand where I miss.
>>
>> Thanks,
>> F.D.
>>
>>


Distribute closures error: "Operation cannot be performed in raw mode."

2018-08-01 Thread F.D.
Hi Igniters,

finally, I've compiled my code and run my test. But after I call my closure
I got this errors: "Operation cannot be performed in raw mode.", and
unfortunally I've no idea what it does mean.

This is the code of call:

IgniteConfiguration cfg;
std::string home = getenv("IGNITE_HOME");
fs::path cfg_path = fs::path(home) / "platforms" / "cpp" /
"client_config.xml";
cfg.springCfgPath = cfg_path.string();

ignite = Ignition::Start(cfg);

IgniteBinding binding = ignite.GetBinding();
binding.RegisterComputeFunc();

Compute compute = ignite.GetCompute();

[...]

Calculation functor(name, args, false);
auto fut = compute.CallAsync(functor);

[...]

And Calculation is:

class CalculationEngineIgniteServer: public
ignite::compute::ComputeFunc
{
   friend struct ignite::binary::BinaryType;
public:
   CalculationEngineIgniteServer(
   ) = default;
   CalculationEngineIgniteServer(
  const std::string &name,
  const std::vector &input,
  bool localLog
   );

   virtual std::string Call();

private:
   std::string name_;
   bool local_log_;

   std::vector input_;
};

Then I defined BinaryType for Calculation and for std::vector.
I don't understand where I miss.

Thanks,
F.D.


Re: Distributed closure and cache.

2018-07-31 Thread F.D.
Perfect!! You saved me!

Thanks,
   F.D.

On Tue, Jul 31, 2018 at 4:05 PM Dmitriy Govorukhin <
dmitriy.govoruk...@gmail.com> wrote:

> HI,
>
> Yes, you can. Try to do something like this
>
> ignite.compute().call(() -> {
> // Get local ignite instance (local in compute task).
> Ignite remoteIg = Ignition.localIgnite();
>
> IgniteCache cache = remoteIg.cache("cacheName");
>
> Object val = cache.get("someKey");
>
> return "result";
> });
>
> or use @IgniteInstanceResource.
>
> ignite.compute().call(new MyComputeTask());
>
> class MyComputeTask implements IgniteCallable {
> @IgniteInstanceResource
> private Ignite ignite;
>
> @Override public Object call() throws IgniteCheckedException {
>
> IgniteCache cache = remoteIg.cache("cacheName");
>
> Object val = cache.get("someKey");
>
> return "result";
>}
>  }
>
>
>
> On Tue, Jul 31, 2018 at 4:50 PM F.D.  wrote:
>
>> Hi,
>>
>> First, I want sat thank you for your job, and for the help you gave me.
>> I've a new question for you. I need to get a cache value inside the method
>> Call of my closure. Is it possibile?  I need to start a new node?!? (ignite
>> = Ignition::Start(cfg)) Can I use an already initialized variable?!?
>>
>> Thanks,
>>F.D.
>>
>


Distributed closure and cache.

2018-07-31 Thread F.D.
Hi,

First, I want sat thank you for your job, and for the help you gave me.
I've a new question for you. I need to get a cache value inside the method
Call of my closure. Is it possibile?  I need to start a new node?!? (ignite
= Ignition::Start(cfg)) Can I use an already initialized variable?!?

Thanks,
   F.D.


Logging in C++

2018-07-17 Thread F.D.
Hi,

I'm continuing to work on a distributed closure in C++, and this time I'm
wondering how you can do a remote logging.

Thanks,
   F.D.


Re: C++ Distribute Closure Failure

2018-06-07 Thread F.D.
How can I know if I'm waiting because my job is complex and it takes much
time, or because the node where it was running is crashed?

Regards,
   F.D.

On Thu, Jun 7, 2018 at 4:01 PM Igor Sapego  wrote:

> What do you mean by "failed"?
>
> Best Regards,
> Igor
>
> On Thu, Jun 7, 2018 at 2:33 PM, F.D.  wrote:
>
>> Hi,
>> when I launch a distibute closure calling the Call method or by RunAsync,
>> how can I check if the function is failed? Only by timeout?
>>
>> Thanks,
>>F.D.
>>
>
>


C++ Distribute Closure Failure

2018-06-07 Thread F.D.
Hi,
when I launch a distibute closure calling the Call method or by RunAsync,
how can I check if the function is failed? Only by timeout?

Thanks,
   F.D.


Re: BinaryStringArrayWriter / BinaryStringArrayReader

2018-06-07 Thread F.D.
Perfect!

Thanks
   F.D.

On Mon, Jun 4, 2018 at 12:38 PM Igor Sapego  wrote:

> Hi,
>
> Yes, you can use BinaryStringArrayWriter / BinaryStringArrayReader.
>
> No, to get BinaryStringArrayReader, you should use method
> BinaryReader::ReadStringArray(const char* fieldName);
>
> Best Regards,
> Igor
>
> On Sun, Jun 3, 2018 at 1:31 AM, F.D.  wrote:
>
>> Hi,
>>
>> I'm trying to develop a distributed closure in C++. The return type of my
>> closure is a std::vector>, so I think that I have to implement
>> a BinaryType to serialize it. The question is: in the Write and Read
>> methods can I use the BinaryStringArrayWriter / BinaryStringArrayReader or
>> I have to use my own solution?
>>
>> And If I can, the first argument (impl::binary::BinaryReaderImpl *impl)
>> is the first argoment of my method Read (BinaryReader &reader)?
>>
>> Thanks,
>>F.D.
>>
>
>


BinaryStringArrayWriter / BinaryStringArrayReader

2018-06-02 Thread F.D.
Hi,

I'm trying to develop a distributed closure in C++. The return type of my
closure is a std::vector>, so I think that I have to implement
a BinaryType to serialize it. The question is: in the Write and Read
methods can I use the BinaryStringArrayWriter / BinaryStringArrayReader or
I have to use my own solution?

And If I can, the first argument (impl::binary::BinaryReaderImpl *impl) is
the first argoment of my method Read (BinaryReader &reader)?

Thanks,
   F.D.


Re: C# client too slow to connect.

2018-05-24 Thread F.D.
Hi Yakov,

It works perfectly!

Thanks!!!

F.D.


On Thu, May 24, 2018 at 11:17 AM Yakov Zhdanov  wrote:

> Hi, slow node join is possible on windows machines which is related to
> tcp/ip stack differences from linux - windows implementation waits for the
> entire timeout which is 3000ms by defaull and linux returns immediately
> with "connection refuse".
>
> Just narrow the range - 10.200.20.90:47500..47509, try
> configuring the only 47500 port. This should help, since tcp discovery spi
> tries every address when searching for already started nodes.
>
> --Yakov
>
> 2018-05-23 10:11 GMT+03:00 F.D. :
>
>> Hi Pavel,
>>
>> Yes, but thin client cannot perform continuous query. Maybe is there an
>> alternative way to be notified when a cache change?
>>
>> On Tue, May 22, 2018 at 10:04 PM Pavel Tupitsyn 
>> wrote:
>>
>>> Hi,
>>>
>>> Have you tried Thin Client mode?
>>> https://apacheignite-net.readme.io/docs/thin-client
>>>
>>> Pavel
>>>
>>> On Tue, May 22, 2018 at 2:13 PM, F. D.  wrote:
>>>
>>>> Hi Igor,
>>>>
>>>> it's almost the same. I'm considering startup + connection. I'm using
>>>> Ignite 2.4.  The node excel is only client, and I have only a server node
>>>> on an other machine in my organization, and I cannot see particular
>>>> activity of cpu or network.
>>>>
>>>> Thanks,
>>>>F.D.
>>>>
>>>> On Tue, May 22, 2018 at 11:00 AM Igor Sapego 
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Try using "TcpDiscoveryStaticIpFinder" instead of
>>>>> "TcpDiscoveryMulticastIpFinder".
>>>>>
>>>>> Does it take 1 min for connection only or for start up + connection?
>>>>>
>>>>> Best Regards,
>>>>> Igor
>>>>>
>>>>> On Tue, May 22, 2018 at 11:45 AM, F. D. 
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I'm trying to use Ignite to develop an internal system of data
>>>>>> contribution. To do this, I'm launching Ignite inside Excel, and I'm 
>>>>>> using
>>>>>> the C# binding.
>>>>>>
>>>>>> When try to connect it consumes a lot of time (~1 min.),  this is my
>>>>>> simple app.config:
>>>>>>
>>>>>> 
>>>>>> 
>>>>>>
>>>>>>   >>>>> type="Apache.Ignite.Core.IgniteConfigurationSection, 
>>>>>> Apache.Ignite.Core"/>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection";
>>>>>> localhost="10.200.30.100" peerAssemblyLoadingMode="CurrentAppDomain"
>>>>>> gridName="IMIStreamer">
>>>>>>   
>>>>>>  
>>>>>>   
>>>>>>
>>>>>>   
>>>>>>
>>>>>>   
>>>>>>  
>>>>>> 
>>>>>>10.200.20.90:47500..47509
>>>>>> 
>>>>>>  
>>>>>>   
>>>>>>
>>>>>>
>>>>>>
>>>>>>   >>>>> sku=".NETFramework,Version=v4.5.2"/>
>>>>>>
>>>>>>
>>>>>> 
>>>>>>
>>>>>> Is it possibile to reduce this time of connection?
>>>>>> I've tried to use the thin client, but in this client there's no
>>>>>> continuous query (and need it, because I want to be reactive when a cache
>>>>>> change).
>>>>>>
>>>>>> Thanks in advance for your help,
>>>>>>F.D.
>>>>>>
>>>>>>
>>>>>
>>>
>


Re: C# client too slow to connect.

2018-05-23 Thread F.D.
Hi Pavel,

Yes, but thin client cannot perform continuous query. Maybe is there an
alternative way to be notified when a cache change?

On Tue, May 22, 2018 at 10:04 PM Pavel Tupitsyn 
wrote:

> Hi,
>
> Have you tried Thin Client mode?
> https://apacheignite-net.readme.io/docs/thin-client
>
> Pavel
>
> On Tue, May 22, 2018 at 2:13 PM, F. D.  wrote:
>
>> Hi Igor,
>>
>> it's almost the same. I'm considering startup + connection. I'm using
>> Ignite 2.4.  The node excel is only client, and I have only a server node
>> on an other machine in my organization, and I cannot see particular
>> activity of cpu or network.
>>
>> Thanks,
>>F.D.
>>
>> On Tue, May 22, 2018 at 11:00 AM Igor Sapego  wrote:
>>
>>> Hi,
>>>
>>> Try using "TcpDiscoveryStaticIpFinder" instead of
>>> "TcpDiscoveryMulticastIpFinder".
>>>
>>> Does it take 1 min for connection only or for start up + connection?
>>>
>>> Best Regards,
>>> Igor
>>>
>>> On Tue, May 22, 2018 at 11:45 AM, F. D.  wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm trying to use Ignite to develop an internal system of data
>>>> contribution. To do this, I'm launching Ignite inside Excel, and I'm using
>>>> the C# binding.
>>>>
>>>> When try to connect it consumes a lot of time (~1 min.),  this is my
>>>> simple app.config:
>>>>
>>>> 
>>>> 
>>>>
>>>>   >>> type="Apache.Ignite.Core.IgniteConfigurationSection, Apache.Ignite.Core"/>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection";
>>>> localhost="10.200.30.100" peerAssemblyLoadingMode="CurrentAppDomain"
>>>> gridName="IMIStreamer">
>>>>   
>>>>  
>>>>   
>>>>
>>>>   
>>>>
>>>>   
>>>>  
>>>> 
>>>>10.200.20.90:47500..47509
>>>> 
>>>>  
>>>>   
>>>>
>>>>
>>>>
>>>>   >>> sku=".NETFramework,Version=v4.5.2"/>
>>>>
>>>>
>>>> 
>>>>
>>>> Is it possibile to reduce this time of connection?
>>>> I've tried to use the thin client, but in this client there's no
>>>> continuous query (and need it, because I want to be reactive when a cache
>>>> change).
>>>>
>>>> Thanks in advance for your help,
>>>>F.D.
>>>>
>>>>
>>>
>