Re: Thin client: Java bindings

2018-03-01 Thread Denis Magda
Alexey, outstanding progress! Can't wait the client rolled out to Ignite
users.

Please create a doc JIRA ticket for 2.5 release and assign to Prachi for
review.

--
Denis

On Thu, Mar 1, 2018 at 4:56 AM, Alexey Kukushkin 
wrote:

> Igniters!
>
> Could you please help with the Java thin client code review:
>
> Documentation 
> Code 
>
> Thank you for the help.
>
> On Mon, Feb 5, 2018 at 5:45 PM, Alexey Kukushkin <
> kukushkinale...@gmail.com>
> wrote:
>
> > We also need asynchronous versions of all the thin client APIs. I created
> > JIRA-7623    to
> address
> > async APIs. Proposed design:
> > Async methods are named by appending "Async" to the corresponding
> > syncMethod, e.g. putAsync, clearAsync.
> > Async methods return java.util.concurrent.Future
> > Async methods are not cancellable (presently cancellation is not
> supported
> > by the thin client protocol)
> > Use thin client protocol's Request ID to map async requests and
> responses.
> >
> >
> >
> > --
> > Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
> >
>
>
>
> --
> Best regards,
> Alexey
>


Re: Thin client: Java bindings

2018-03-01 Thread Alexey Kukushkin
Igniters!

Could you please help with the Java thin client code review:

Documentation 
Code 

Thank you for the help.

On Mon, Feb 5, 2018 at 5:45 PM, Alexey Kukushkin 
wrote:

> We also need asynchronous versions of all the thin client APIs. I created
> JIRA-7623    to address
> async APIs. Proposed design:
> Async methods are named by appending "Async" to the corresponding
> syncMethod, e.g. putAsync, clearAsync.
> Async methods return java.util.concurrent.Future
> Async methods are not cancellable (presently cancellation is not supported
> by the thin client protocol)
> Use thin client protocol's Request ID to map async requests and responses.
>
>
>
> --
> Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
>



-- 
Best regards,
Alexey


Re: Thin client: Java bindings

2018-02-05 Thread Alexey Kukushkin
We also need asynchronous versions of all the thin client APIs. I created 
JIRA-7623    to address
async APIs. Proposed design:
Async methods are named by appending "Async" to the corresponding
syncMethod, e.g. putAsync, clearAsync.
Async methods return java.util.concurrent.Future
Async methods are not cancellable (presently cancellation is not supported
by the thin client protocol)
Use thin client protocol's Request ID to map async requests and responses.



--
Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/

Re: Thin client: Java bindings

2018-01-16 Thread Denis Magda
Alexey,

Pavel agreed to add transactions to the protocol in 2.5 release:
https://issues.apache.org/jira/browse/IGNITE-7369 


—
Denis

> On Jan 16, 2018, at 2:02 AM, Alexey Kukushkin  
> wrote:
> 
> Dmitriy,
> 
> Although having invoke() was really important for us, implementing invoke()
> does not look trivial (need to think about real multi-lingual and
> cross-platform design) and we do not have time to implement it on the first
> phase. Currently thin client protocol does not support it so we would have
> to design it ourselves. Still we will need invoke and transactions on the
> next phases and really appreciate if community would design something to
> support it in the binary protocol.



Re: Thin client: Java bindings

2018-01-16 Thread Denis Magda
Not sure the protocol should care of invoke() or any compute grid methods. 
Technically the user add a computation or entry processor to the class path of 
remote nodes and then trigger them using a simple operation support by the 
protocol. But do users and we really need this? Usually invoke and compute grid 
are used together with peer-class-loading.

—
Denis

> On Jan 16, 2018, at 1:29 AM, Dmitriy Setrakyan  wrote:
> 
> Hi Alexey,
> 
> Thanks for a detailed email. I think your approach is correct. Are you
> planning to implement the full JCache API for the Java thin client? If yes,
> I think you are missing the invoke(...) methods.
> 
> Also, would be nice to support transactions as well.
> 
> D.
> 
> On Tue, Jan 16, 2018 at 12:03 AM, Alexey Kukushkin <
> kukushkinale...@gmail.com> wrote:
> 
>> Igniters,
>> 
>> I am working on a project where users will use Ignite via a thin client
>> protocol. The API will be Java and the client will have to support failover
>> and encryption.
>> 
>> I know community already developed the thin client protocol and .NET
>> bindings and is going to develop failover and encryption (I found backlog
>> tickets addressing failover and encryption). Thus, the only missing part is
>> Java bindings.
>> 
>> Unless someone is already working on Java bindings, let us develop and
>> contribute the thin client Java API to the Apache Ignite project. I believe
>> many can benifit from it.
>> 
>> There are two options to design the API: 1) implement existing interface
>> like IgniteCache and throw UnsupportedOperationExcception if something is
>> not supported 2) implement new interface and define only supported methods.
>> The Community  already discussed the options
>> > com/New-thin-client-and-interfaces-facades-td22023.html>
>> decided to use the latter option 2 for .NET bindings so we will follow the
>> same approach for the Java API.
>> 
>> On the first phase we will implement the below data-only API. Let us know
>> if
>> you have comments. Thank you!
>> 
>> Cache
>>JCache (limited)
>>getName(): String
>>put(key, val)
>>get(key): V
>>getAll(keys: Set): Map
>>containsKey(key): boolean
>>getAndPut(key, val): V
>>getAndReplace(key, val): V
>>getAndRemove(key): V
>>putIfAbsent
>>replace(key, val)
>>replace(key, oldVal, newVal)
>>putAll
>>clear
>>remove(key)
>>remove(key, val)
>>removeAll()
>>removeAll(keys: Set)
>>getConfiguration(clazz): Configuration
>>close()
>>size(modes: CachePeekMode...)
>>query(qry: Query): QueryCursor
>>query(qry: SqlFieldsQuery): FieldsQueryCursor
>>withKeepBinary(): IgniteCache
>> Ignite
>>cache(name: String)
>>cacheNames(): Collection
>>binary(): IgniteBinary
>>createCache(name): Cache
>>getOrCreateCache(name): Cache
>>destroyCache(name)
>> Ignition
>>startClient(:ClientConfiguration): Ignite
>> ClientConfiguration(port, host, binaryConfiguration, sslConfiguration,
>> etc...)
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> --
>> Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
>> 



Re: Thin client: Java bindings

2018-01-16 Thread Dmitriy Setrakyan
Got it, thanks!

On Tue, Jan 16, 2018 at 2:02 AM, Alexey Kukushkin  wrote:

> Dmitriy,
>
> Although having invoke() was really important for us, implementing invoke()
> does not look trivial (need to think about real multi-lingual and
> cross-platform design) and we do not have time to implement it on the first
> phase. Currently thin client protocol does not support it so we would have
> to design it ourselves. Still we will need invoke and transactions on the
> next phases and really appreciate if community would design something to
> support it in the binary protocol.
>


Re: Thin client: Java bindings

2018-01-16 Thread Alexey Kukushkin
Dmitriy,

Although having invoke() was really important for us, implementing invoke()
does not look trivial (need to think about real multi-lingual and
cross-platform design) and we do not have time to implement it on the first
phase. Currently thin client protocol does not support it so we would have
to design it ourselves. Still we will need invoke and transactions on the
next phases and really appreciate if community would design something to
support it in the binary protocol.


Re: Thin client: Java bindings

2018-01-16 Thread Dmitriy Setrakyan
Hi Alexey,

Thanks for a detailed email. I think your approach is correct. Are you
planning to implement the full JCache API for the Java thin client? If yes,
I think you are missing the invoke(...) methods.

Also, would be nice to support transactions as well.

D.

On Tue, Jan 16, 2018 at 12:03 AM, Alexey Kukushkin <
kukushkinale...@gmail.com> wrote:

> Igniters,
>
> I am working on a project where users will use Ignite via a thin client
> protocol. The API will be Java and the client will have to support failover
> and encryption.
>
> I know community already developed the thin client protocol and .NET
> bindings and is going to develop failover and encryption (I found backlog
> tickets addressing failover and encryption). Thus, the only missing part is
> Java bindings.
>
> Unless someone is already working on Java bindings, let us develop and
> contribute the thin client Java API to the Apache Ignite project. I believe
> many can benifit from it.
>
> There are two options to design the API: 1) implement existing interface
> like IgniteCache and throw UnsupportedOperationExcception if something is
> not supported 2) implement new interface and define only supported methods.
> The Community  already discussed the options
>  com/New-thin-client-and-interfaces-facades-td22023.html>
> decided to use the latter option 2 for .NET bindings so we will follow the
> same approach for the Java API.
>
> On the first phase we will implement the below data-only API. Let us know
> if
> you have comments. Thank you!
>
> Cache
> JCache (limited)
> getName(): String
> put(key, val)
> get(key): V
> getAll(keys: Set): Map
> containsKey(key): boolean
> getAndPut(key, val): V
> getAndReplace(key, val): V
> getAndRemove(key): V
> putIfAbsent
> replace(key, val)
> replace(key, oldVal, newVal)
> putAll
> clear
> remove(key)
> remove(key, val)
> removeAll()
> removeAll(keys: Set)
> getConfiguration(clazz): Configuration
> close()
> size(modes: CachePeekMode...)
> query(qry: Query): QueryCursor
> query(qry: SqlFieldsQuery): FieldsQueryCursor
> withKeepBinary(): IgniteCache
> Ignite
> cache(name: String)
> cacheNames(): Collection
> binary(): IgniteBinary
> createCache(name): Cache
> getOrCreateCache(name): Cache
> destroyCache(name)
> Ignition
> startClient(:ClientConfiguration): Ignite
> ClientConfiguration(port, host, binaryConfiguration, sslConfiguration,
> etc...)
>
>
>
>
>
>
>
> --
> Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
>