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

ASF GitHub Bot commented on QUARKS-10:
--------------------------------------

Github user dlaboss commented on a diff in the pull request:

    https://github.com/apache/incubator-quarks/pull/7#discussion_r56052094
  
    --- Diff: apps/iot/src/test/java/quarks/test/apps/iot/EchoIotDevice.java ---
    @@ -78,7 +78,7 @@ private static String getCommandIdFromEvent(String 
eventId, JsonObject evPayload
             if (evPayload.has(EVENT_CMD_ID))
                 return 
evPayload.getAsJsonPrimitive(EVENT_CMD_ID).getAsString();
             else
    -            return "ec_" + eventId;
    +            return eventId;
         }
     
    --- End diff --
    
    this applies to `commands()` on line 110...
    - in the case where there's no cmd filtering, why is it desirable/necessary 
to pass `echoCmds` through a `alwaysTrue` filter?  Why not just return 
`echoCmds`?
    - can't multi-cmd case processing be simplified to only have a single 
`filter` and no `union`... and merged with the single cmd filtering case for 
that matter? e.g.,
    ```
             Set<String> cmds = new HashSet<>(Arrays.asList(commands));
             return echoCmds.filter(j -> 
cmds.contains(j.getAsJsonPrimitive(CMD_ID).getAsString());
    ```


> Allow a registered application to be started from a backend.
> ------------------------------------------------------------
>
>                 Key: QUARKS-10
>                 URL: https://issues.apache.org/jira/browse/QUARKS-10
>             Project: Quarks
>          Issue Type: New Feature
>          Components: Applications
>            Reporter: Daniel John Debrunner
>            Assignee: Daniel John Debrunner
>              Labels: iotscenario
>
> Support an IoT device command that can start a registered application 
> (topology).
> Application service that provides a control MBean to submit any applications 
> it has registered. This control mbean can then be exposed though JMX or as an 
> Iot device command.
> Something like:
> interface ApplicationService {
>     // when the topology is to be submitted builder.accept(topology) is called
>     // create the graph (so that it can be created on demand)
>    // with topology being a newly created topology with the given name
>     void addTopology(String name, Consumer<Topology> builder);
> }
> And a control mechanism of:
> interface ApplicationMXBean {
>     void submit(String name, String jsonConfig);
> }



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

Reply via email to