Adrian Likins wrote:
Between Red Hat Summit, FUDCon, and various discussions, it's occurred
to me that lots of people
are using the 'func' command line in applications instead of the
python api. This is particular common
in non python apps of course, where the api isn't useable.
The problem with the current commandline client is that it is kind of
limited usefulness in this
useage. Parsing output seems to be an issue. Current versions support
the use of the "--xmlrpc",
"--json", and "--pickle" output modes, which could theoretically be
used to make this a little easier.
It wouldn't be hard to add other ways to marshall more complex data
either, yaml, for example.
Or perhaps a mode that would be easily parsed with commandline tools
(csv? BAR=foo shellvar style?)
Any ideas?
The other side to the problem is the input. At the moment, the "call"
support only supports passing string
args on the command line. There are a couple of ways to make that more
flexible that come to mind. One
is to add some support for specifing types. Not sure what that would
look like at the moment.
Another idea that I like, is the ability to read marshalled data in
from stdin. It would be pretty easy to
support xmlrpc style data this way, or json, or other types. It might
make it a little easier to glue support
for other languages in this way, and not be constrained by what can be
passed into the command line
+1
A wrapper api could use native support for xmlrpc/json/yaml/etc to
build up the data structures, and then
feed then via stdin to func.
Luca/Symbolic guys, what do you think of the above? I think it's easier
than the XMLRPC over socket route and perhaps a bit easier to put
together on for a language that doesn't have very good access to OS
level bits (read: java). Func still requires permissions on the
certs, so xmlrpc marshalling over STDIN seems fair to me, and other apps
are known to do it.
The other easy thing to do would be YAML, but we lose the ability to
express faults if we go that route.
Any suggestions?
Do it? :)
Adrian
_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list
_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list