Re: Can we set TTL (expiry time) of a key-value from thin client?

2020-05-19 Thread scriptnull
Awesome, that's exactly the information that I needed. So we will have to set
the flag byte while doing OP_CACHE_PUT.

Do you know by any chance if there is support for setting expire times for
multiple key-values while doing a OP_CACHE_PUT_ALL (opcode: 1004) operation?
I am guessing the answer is no.

Regards,
Vishnu Bharathi P



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Can we set TTL (expiry time) of a key-value from thin client?

2020-05-19 Thread scriptnull
Hi,

I am referring to any of the thin clients (java/.net/c++/node.js/python/php)
documented at https://apacheignite.readme.io/docs/thin-clients

I wonder if any of those thin clients have an API to set TTL for a key-value
in a cache. If so I can reverse engineer the implementation of it and
implement it in the ruby thin client implementation that I am currently
working on.

More specifically, I am interested in knowing if there is an operation in
binary protocol like OP_CACHE_UPDATE_TTL

If there is such an operation, I could call it via a ruby thin client
implementation that I am working on currently.

Regards,
Vishnu Bharathi P



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Can we set TTL (expiry time) of a key-value from thin client?

2020-05-18 Thread scriptnull
I would like to break down this question into two questions.

1. Can we have key-values with different expire times in the same cache? (I
think the answer for this is yes, because the redis layer in ignite allows
for this)

2. I am trying to build a ruby thin client for Apache Ignite and got a basic
prototype in place. But I couldn't find an operation in binary protocol
documentation that will enable us to set TTL for a key-value pair.  So, any
idea on how to set TTL via the binary protocol?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


How to list caches and the number of key-values inside them

2020-05-11 Thread scriptnull
I would like to know if there is a command line tool that will help us list
down the caches and the respective number of keys present in each cache.

The closest I have got is using `control.sh` to list down the names of the
caches.

Also since we are currently only using the redis layer to create the dbs, I
wrote this little shell script to do it.

```
dbsize() {
/usr/share/apache-ignite/bin/control.sh --cache list redis-* | grep -o
"redis-ignite-internal-cache-\w*" | sed -r
's/redis-ignite-internal-cache-//g' | xargs -n 1 --replace="{}" sh -c
'printf "Database Number = {} | DBSIZE = "; redis-cli -p 11211 -n {} dbsize'
}
```

But I really wonder, if there is a clean of doing this!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Inconsistency in data stored via the Redis layer

2020-04-24 Thread scriptnull
Hi,

We are trying to use Apache Ignite via the Redis layer (
https://apacheignite.readme.io/docs/redis ). While trying to store a string
from a ruby redis client and retrieving back, we notice some inconsistency
in the data. We believe that this has something to do with how Apache Ignite
handles encoding. Would be great to learn about why this is happening and
possible mitigation for the problem.

Here is the problem in more detail.

First we have a ruby object which we marshal to get the string
representation of.

```
 => {:id=>7833548, :ad_group_id=>"91254654888",
:adwords_campaign_id=>548351, :name=>"mcdonald's_ (e)",
:configured_status=>"ENABLED", :adwords_ad_account_id=>4798,
:created_at=>Fri, 06 Dec 2019 08:18:34 UTC +00:00, :updated_at=>Mon, 20 Apr
2020 18:51:01 UTC +00:00, :targeting=>{"targeting_type"=>["Keyword"]},
:tracking_url_template=>nil, :ad_group_type=>"Search-Standard",
:content_bid_criterion_type_group=>nil,
:final_urls=>["https://www.foodora.se/restaurant/s7fx/mcdonald-s-kungsgatan?";],
:bidding_strategy_configuration=>{"bidding_strategy_type"=>"TARGET_CPA",
"bids"=>[{"bids_type"=>"CpcBid", "bid"=>{"comparable_value_type"=>"Money",
"micro_amount"=>100}, "cpc_bid_source"=>"ADGROUP",
"xsi_type"=>"CpcBid"}, {"bids_type"=>"CpaBid",
"bid"=>{"comparable_value_type"=>"Money", "micro_amount"=>1500},
"xsi_type"=>"CpaBid"}]}, :labels=>"", :audiences=>nil,
:mongo_core_object_updated_at=>Sat, 14 Dec 2019 13:38:30 UTC +00:00,
:ad_rotation_mode=>nil, :system_dimensions_last_run_at=>Fri, 06 Mar 2020
00:31:07 UTC +00:00}
```

We marshal this object to a string representation (encoding of this string
is ASCII-8BIT) 
```
redis_client.set('key', Marshal.dump(obj))
```

and here is the contents of the string stored in Apache Ignite (as seen via
the redis-cli)
```
"\x04\b{\x18:\aidi\x03\xcc\x87w:\x10ad_group_idI\"\x1091254654888\x06:\x06ET:\x18adwords_campaign_idi\x03\xef\xbf\xbd]\b:\tnameI\"\x14mcdonald's_
(e)\x06;\aT:\x16configured_statusI\"\x0cENABLED\x06;\aT:\x1aadwords_ad_account_idi\x02\xef\xbf\xbd\x12:\x0fcreated_atU:
ActiveSupport::TimeWithZone[\bIu:\tTime\r\xef\xbf\xbd\xef\xbf\xbd\x1d\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd.J\x06:\tzoneI\"\bUTC\x06;\aFI\"\bUTC\x06;\aT@\x0c:\x0fupdated_atU;\r[\bIu;\x0e\r\xef\xbf\xbd\x0e\x1e\xef\xbf\xbd\x0bX\x1c\xef\xbf\xbd\x06;\x0f@\x0b@\r@\x10:\x0etargeting{\x06I\"\x13targeting_type\x06;\aT[\x06I\"\x0cKeyword\x06;\aT:\x1atracking_url_template0:\x12ad_group_typeI\"\x14Search-Standard\x06;\aT:%content_bid_criterion_type_group0:\x0ffinal_urls[\x06I\"Bhttps://www.foodora.se/restaurant/s7fx/mcdonald-s-kungsgatan?\x06;\aT:#bidding_strategy_configuration{\aI\"\x1abidding_strategy_type\x06;\aTI\"\x0fTARGET_CPA\x06;\aTI\"\tbids\x06;\aT[\a{\tI\"\x0ebids_type\x06;\aTI\"\x0bCpcBid\x06;\aTI\"\bbid\x06;\aT{\aI\"\x1acomparable_value_type\x06;\aTI\"\nMoney\x06;\aTI\"\x11micro_amount\x06;\aTi\x03@B\x0fI\"\x13cpc_bid_source\x06;\aTI\"\x0cADGROUP\x06;\aTI\"\rxsi_type\x06;\aTI\"\x0bCpcBid\x06;\aT{\b@\x1eI\"\x0bCpaBid\x06;\aT@
{\a@\"I\"\nMoney\x06;\aT@$i\x03\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd@'I\"\x0bCpaBid\x06;\aT:\x0blabelsI\"\x00\x06;\aF:\x0eaudiences0:!mongo_core_object_updated_atU;\r[\bIu;\x0e\r\xef\xbf\xbd\xef\xbf\xbd\x1d\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\x06;\x0f@\x0b@\r@1:\x15ad_rotation_mode0:\"system_dimensions_last_run_atU;\r[\bIu;\x0e\r\xef\xbf\xbd\b\x1e\xef\xbf\xbd\x00\x00p|\x06;\x0f@\x0b@\r@4"
```

If we try to store the same data in Redis, we can see the following contents
via the redis-cli
```
"\x04\b{\x18:\aidi\x03\xcc\x87w:\x10ad_group_idI\"\x1091254654888\x06:\x06ET:\x18adwords_campaign_idi\x03\xff]\b:\tnameI\"\x14mcdonald's_
(e)\x06;\aT:\x16configured_statusI\"\x0cENABLED\x06;\aT:\x1aadwords_ad_account_idi\x02\xbe\x12:\x0fcreated_atU:
ActiveSupport::TimeWithZone[\bIu:\tTime\r\xc8\xec\x1d\xc0\x92\xd3.J\x06:\tzoneI\"\bUTC\x06;\aFI\"\bUTC\x06;\aT@\x0c:\x0fupdated_atU;\r[\bIu;\x0e\r\x92\x0e\x1e\xc0\x0bX\x1c\xcc\x06;\x0f@\x0b@\r@\x10:\x0etargeting{\x06I\"\x13targeting_type\x06;\aT[\x06I\"\x0cKeyword\x06;\aT:\x1atracking_url_template0:\x12ad_group_typeI\"\x14Search-Standard\x06;\aT:%content_bid_criterion_type_group0:\x0ffinal_urls[\x06I\"Bhttps://www.foodora.se/restaurant/s7fx/mcdonald-s-kungsgatan?\x06;\aT:#bidding_strategy_configuration{\aI\"\x1abidding_strategy_type\x06;\aTI\"\x0fTARGET_CPA\x06;\aTI\"\tbids\x06;\aT[\a{\tI\"\x0ebids_type\x06;\aTI\"\x0bCpcBid\x06;\aTI\"\bbid\x06;\aT{\aI\"\x1acomparable_value_type\x06;\aTI\"\nMoney\x06;\aTI\"\x11micro_amount\x06;\aTi\x03@B\x0fI\"\x13cpc_bid_source\x06;\aTI\"\x0cADGROUP\x06;\aTI\"\rxsi_type\x06;\aTI\"\x0bCpcBid\x06;\aT{\b@\x1eI\"\x0bCpaBid\x06;\aT@
{\a@\"I\"\nMoney\x06;\aT@$i\x03\xc0\xe1\xe4@'I\"\x0bCpaBid\x06;\aT:\x0blabelsI\"\x00\x06;\aF:\x0eaudiences0:!mongo_core_object_updated_atU;\r[\bIu;\x0e\r\xcd\xed\x1d\xc0\xab\xb2\xee\x99\x06;\x0f@\x0b@\r@1:\x15ad_rotation_mode0:\"system_dimensions_last_run_atU;\r[\bIu;\x0e\r\xc0\b\x1e\xc0\x00\x00p|\x06;\x0f@\x0b@\r@4"
```

Due to this, when we retrieve back th

Any idea on the release date of 2.8.0

2020-03-02 Thread scriptnull
Hi,

Apache Ignite 2.8.0 release contains a feature that I am interested in
using. Noticed that the rc1 is released in github 4 days back (
https://github.com/apache/ignite/releases/tag/2.8.0-rc1 ).

Does anyone have idea of when the actual 2.8.0 release will be available
from the official site for downloading and also in docker hub?

Thanks in advance!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Thick vs Thin client

2020-03-02 Thread scriptnull
Hi,

While going through the threads in this user list, I noticed that these
terms are getting used a lot "thick" and "thin" client.

For thin clients, there is a clear documentation (
https://apacheignite.readme.io/docs/thin-clients ), but for thick clients
there is no reference of what exactly it is in the documentation or
elsewhere.

It would be really helpful if someone could describe this here or at least
point to a resource which defines it clearly (I tried my best searching
about it, but couldn't arrive at it)

Further, I wonder if thick client is just another name for server node
mentioned in this document (
https://apacheignite.readme.io/docs/clients-vs-servers ) and thin client is
the client that people use it in the application layer to access data from
the cache. In that case, we might at least modify that document to state
this fact.

Thanks in advance!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Expiry policy at a key value level

2020-03-01 Thread scriptnull
Thanks! I opened a ticket here -
https://issues.apache.org/jira/browse/IGNITE-12731



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Expiry policy at a key value level

2020-02-28 Thread scriptnull
Hi,

I am trying to understand whether it is possible to set an expiry time at a
key-value level instead of the cache level.

>From my understanding, Apache Ignite supports expiry policies at a cache
level ( https://apacheignite.readme.io/docs/expiry-policies ), so that all
the key-value pairs in the cache gets expired at a specific time. I would
like to know if there is a way for only a specific key-value pairs in the
cache to override the default expiry time at the time of putting the
key-value from a thin client.

By reading up the docs of the thin clients (
https://apacheignite.readme.io/docs/java-thin-client-key-value ), I am
inferring that there is no method signature that accepts expiry time for put
operation. So, I would like to confirm this behavior and interested in
knowing if anyone had this kind of use case or perhaps a feature request.

Thanks in advance!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/