You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Sudhir Patil <pa...@gmail.com> on 2019/11/08 17:30:07 UTC

Ignite.Net Server & client node

Hi All,

In ignite.net server node stores cache data and a thin client communicates
with server to get cache data.

In such situations, post 1 request of cache data by thin client, does all
further requests still communicate with server or it stores that cache data
on thin client and server from there and do not communicate with server ??

Regards,
Sudhir


-- 
Thanks & Regards,
Sudhir Patil,
+91 9881095647.

Re: Ignite.Net Server & client node

Posted by Sudhir Patil <pa...@gmail.com>.
Iliya,

Thanks.

Regards,
Sudhir

On Monday, November 11, 2019, Ilya Kasnacheev <il...@gmail.com>
wrote:

> Hello!
>
> Oh! In this case there's not much to do, except maybe use something like
> EhCache for local opportunistic caching.
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> пн, 11 нояб. 2019 г. в 10:43, Pavel Tupitsyn <pt...@apache.org>:
>
>> Ilya, I think thin client was mentioned in the first post - near cache
>> does not do much for thin clients
>>
>> On Mon, Nov 11, 2019 at 10:23 AM Ilya Kasnacheev <
>> ilya.kasnacheev@gmail.com> wrote:
>>
>>> Hello!
>>>
>>> You can actually configure near cache to store these records alongside
>>> your client node:
>>>
>>> https://apacheignite-net.readme.io/docs/near-caches
>>>
>>> Regards,
>>> --
>>> Ilya Kasnacheev
>>>
>>>
>>> пт, 8 нояб. 2019 г. в 20:37, Sudhir Patil <pa...@gmail.com>:
>>>
>>>> Hi All,
>>>>
>>>> In ignite.net server node stores cache data and a thin client
>>>> communicates with server to get cache data.
>>>>
>>>> In such situations, post 1 request of cache data by thin client, does
>>>> all further requests still communicate with server or it stores that cache
>>>> data on thin client and server from there and do not communicate with
>>>> server ??
>>>>
>>>> Regards,
>>>> Sudhir
>>>>
>>>>
>>>> --
>>>> Thanks & Regards,
>>>> Sudhir Patil,
>>>> +91 9881095647.
>>>>
>>>

-- 
Thanks & Regards,
Sudhir Patil,
+91 9881095647.

Re: Ignite.Net Server & client node

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

Oh! In this case there's not much to do, except maybe use something like
EhCache for local opportunistic caching.

Regards,
-- 
Ilya Kasnacheev


пн, 11 нояб. 2019 г. в 10:43, Pavel Tupitsyn <pt...@apache.org>:

> Ilya, I think thin client was mentioned in the first post - near cache
> does not do much for thin clients
>
> On Mon, Nov 11, 2019 at 10:23 AM Ilya Kasnacheev <
> ilya.kasnacheev@gmail.com> wrote:
>
>> Hello!
>>
>> You can actually configure near cache to store these records alongside
>> your client node:
>>
>> https://apacheignite-net.readme.io/docs/near-caches
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> пт, 8 нояб. 2019 г. в 20:37, Sudhir Patil <pa...@gmail.com>:
>>
>>> Hi All,
>>>
>>> In ignite.net server node stores cache data and a thin client
>>> communicates with server to get cache data.
>>>
>>> In such situations, post 1 request of cache data by thin client, does
>>> all further requests still communicate with server or it stores that cache
>>> data on thin client and server from there and do not communicate with
>>> server ??
>>>
>>> Regards,
>>> Sudhir
>>>
>>>
>>> --
>>> Thanks & Regards,
>>> Sudhir Patil,
>>> +91 9881095647.
>>>
>>

Re: Ignite.Net Server & client node

Posted by Pavel Tupitsyn <pt...@apache.org>.
Ilya, I think thin client was mentioned in the first post - near cache does
not do much for thin clients

On Mon, Nov 11, 2019 at 10:23 AM Ilya Kasnacheev <il...@gmail.com>
wrote:

> Hello!
>
> You can actually configure near cache to store these records alongside
> your client node:
>
> https://apacheignite-net.readme.io/docs/near-caches
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> пт, 8 нояб. 2019 г. в 20:37, Sudhir Patil <pa...@gmail.com>:
>
>> Hi All,
>>
>> In ignite.net server node stores cache data and a thin client
>> communicates with server to get cache data.
>>
>> In such situations, post 1 request of cache data by thin client, does all
>> further requests still communicate with server or it stores that cache data
>> on thin client and server from there and do not communicate with server ??
>>
>> Regards,
>> Sudhir
>>
>>
>> --
>> Thanks & Regards,
>> Sudhir Patil,
>> +91 9881095647.
>>
>

Re: Ignite.Net Server & client node

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

You can actually configure near cache to store these records alongside your
client node:

https://apacheignite-net.readme.io/docs/near-caches

Regards,
-- 
Ilya Kasnacheev


пт, 8 нояб. 2019 г. в 20:37, Sudhir Patil <pa...@gmail.com>:

> Hi All,
>
> In ignite.net server node stores cache data and a thin client
> communicates with server to get cache data.
>
> In such situations, post 1 request of cache data by thin client, does all
> further requests still communicate with server or it stores that cache data
> on thin client and server from there and do not communicate with server ??
>
> Regards,
> Sudhir
>
>
> --
> Thanks & Regards,
> Sudhir Patil,
> +91 9881095647.
>

Re: Ignite.Net Server & client node

Posted by Sudhir Patil <pa...@gmail.com>.
Thanks Pavel. I will look into those.

Regards
Sudhir

On Wednesday, November 13, 2019, Pavel Tupitsyn <pt...@apache.org>
wrote:

> Sure, you can query multiple items as well in various ways - see
> ICache.Query method [1]
> ICache is also IEnumerable, so you can iterate over entire contents, and
> even call ToList/ToArray on it for smaller caches.
>
> [1] https://apacheignite-net.readme.io/docs/cache-queries
>
> On Tue, Nov 12, 2019 at 7:20 PM Sudhir Patil <pa...@gmail.com>
> wrote:
>
>> Thanks Pavel.
>>  I want both - both whole list and individual items within that list to
>> be queried from cache. Hence was asking on that side.
>>
>> Regards,
>> Sudhir
>>
>> On Monday, November 11, 2019, Pavel Tupitsyn <pt...@apache.org>
>> wrote:
>>
>>> As I understood, you store the whole list of 10000 employees as a single
>>> object:
>>> cache[key] = GetAllEmployees();
>>>
>>> Instead, try storing every employee object separately:
>>> foreach (var employee in GetAllEmployees())
>>>     cache.Put(employee.Id, employee)
>>>
>>> This way you can retrieve individual employees quickly with
>>> cache.Get(1500)
>>>
>>> P.S: the foreach loop above explains the concept, but more efficient
>>> version is:
>>> cache.PutAll(GetAllEmployees().Select(e => new KeyValuePair<long,
>>> Employee>(e.Id, e))
>>>
>>> On Mon, Nov 11, 2019 at 7:44 PM Sudhir Patil <pa...@gmail.com>
>>> wrote:
>>>
>>>> Hi Pavel,
>>>>
>>>> Scenario is - i am caching list of let's say 10000 employee poco class
>>>> objects with name 'employeeCache'.
>>>> Now, from this cache, I want to get employee object with id 1500.
>>>> 1) For this what is fastest & efficient way ?
>>>> Simple one is get full cache data i.e. 'employeeCache' object and then
>>>> find employee with id 1500 using link etc.
>>>> Or there is another efficient way ?
>>>>
>>>> 2) for 1st request / any subsequent Get request of this cache, does it
>>>> connect with server node?
>>>>
>>>> Regards,
>>>> Sudhir
>>>>
>>>> On Friday, November 8, 2019, Pavel Tupitsyn <pt...@apache.org>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Every request is communicated to the server, there is no "local cache"
>>>>> or anything like that.
>>>>>
>>>>> On Fri, Nov 8, 2019 at 8:37 PM Sudhir Patil <pa...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> In ignite.net server node stores cache data and a thin client
>>>>>> communicates with server to get cache data.
>>>>>>
>>>>>> In such situations, post 1 request of cache data by thin client, does
>>>>>> all further requests still communicate with server or it stores that cache
>>>>>> data on thin client and server from there and do not communicate with
>>>>>> server ??
>>>>>>
>>>>>> Regards,
>>>>>> Sudhir
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Thanks & Regards,
>>>>>> Sudhir Patil,
>>>>>> +91 9881095647.
>>>>>>
>>>>>
>>>>
>>>> --
>>>> Thanks & Regards,
>>>> Sudhir Patil,
>>>> +91 9881095647.
>>>>
>>>
>>
>> --
>> Thanks & Regards,
>> Sudhir Patil,
>> +91 9881095647.
>>
>

-- 
Thanks & Regards,
Sudhir Patil,
+91 9881095647.

Re: Ignite.Net Server & client node

Posted by Pavel Tupitsyn <pt...@apache.org>.
Sure, you can query multiple items as well in various ways - see
ICache.Query method [1]
ICache is also IEnumerable, so you can iterate over entire contents, and
even call ToList/ToArray on it for smaller caches.

[1] https://apacheignite-net.readme.io/docs/cache-queries

On Tue, Nov 12, 2019 at 7:20 PM Sudhir Patil <pa...@gmail.com>
wrote:

> Thanks Pavel.
>  I want both - both whole list and individual items within that list to be
> queried from cache. Hence was asking on that side.
>
> Regards,
> Sudhir
>
> On Monday, November 11, 2019, Pavel Tupitsyn <pt...@apache.org> wrote:
>
>> As I understood, you store the whole list of 10000 employees as a single
>> object:
>> cache[key] = GetAllEmployees();
>>
>> Instead, try storing every employee object separately:
>> foreach (var employee in GetAllEmployees())
>>     cache.Put(employee.Id, employee)
>>
>> This way you can retrieve individual employees quickly with
>> cache.Get(1500)
>>
>> P.S: the foreach loop above explains the concept, but more efficient
>> version is:
>> cache.PutAll(GetAllEmployees().Select(e => new KeyValuePair<long,
>> Employee>(e.Id, e))
>>
>> On Mon, Nov 11, 2019 at 7:44 PM Sudhir Patil <pa...@gmail.com>
>> wrote:
>>
>>> Hi Pavel,
>>>
>>> Scenario is - i am caching list of let's say 10000 employee poco class
>>> objects with name 'employeeCache'.
>>> Now, from this cache, I want to get employee object with id 1500.
>>> 1) For this what is fastest & efficient way ?
>>> Simple one is get full cache data i.e. 'employeeCache' object and then
>>> find employee with id 1500 using link etc.
>>> Or there is another efficient way ?
>>>
>>> 2) for 1st request / any subsequent Get request of this cache, does it
>>> connect with server node?
>>>
>>> Regards,
>>> Sudhir
>>>
>>> On Friday, November 8, 2019, Pavel Tupitsyn <pt...@apache.org>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> Every request is communicated to the server, there is no "local cache"
>>>> or anything like that.
>>>>
>>>> On Fri, Nov 8, 2019 at 8:37 PM Sudhir Patil <pa...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> In ignite.net server node stores cache data and a thin client
>>>>> communicates with server to get cache data.
>>>>>
>>>>> In such situations, post 1 request of cache data by thin client, does
>>>>> all further requests still communicate with server or it stores that cache
>>>>> data on thin client and server from there and do not communicate with
>>>>> server ??
>>>>>
>>>>> Regards,
>>>>> Sudhir
>>>>>
>>>>>
>>>>> --
>>>>> Thanks & Regards,
>>>>> Sudhir Patil,
>>>>> +91 9881095647.
>>>>>
>>>>
>>>
>>> --
>>> Thanks & Regards,
>>> Sudhir Patil,
>>> +91 9881095647.
>>>
>>
>
> --
> Thanks & Regards,
> Sudhir Patil,
> +91 9881095647.
>

Re: Ignite.Net Server & client node

Posted by Sudhir Patil <pa...@gmail.com>.
Thanks Pavel.
 I want both - both whole list and individual items within that list to be
queried from cache. Hence was asking on that side.

Regards,
Sudhir

On Monday, November 11, 2019, Pavel Tupitsyn <pt...@apache.org> wrote:

> As I understood, you store the whole list of 10000 employees as a single
> object:
> cache[key] = GetAllEmployees();
>
> Instead, try storing every employee object separately:
> foreach (var employee in GetAllEmployees())
>     cache.Put(employee.Id, employee)
>
> This way you can retrieve individual employees quickly with cache.Get(1500)
>
> P.S: the foreach loop above explains the concept, but more efficient
> version is:
> cache.PutAll(GetAllEmployees().Select(e => new KeyValuePair<long,
> Employee>(e.Id, e))
>
> On Mon, Nov 11, 2019 at 7:44 PM Sudhir Patil <pa...@gmail.com>
> wrote:
>
>> Hi Pavel,
>>
>> Scenario is - i am caching list of let's say 10000 employee poco class
>> objects with name 'employeeCache'.
>> Now, from this cache, I want to get employee object with id 1500.
>> 1) For this what is fastest & efficient way ?
>> Simple one is get full cache data i.e. 'employeeCache' object and then
>> find employee with id 1500 using link etc.
>> Or there is another efficient way ?
>>
>> 2) for 1st request / any subsequent Get request of this cache, does it
>> connect with server node?
>>
>> Regards,
>> Sudhir
>>
>> On Friday, November 8, 2019, Pavel Tupitsyn <pt...@apache.org> wrote:
>>
>>> Hi,
>>>
>>> Every request is communicated to the server, there is no "local cache"
>>> or anything like that.
>>>
>>> On Fri, Nov 8, 2019 at 8:37 PM Sudhir Patil <pa...@gmail.com>
>>> wrote:
>>>
>>>> Hi All,
>>>>
>>>> In ignite.net server node stores cache data and a thin client
>>>> communicates with server to get cache data.
>>>>
>>>> In such situations, post 1 request of cache data by thin client, does
>>>> all further requests still communicate with server or it stores that cache
>>>> data on thin client and server from there and do not communicate with
>>>> server ??
>>>>
>>>> Regards,
>>>> Sudhir
>>>>
>>>>
>>>> --
>>>> Thanks & Regards,
>>>> Sudhir Patil,
>>>> +91 9881095647.
>>>>
>>>
>>
>> --
>> Thanks & Regards,
>> Sudhir Patil,
>> +91 9881095647.
>>
>

-- 
Thanks & Regards,
Sudhir Patil,
+91 9881095647.

Re: Ignite.Net Server & client node

Posted by Pavel Tupitsyn <pt...@apache.org>.
As I understood, you store the whole list of 10000 employees as a single
object:
cache[key] = GetAllEmployees();

Instead, try storing every employee object separately:
foreach (var employee in GetAllEmployees())
    cache.Put(employee.Id, employee)

This way you can retrieve individual employees quickly with cache.Get(1500)

P.S: the foreach loop above explains the concept, but more efficient
version is:
cache.PutAll(GetAllEmployees().Select(e => new KeyValuePair<long,
Employee>(e.Id, e))

On Mon, Nov 11, 2019 at 7:44 PM Sudhir Patil <pa...@gmail.com>
wrote:

> Hi Pavel,
>
> Scenario is - i am caching list of let's say 10000 employee poco class
> objects with name 'employeeCache'.
> Now, from this cache, I want to get employee object with id 1500.
> 1) For this what is fastest & efficient way ?
> Simple one is get full cache data i.e. 'employeeCache' object and then
> find employee with id 1500 using link etc.
> Or there is another efficient way ?
>
> 2) for 1st request / any subsequent Get request of this cache, does it
> connect with server node?
>
> Regards,
> Sudhir
>
> On Friday, November 8, 2019, Pavel Tupitsyn <pt...@apache.org> wrote:
>
>> Hi,
>>
>> Every request is communicated to the server, there is no "local cache" or
>> anything like that.
>>
>> On Fri, Nov 8, 2019 at 8:37 PM Sudhir Patil <pa...@gmail.com>
>> wrote:
>>
>>> Hi All,
>>>
>>> In ignite.net server node stores cache data and a thin client
>>> communicates with server to get cache data.
>>>
>>> In such situations, post 1 request of cache data by thin client, does
>>> all further requests still communicate with server or it stores that cache
>>> data on thin client and server from there and do not communicate with
>>> server ??
>>>
>>> Regards,
>>> Sudhir
>>>
>>>
>>> --
>>> Thanks & Regards,
>>> Sudhir Patil,
>>> +91 9881095647.
>>>
>>
>
> --
> Thanks & Regards,
> Sudhir Patil,
> +91 9881095647.
>

Re: Ignite.Net Server & client node

Posted by Sudhir Patil <pa...@gmail.com>.
Hi Pavel,

Scenario is - i am caching list of let's say 10000 employee poco class
objects with name 'employeeCache'.
Now, from this cache, I want to get employee object with id 1500.
1) For this what is fastest & efficient way ?
Simple one is get full cache data i.e. 'employeeCache' object and then find
employee with id 1500 using link etc.
Or there is another efficient way ?

2) for 1st request / any subsequent Get request of this cache, does it
connect with server node?

Regards,
Sudhir

On Friday, November 8, 2019, Pavel Tupitsyn <pt...@apache.org> wrote:

> Hi,
>
> Every request is communicated to the server, there is no "local cache" or
> anything like that.
>
> On Fri, Nov 8, 2019 at 8:37 PM Sudhir Patil <pa...@gmail.com>
> wrote:
>
>> Hi All,
>>
>> In ignite.net server node stores cache data and a thin client
>> communicates with server to get cache data.
>>
>> In such situations, post 1 request of cache data by thin client, does all
>> further requests still communicate with server or it stores that cache data
>> on thin client and server from there and do not communicate with server ??
>>
>> Regards,
>> Sudhir
>>
>>
>> --
>> Thanks & Regards,
>> Sudhir Patil,
>> +91 9881095647.
>>
>

-- 
Thanks & Regards,
Sudhir Patil,
+91 9881095647.

Re: Ignite.Net Server & client node

Posted by Pavel Tupitsyn <pt...@apache.org>.
Sudhir, I'm not sure I fully understand the question.

You certainly don't have to fetch 1 million objects when you need only one.
- If you have a key, use ICache.Get, it is the fastest API to get a single
value.
- If you don't have a key, but rather want to search for something (e.g.
find a Person by Name), use queries. SQL with proper index is your best bet.

If you describe your use case in more detail, I can give more
recommendations.

Thanks,
Pavel

On Sun, Nov 10, 2019 at 6:47 AM Sudhir Patil <pa...@gmail.com>
wrote:

> Hi Pavel,
>
> Thank you for details. Is there a way to improve performance in such
> subsequent requests ?
>
> Scenario is - lets say cache is storing data e.g. 1 million list of custom
> poco class objects. Now it needs only one specific poco object out of it.
> Here this operation would fetch full cache i.e. 1 million rows then filter
> that specific object.
>
> I read about cache querying here -
> https://apacheignite.readme.io/docs/cache-queries
>
> Now question is does this cache query asks
> 1) for full data first & then filter or
> 2) it is optimized enough to query server to get only 1 object and not
> like 1)
>
> On Friday, November 8, 2019, Pavel Tupitsyn <pt...@apache.org> wrote:
>
>> Hi,
>>
>> Every request is communicated to the server, there is no "local cache" or
>> anything like that.
>>
>> On Fri, Nov 8, 2019 at 8:37 PM Sudhir Patil <pa...@gmail.com>
>> wrote:
>>
>>> Hi All,
>>>
>>> In ignite.net server node stores cache data and a thin client
>>> communicates with server to get cache data.
>>>
>>> In such situations, post 1 request of cache data by thin client, does
>>> all further requests still communicate with server or it stores that cache
>>> data on thin client and server from there and do not communicate with
>>> server ??
>>>
>>> Regards,
>>> Sudhir
>>>
>>>
>>> --
>>> Thanks & Regards,
>>> Sudhir Patil,
>>> +91 9881095647.
>>>
>>
>
> --
> Thanks & Regards,
> Sudhir Patil,
> +91 9881095647.
>

Ignite.Net Server & client node

Posted by Sudhir Patil <pa...@gmail.com>.
Hi Pavel,

Thank you for details. Is there a way to improve performance in such
subsequent requests ?

Scenario is - lets say cache is storing data e.g. 1 million list of custom
poco class objects. Now it needs only one specific poco object out of it.
Here this operation would fetch full cache i.e. 1 million rows then filter
that specific object.

I read about cache querying here -
https://apacheignite.readme.io/docs/cache-queries

Now question is does this cache query asks
1) for full data first & then filter or
2) it is optimized enough to query server to get only 1 object and not like
1)

On Friday, November 8, 2019, Pavel Tupitsyn <pt...@apache.org> wrote:

> Hi,
>
> Every request is communicated to the server, there is no "local cache" or
> anything like that.
>
> On Fri, Nov 8, 2019 at 8:37 PM Sudhir Patil <pa...@gmail.com>
> wrote:
>
>> Hi All,
>>
>> In ignite.net server node stores cache data and a thin client
>> communicates with server to get cache data.
>>
>> In such situations, post 1 request of cache data by thin client, does all
>> further requests still communicate with server or it stores that cache data
>> on thin client and server from there and do not communicate with server ??
>>
>> Regards,
>> Sudhir
>>
>>
>> --
>> Thanks & Regards,
>> Sudhir Patil,
>> +91 9881095647.
>>
>

-- 
Thanks & Regards,
Sudhir Patil,
+91 9881095647.

Re: Ignite.Net Server & client node

Posted by Pavel Tupitsyn <pt...@apache.org>.
Hi,

Every request is communicated to the server, there is no "local cache" or
anything like that.

On Fri, Nov 8, 2019 at 8:37 PM Sudhir Patil <pa...@gmail.com> wrote:

> Hi All,
>
> In ignite.net server node stores cache data and a thin client
> communicates with server to get cache data.
>
> In such situations, post 1 request of cache data by thin client, does all
> further requests still communicate with server or it stores that cache data
> on thin client and server from there and do not communicate with server ??
>
> Regards,
> Sudhir
>
>
> --
> Thanks & Regards,
> Sudhir Patil,
> +91 9881095647.
>