On Tue, 2018-06-12 at 11:54 -0700, John Roberts wrote:
> Ignoring the plugin approach, if I were to use the restful API
> from an external application, wouldn't I need to essentially develop
> an event driven service? One that would periodically check Orthanc
> for changes and then act accordingly?
Yes, precisely. The "changes" resource ("/changes") is intended to
provide facilities for most use-cases.
http://book.orthanc-server.com/users/rest.html#tracking-changes
The rest of the HTTP API will often be useful of course, as will the
Orthanc SDK for creating new plugins for even more use-cases (e.g.
intercept various requests to call-out to other libraries, programs or
even services via web-hooks). Finally, Orthanc can also be used as a
framework to create other programs using its components in more
flexible ways.
> I admit that some day I may need to switch to an external app
> using the API or develop a plugin, but I thought I'd offer some
> insight into why this particular medical researcher went the
> direction of complicated Lua scripts. In a way, the Orthanc
> developers have made it almost too easy for a non GUI/service coder
> like myself.
>
> I'd be interested in anyone else's thoughts.
"Complex" in most discussions on this topic usually refers to many
things. Consider the following: maintainability, language and
ecosystem, efficient testing facilities, available APIs. Sometimes it
also refers to the load incurred on the Orthanc server; consider how
long scripts will hold up threads and their impact at scale (thread
pool starvation, increased memory pressure, etc).
If none of these considerations (nor any considerations I haven't
thought of but which others will surely do) apply to your scenarios,
I'm sure your use of Lua scripts is perfectly fine.
In particular, I don't think "program length" has much impact on its
own. It often correlates with maintainability issues of course (and
likely other relevant considerations), but not always.
HTH,
--
Thibault Nélis <
t...@osimis.io>
Osimis