Ignite.Net Server & client node

classic Classic list List threaded Threaded
13 messages Options
SudhirPatil SudhirPatil
Reply | Threaded
Open this post in threaded view
|

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.
ptupitsyn ptupitsyn
Reply | Threaded
Open this post in threaded view
|

Re: Ignite.Net Server & client node

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 <[hidden email]> 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.
SudhirPatil SudhirPatil
Reply | Threaded
Open this post in threaded view
|

Ignite.Net Server & client node

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 <[hidden email]> 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 <[hidden email]> 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.
ptupitsyn ptupitsyn
Reply | Threaded
Open this post in threaded view
|

Re: Ignite.Net Server & client node

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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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.
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: Ignite.Net Server & client node

In reply to this post by SudhirPatil
Hello!

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


Regards,
--
Ilya Kasnacheev


пт, 8 нояб. 2019 г. в 20:37, Sudhir Patil <[hidden email]>:
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.
ptupitsyn ptupitsyn
Reply | Threaded
Open this post in threaded view
|

Re: Ignite.Net Server & client node

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 <[hidden email]> wrote:
Hello!

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


Regards,
--
Ilya Kasnacheev


пт, 8 нояб. 2019 г. в 20:37, Sudhir Patil <[hidden email]>:
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.
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: Ignite.Net Server & client node

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 <[hidden email]>:
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 <[hidden email]> wrote:
Hello!

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


Regards,
--
Ilya Kasnacheev


пт, 8 нояб. 2019 г. в 20:37, Sudhir Patil <[hidden email]>:
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.
SudhirPatil SudhirPatil
Reply | Threaded
Open this post in threaded view
|

Re: Ignite.Net Server & client node

Iliya,

Thanks.

Regards,
Sudhir

On Monday, November 11, 2019, Ilya Kasnacheev <[hidden email]> 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 <[hidden email]>:
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 <[hidden email]> wrote:
Hello!

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


Regards,
--
Ilya Kasnacheev


пт, 8 нояб. 2019 г. в 20:37, Sudhir Patil <[hidden email]>:
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.
SudhirPatil SudhirPatil
Reply | Threaded
Open this post in threaded view
|

Re: Ignite.Net Server & client node

In reply to this post by ptupitsyn
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 <[hidden email]> 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 <[hidden email]> 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.
ptupitsyn ptupitsyn
Reply | Threaded
Open this post in threaded view
|

Re: Ignite.Net Server & client node

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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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.
SudhirPatil SudhirPatil
Reply | Threaded
Open this post in threaded view
|

Re: Ignite.Net Server & client node

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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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.
ptupitsyn ptupitsyn
Reply | Threaded
Open this post in threaded view
|

Re: Ignite.Net Server & client node

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.

On Tue, Nov 12, 2019 at 7:20 PM Sudhir Patil <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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.
SudhirPatil SudhirPatil
Reply | Threaded
Open this post in threaded view
|

Re: Ignite.Net Server & client node

Thanks Pavel. I will look into those.

Regards
Sudhir

On Wednesday, November 13, 2019, Pavel Tupitsyn <[hidden email]> 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.

On Tue, Nov 12, 2019 at 7:20 PM Sudhir Patil <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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.