Remove console interface
The console interface is very nice and could reduce the "boilerplate" to 3 lines:
def main(arg1, arg2):
print(arg1, arg2)
if __name__ == '__main__':
from sys import argv
main(*argv[1:])
However, it has three big disadvantages:
- no auto-serialization (it's just strings)
- it's still code that a high-level user shouldn't care about
- starting a process in an interpreted language like Python/NodeJS does come with an overhead
Now, of course the serialization bit could be handled with two more lines:
def main(arg1, arg2):
print(arg1, arg2)
if __name__ == '__main__':
from sys import argv
from json import loads
main(*map(loads, argv[1:]))
However, the number of characters that can be processed via the CLI has a limit (see e.g. https://serverfault.com/questions/163371/linux-command-line-character-limit, https://www.in-ulm.de/~mascheck/various/argmax/) which is why I think we shouldn't recommend to use the console interface.
@microservices/omg-maintainers I am in favour of dropping the console interface, as it's restrictive, and always has overhead in terms of starting up.
@microservices/omg-maintainers Please weigh in.
I'm fine with dropping it, we can always add it back in future if it is a desired feature.