ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor Sapego (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (IGNITE-3559) CPP: Review Ignite C++ API and provide list of breaking improvements that can be included in Ignite 2.0
Date Tue, 26 Jul 2016 15:18:20 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-3559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15389728#comment-15389728
] 

Igor Sapego edited comment on IGNITE-3559 at 7/26/16 3:17 PM:
--------------------------------------------------------------

I've reviewed current API and here is the list of improvements that break backward compatibility:
1. Place different enums in separate namespaces or structs. [Explanation why is it a good
thing to do.|http://stackoverflow.com/questions/7090130/enum-in-a-namespace].
2. Replace pointers with references in {{BinaryMapReader::GetNext}}.
3. Replace passing arguments by copy with passing by constant reference in {{BinaryWriter::WriteObject}}
and {{BinaryRawWriter::WriteObject}} to avoid unnecessary copying.
4. For the {{BinaryType<T>}}: 
	- All methods should be 'static'.
	- Methods {{GetTypeName()}}, {{Read()}} and {{GetNull()}} should pass result to caller by
reference argument and not by return value to avoid copying and temporary objects creation.

5. For the {{BinaryType<T*>}}: additionally to the mentioned above, remove field {{typ}}
and add typedef for the non-pointer type instead.
6. For the method {{QueryCursor::GetAll}} add support for not only vectors but for any container.
Consider using iterators (preferably) or template type for the container.
7. {{Cache}} class: the same issue as above. Methods {{ContainsKeys}}, {{GetAll}}, {{PutAll}},
{{LocalEvict}}, {{ClearAll}}, {{LocalClearAll}}, {{RemoveAll}}.
8. Everywhere: Replace {{IgniteError}} arguments passed as pointers with references.

These all are just proposals so they all are, of course, discussable.


was (Author: isapego):
I've reviewed current API and here is the list of improvements that break backward compatibility:
1. Place different enums in separate namespaces or structs. [Explanation why is it a good
thing to do.|http://stackoverflow.com/questions/7090130/enum-in-a-namespace].
2. Replace pointers with references in {{BinaryMapReader::GetNext}}.
3. Replace passing arguments by copy with passing by constant reference in {{BinaryWriter::WriteObject}}
and {{BinaryRawWriter::WriteObject}} to avoid unnecessary copying.
4. For the {{BinaryType<T>}}: 
	- All methods should be 'static'.
	- Methods {{GetTypeName()}}, {{Read()}} and {{GetNull()}} should pass result to caller by
reference argument and not by return value to avoid copying and temporary objects creation.
5. For the {{BinaryType<T*>}}: additionally to the mentioned above, remove field {{typ}}
and add typedef for the non-pointer type instead.
6. For the method {{QueryCursor::GetAll}} add support for not only vectors but for any container.
Consider using iterators (preferably) or template type for the container.
7. {{Cache}} class: the same issue as above. Methods {{ContainsKeys}}, {{GetAll}}, {{PutAll}},
{{LocalEvict}}, {{ClearAll}}, {{LocalClearAll}}, {{RemoveAll}}.
8. Everywhere: Replace {{IgniteError}} arguments passed as pointers with references.

These all are just proposals so they all are, of course, discussable.

> CPP: Review Ignite C++ API and provide list of breaking improvements that can be included
in Ignite 2.0
> -------------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-3559
>                 URL: https://issues.apache.org/jira/browse/IGNITE-3559
>             Project: Ignite
>          Issue Type: Task
>          Components: platforms
>    Affects Versions: 1.6
>            Reporter: Igor Sapego
>            Assignee: Igor Sapego
>              Labels: cpp
>             Fix For: 2.0
>
>
> As there is going to be Ignite 2.0 release soon, It is a good opportunity to improve
Ignite C++ API without the need to maintain backward compatibility. Let's collect and discuss
all the proposal for the changes in this task and then create matching subtasks for all the
accepted proposals.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message