George, I'm going to try this quickly now. A couple of small things on
the RPC but they won't effect the first test:
1) I notice FMQL's return is a GLOBAL ARRAY, not an ARRAY. I think
that was because I needed to use TMP when building JSON - it can get
really big and Cache hit limits in some cases if I tried to use an in-
memory structure (I forget precisely but I think JSON in TMP and
Global Array were mixed up together)
NOTE: Dave Whitten mentioned XTmp too.
2) I think it best to have four parameters (besides limit offset), one
each for graph, subject, predicate, object and let all be optional.
"subject predicate object" as a sequence isn't really a "query" - it's
more of a template to match. I think as an RPC distinct arguments
makes more sense.
On Web calling format:
I think query args that match this RPC (and any others that come
along) ?op=triples&&graph=X&&subject=Y&&object=Z etc. ie/ use query
args. Again that's easy and intuitive for REST users. "op" is the
operation. It's best to use this now so that you could add operations
like "subjects", "objects", "value" etc if you want to later.
Finally on making replies:
In FMQL's reply implementation, I used a "Builder Pattern" which
separates reply building from query processing. In theory the same
walker could be reused for different output formats.
I know this may be too OO and not MUMPsy enough but as an approach it
means it should be easy to support all of the output forms with the
same walker. I'd need to abstract it some more but the idea would be
ASSERT^REPLY(OUTPUT,PRED,VALUE,TYPE)
leads to OUTPUT with either
PRED: {"value": VALUE, "type": ...} ... JSON
or
<PRED> VALUE ... XML
or
...
depending on the output formatter/serializer chosen - MUMPS seems to
love indirection so it's probably easy to make "REPLY" dynamic? ie/ to
make the exact routine used to serialize dynamic or is that not
possible?
Conor
> <
conor-dowl...@caregraf.com>wrote: