node-cluster-service
node-cluster-service copied to clipboard
Simpler command inputs
Currently commands issued are interpreted as primitive types (int, bool, etc), arrays, strings, or JSON for complex objects, and then passed in as arguments to the given command.
Example:
test_command { "key1": { "key1a": "val1a" } }
The command would receive that object as one as its parameters.
Problems:
- It's strict JSON syntax, requires quotes, not very forgiving to improper syntax.
- Very difficult to manually encode for use over the REST API. Too many encoded characters.
Ideally, the below examples should just work, but do not today:
// should permit js object syntax, not just JSON
cservice --workers "{ worker1: { worker: 'worker1.js' } }"
// array support
cservice --option3 "[ 'item1', 'item2' ]"
// command with multiple types of input
cservice "command2 'a long string' ['item1', 'item2'] { key: 'value' }"
What better alternatives are recommended?
I'd love to work on this one. What is the timeline?
Awesome Dan. Not a blocker, so proceed with your own timeline for now.