[GitHub] rabbah commented on issue #15: More flexibility to parsing and passing JSON input/out in Java runtime
rabbah commented on issue #15: More flexibility to parsing and passing JSON input/out in Java runtime URL: https://github.com/apache/incubator-openwhisk-runtime-java/issues/15#issuecomment-371187087 > I'd try to avoid main(String args[]) if possible. Instead, we could allow user to specify a java.util.function.Function implementation as a main class. @mkouba +1, I assume you also mean there is a a serializer/deserializer from `Foo` to JSON object? More generally a `Function` where `T1` and `T2` could be first class types. This create serdes overhead but allows for better function abstractions. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rabbah commented on issue #15: More flexibility to parsing and passing JSON input/out in Java runtime
rabbah commented on issue #15: More flexibility to parsing and passing JSON input/out in Java runtime URL: https://github.com/apache/incubator-openwhisk-runtime-java/issues/15#issuecomment-371187087 > I'd try to avoid main(String args[]) if possible. Instead, we could allow user to specify a java.util.function.Function implementation as a main class. @mkouba +1, I assume you also mean there is a a serializer/deserializer from `Foo` to JSON object? Edit: ah never I misread the `getValue`, `setValue`... I mapped that to a `Function` where `T1` and `T2` could be first class types. This create serdes overhead but allows for better function abstractions. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rabbah commented on issue #15: More flexibility to parsing and passing JSON input/out in Java runtime
rabbah commented on issue #15: More flexibility to parsing and passing JSON input/out in Java runtime URL: https://github.com/apache/incubator-openwhisk-runtime-java/issues/15#issuecomment-371187087 > I'd try to avoid main(String args[]) if possible. Instead, we could allow user to specify a java.util.function.Function implementation as a main class. @mkouba +1, I assume you also mean there is a a serializer/deserializer from `Foo` to JSON object? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rabbah commented on issue #15: More flexibility to parsing and passing JSON input/out in Java runtime
rabbah commented on issue #15: More flexibility to parsing and passing JSON input/out in Java runtime URL: https://github.com/apache/incubator-openwhisk-runtime-java/issues/15#issuecomment-371183079 @mkouba https://github.com/apache/incubator-openwhisk/blob/master/docs/actions.md#creating-and-invoking-openwhisk-actions ``` The input to an action and the result of an action are a dictionary of key-value pairs, where the key is a string and the value a valid JSON value. ``` We should perhaps make that more prominent. The function signature abstractly is `dictionary -> dictionary` where the implementation of dictionary is language specific, e.g., JSON object for Javascript. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rabbah commented on issue #15: More flexibility to parsing and passing JSON input/out in Java runtime
rabbah commented on issue #15: More flexibility to parsing and passing JSON input/out in Java runtime URL: https://github.com/apache/incubator-openwhisk-runtime-java/issues/15#issuecomment-371183079 @mkouba https://github.com/apache/incubator-openwhisk/blob/master/docs/actions.md#creating-and-invoking-openwhisk-actions ``` The input to an action and the result of an action are a dictionary of key-value pairs, where the key is a string and the value a valid JSON value. ``` We should perhaps make that more prominent. The function signature abstractly is `dictionary -> dictionary` where the implementation of dictionary is language specific, e.g., JSON object for Javascript. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rabbah commented on issue #15: More flexibility to parsing and passing JSON input/out in Java runtime
rabbah commented on issue #15: More flexibility to parsing and passing JSON input/out in Java runtime URL: https://github.com/apache/incubator-openwhisk-runtime-java/issues/15#issuecomment-371173021 Note: Whisk actions must return json objects. If you change the signature you?ll need to box the return value into an object elsewhere. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services