IBM / ibm-cloud-functions-data-processing-message-hub

Create a serverless, event-driven application with Apache OpenWhisk on IBM Cloud Functions that executes code in response to messages or to handle streams of data records from Apache Kafka or IBM Message Hub.
https://developer.ibm.com/patterns/respond-messages-handle-streams/
Apache License 2.0
22 stars 26 forks source link

Make mhpost action consistent with mhget action. #20

Closed lzbj closed 7 years ago

lzbj commented 7 years ago

Currently the mhpost.js action is exported as a nodejs module, can we change it like the mhget.js action, and thus remove the package.json file? @krook . Perhaps this is more convenient for deployment for tools like wsk cli or wskdeploy.

lzbj commented 7 years ago

sorry, after review the code, seems we'd better put it as a zip file, since openwhisk already support zip actions, any comments?

jzaccone commented 7 years ago

mhpost.js depends on an external npm module: message-hub-rest, while mhget.js has no external dependencies... which is why these are different.

We are already creating the mhpost action using the OpenWhisk support for zipped actions:

npm install
wsk action create kafka/mhpost-action actions/mhpost/mhpost.zip --kind nodejs:6

So I see no change required @lzbj, unless you still see something I don't?

lzbj commented 7 years ago

Sure, so you mean we create the zip file when we want the zip file, ok, got it. thank you.