[jira] [Comment Edited] (IGNITE-4046) C++: Support DML API
[ https://issues.apache.org/jira/browse/IGNITE-4046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15828043#comment-15828043 ] Igor Sapego edited comment on IGNITE-4046 at 1/18/17 1:31 PM: -- After some studying, it seems that most flexible and optimized way to introduce identity resolvers to C++ is to add {{IdentityResolver}} interface, and introduce {{BynaryType::GetIdentityResolver}} method for user types. {{IdentityResolver}} should be something like this: {code} class IdenntityResolver { public: virtual int32_t GetHashCode(const BinaryObject& obj) = 0; } {code} As you can see, {{BinaryObject}} type used here. It is used for the efficiency reasons, which Pavel has pointed out. {{BinaryObject}} however is not implemented currently for C++ client, so if there are no objections I'm going to add it as a blocking issue for this one. was (Author: isapego): After some studying, it seems that most flexible and optimized way to introduce identity resolvers to C++ is to add {{IdentityResolver}} interface, and introduce {{BynaryType::GetIdentityResolver}} method for user types. {{IdentityResolver}} should be something like this: {code} class IdenntityResolver { virtual int32_t GetHashCode(const BinaryObject& obj) = 0; } {code} As you can see, {{BinaryObject}} type used here. It is used for the efficiency reasons, which Pavel has pointed out. {{BinaryObject}} however is not implemented currently for C++ client, so if there are no objections I'm going to add it as a blocking issue for this one. > C++: Support DML API > > > Key: IGNITE-4046 > URL: https://issues.apache.org/jira/browse/IGNITE-4046 > Project: Ignite > Issue Type: Task > Components: platforms >Affects Versions: 1.8 >Reporter: Denis Magda >Assignee: Igor Sapego > Labels: roadmap > Fix For: 1.9 > > > Ignite's Java component will provide support for DML soon (IGNITE-2294). At > she same time DML will be supported at the level of ODBC and JDBC drivers. > As the next step we should include the similar functionality into Ignite.C++ > by doing the following: > - Implement DML API; > - Enhance {{query_example.cpp}} by doing INSERTs instead of cache.puts and > adding UPDATE and DELETE operation examples. > - Add documentation to Ignite.C++ readme.io covering the feature. Most like > most of the content can be take from the general documentation when this > ticket IGNITE-4018 is ready. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (IGNITE-4046) C++: Support DML API
[ https://issues.apache.org/jira/browse/IGNITE-4046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15825663#comment-15825663 ] Pavel Tupitsyn edited comment on IGNITE-4046 at 1/17/17 8:59 AM: - Igor, my main concern is about {{BinaryArrayIdentityResolver}} efficiency: we do the same thing twice when writing an object to a stream in {{BinaryWriterImpl::WriteTopObject}} (allocate temp stream, write to temp stream to get the hash code, then write to the main stream). Binary writer is on a very hot path, so I think we should get rid of temporary stream and calculate the hash code using the main stream. Ignite.NET works this way. Also please add separate unit tests for {{BinaryArrayIdentityResolver}} and {{GetDataHashCode}}. was (Author: ptupitsyn): Igor, my main concern is about BinaryArrayIdentityResolver efficiency: we do the same thing twice when writing an object to a stream in {{BinaryWriterImpl::WriteTopObject}} (allocate temp stream, write to temp stream to get the hash code, then write to the main stream). Binary writer is on a very hot path, so I think we should get rid of temporary stream and calculate the hash code using the main stream. Ignite.NET works this way. Also please add separate unit tests for {{BinaryArrayIdentityResolver}} and {{GetDataHashCode}}. > C++: Support DML API > > > Key: IGNITE-4046 > URL: https://issues.apache.org/jira/browse/IGNITE-4046 > Project: Ignite > Issue Type: Task > Components: platforms >Affects Versions: 1.8 >Reporter: Denis Magda >Assignee: Pavel Tupitsyn > Labels: roadmap > Fix For: 1.9 > > > Ignite's Java component will provide support for DML soon (IGNITE-2294). At > she same time DML will be supported at the level of ODBC and JDBC drivers. > As the next step we should include the similar functionality into Ignite.C++ > by doing the following: > - Implement DML API; > - Enhance {{query_example.cpp}} by doing INSERTs instead of cache.puts and > adding UPDATE and DELETE operation examples. > - Add documentation to Ignite.C++ readme.io covering the feature. Most like > most of the content can be take from the general documentation when this > ticket IGNITE-4018 is ready. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (IGNITE-4046) C++: Support DML API
[ https://issues.apache.org/jira/browse/IGNITE-4046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15825663#comment-15825663 ] Pavel Tupitsyn edited comment on IGNITE-4046 at 1/17/17 8:59 AM: - Igor, my main concern is about BinaryArrayIdentityResolver efficiency: we do the same thing twice when writing an object to a stream in {{BinaryWriterImpl::WriteTopObject}} (allocate temp stream, write to temp stream to get the hash code, then write to the main stream). Binary writer is on a very hot path, so I think we should get rid of temporary stream and calculate the hash code using the main stream. Ignite.NET works this way. Also please add separate unit tests for {{BinaryArrayIdentityResolver}} and {{GetDataHashCode}}. was (Author: ptupitsyn): Igor, my main concern is about BinaryArrayIdentityResolver efficiency: we do the same thing twice when writing an object to a stream in {{BinaryWriterImpl::WriteTopObject}} (allocate temp stream, write to temp stream to get the hash code, then write to the main stream). Binary writer is on a very hot path, so I think we should get rid of temporary stream and calculate the hash code using the main stream. Ignite.NET works this way. > C++: Support DML API > > > Key: IGNITE-4046 > URL: https://issues.apache.org/jira/browse/IGNITE-4046 > Project: Ignite > Issue Type: Task > Components: platforms >Affects Versions: 1.8 >Reporter: Denis Magda >Assignee: Pavel Tupitsyn > Labels: roadmap > Fix For: 1.9 > > > Ignite's Java component will provide support for DML soon (IGNITE-2294). At > she same time DML will be supported at the level of ODBC and JDBC drivers. > As the next step we should include the similar functionality into Ignite.C++ > by doing the following: > - Implement DML API; > - Enhance {{query_example.cpp}} by doing INSERTs instead of cache.puts and > adding UPDATE and DELETE operation examples. > - Add documentation to Ignite.C++ readme.io covering the feature. Most like > most of the content can be take from the general documentation when this > ticket IGNITE-4018 is ready. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (IGNITE-4046) C++: Support DML API
[ https://issues.apache.org/jira/browse/IGNITE-4046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15728740#comment-15728740 ] Igor Sapego edited comment on IGNITE-4046 at 12/7/16 1:22 PM: -- Implemented algorithm that matches {{BinaryArrayIdentityResolver}}'s. When I've tried to implement {{BinaryFieldIdentityResolver}} I've found out that in Java it calculates hash by applying hash function to set of the fields hashes. Field hashes in their turn calculated using Java-specific algorithms and Java data types internal structure. I don't see a way to implement the algorithm, which is going to be able to the same hash in C++ or any other platform. It is obvious that the portable hashing algorithm should only use binary format to generate object hash. {{BinaryFieldIdentityResolver}} is not portable as for now. was (Author: isapego): Implemented algorithm that matches {{BinaryArrayIdentityResolver}}'s. When I've tried to implement {{BinaryFieldIdentityResolver}} I've found out that in Java it calculates hash by applying hash function to set of the fields hashes. Field hashes in their turn calculated using Java-specific algorithms and Java data types internal structure. I don't see a way to implement the algorithm, which is going to be able to the same hash in C++ or any other platform. > C++: Support DML API > > > Key: IGNITE-4046 > URL: https://issues.apache.org/jira/browse/IGNITE-4046 > Project: Ignite > Issue Type: Task > Components: platforms >Reporter: Denis Magda >Assignee: Igor Sapego > Labels: roadmap > Fix For: 2.0 > > > Ignite's Java component will provide support for DML soon (IGNITE-2294). At > she same time DML will be supported at the level of ODBC and JDBC drivers. > As the next step we should include the similar functionality into Ignite.C++ > by doing the following: > - Implement DML API; > - Enhance {{query_example.cpp}} by doing INSERTs instead of cache.puts and > adding UPDATE and DELETE operation examples. > - Add documentation to Ignite.C++ readme.io covering the feature. Most like > most of the content can be take from the general documentation when this > ticket IGNITE-4018 is ready. -- This message was sent by Atlassian JIRA (v6.3.4#6332)