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-1680) CPP: Implement basic API for user entry point lookup
Date Tue, 27 Dec 2016 12:30:58 GMT

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

Igor Sapego edited comment on IGNITE-1680 at 12/27/16 12:30 PM:
----------------------------------------------------------------

Ok, here is concept that I have implemented and checked:
{code}
// If user has any jobs, processors or other classes, that
// may be invoked by the remote side, they should be registered
// in the following function. Every module should have no more
// than one function with the following signature. This function
// called by Ignite when module is loaded.
IGNITE_EXPORTED_CALL void IgniteModuleInit(ignite::InvokeManager& im)
{
    im.RegisterCacheEntryProcessor<UserProcessor1>();
    im.RegisterCacheEntryProcessor<UserProcessor2>();

    im.RegisterJob<UserJob1>();
    im.RegisterJob<UserJob2>();
	
    ...
}

// User classes should implement corresponding Ignite classes and 
// have static methods, that return class id. Something like:
class UserProcessor1 : public CacheEntryProcessor<...>
{
	// User implements CacheEntryProcessor interface here...
	
	// Function, that return some unique ID for the class.
	static int64_t GetIgniteId()
	{
		...
	}
}
{code}

What do you guys think?


was (Author: isapego):
Ok, here is concept that I have implemented and checked:
{code}
// If user has any jobs, processors or other classes, that
// may be invoked by the remote side, they should be registered
// in the following function. Every module should have no more
// than one function with the following signature. This function
// called by Ignite when module is loaded.
IGNITE_EXPORTED_CALL void IgniteModuleInit(ignite::InvokeManager& im)
{
    im.RegisterCacheEntryProcessor<UserProcessor1>();
    im.RegisterCacheEntryProcessor<UserProcessor2>();
	
	im.RegisterJob<UserJob1>();
	im.RegisterJob<UserJob2>();
	
	...
}

// User classes should implement corresponding Ignite classes and 
// have static methods, that return class id. Something like:
class UserProcessor1 : public CacheEntryProcessor<...>
{
	// User implements CacheEntryProcessor interface here...
	
	// Function, that return some unique ID for the class.
	static int64_t GetIgniteId()
	{
		...
	}
}
{code}

What do you guys think?

> CPP: Implement basic API for user entry point lookup
> ----------------------------------------------------
>
>                 Key: IGNITE-1680
>                 URL: https://issues.apache.org/jira/browse/IGNITE-1680
>             Project: Ignite
>          Issue Type: Task
>          Components: platforms
>    Affects Versions: 1.1.4
>            Reporter: Igor Sapego
>            Assignee: Igor Sapego
>              Labels: cpp, roadmap
>             Fix For: 2.0
>
>
> Need to implement IgniteCompute class for C++ with one basic method IgniteCompute::Call(...)
which will provide basic remote job execution API.



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

Mime
View raw message