You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2016/04/13 12:48:25 UTC
[jira] [Commented] (IGNITE-2977) Implement generic ability to
invoke Java code from non-Java platforms.
[ https://issues.apache.org/jira/browse/IGNITE-2977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15239058#comment-15239058 ]
Vladimir Ozerov commented on IGNITE-2977:
-----------------------------------------
Sample setup.
*Java*
{code}
package my.pkg;
public class JavaFilter implements CacheEntryEventSerializableFilter {
private int expectedValue;
boolean evaluate(CacheEntryEvent<? extends K, ? extends V> event) {
return event.getKey().value() == expectedValue;
}
}
{code}
*.NET*
{code}
JavaObject javaObj = new JavaObject("my.pkg.JavaFilter", new Dictionary<string, object> { { "expectedValue", 100 } });
IContinuousQueryFilter<K, V> filter = javaObj.ToContinuousQueryFilter<K, V>();
ContinuousQuery<K, V> qry = new ContinuousQuery<K, V>(listener, filter);
{code}
> Implement generic ability to invoke Java code from non-Java platforms.
> ----------------------------------------------------------------------
>
> Key: IGNITE-2977
> URL: https://issues.apache.org/jira/browse/IGNITE-2977
> Project: Ignite
> Issue Type: Task
> Components: platforms
> Affects Versions: 1.5.0.final
> Reporter: Vladimir Ozerov
> Assignee: Vladimir Ozerov
> Priority: Critical
> Fix For: 1.6
>
>
> *Problem*
> Sometimes user could have mixed cluster when some nodes are running Java and some nodes running in platform mode. Obviously, in such deployments it is impossible to invoke non-Java code on Java nodes.
> It appears to be a serious limitation for users. For example, if cache nodes are Java-only, it is impossible to set remote filter from .NET.
> Known problematic places:
> - Remote filter in continuous query
> - Compute API
> - Scan Queries
> - Cache.invokes
> - "load cache" with non-null predicate
> - services
> - messaging remote listener
> - events remote query
> *Proposed solution*
> 1) Define two new types:
> {{JavaObject}} - encoded Java object; identified by a fully-qualified class name and a map of properties.
> {{JavaObjectFactory}} - factory object for more complex cases when some additional logic on Java side is required. Factory must support injections.
> 2) Implement corresponding wrappers in .NET/CPP and ensure they are unwrapped correctly.
> 3) Support individual features from the list above.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)