Looks like you forgot to define web application for your REST Service.  Please look at the documentation. And at this part:

Each subclass that has its own entry point must have its own CSP web application. You define the CSP web application and specify its security for on the Management Portal’s [Home] > [Security Management] > [Web Application] page, which you can access by clicking System AdministrationSecurityApplications, and Web Applications. When you define the CSP web application, you set the Dispatch Class to the name of the custom subclass of %CSP.REST and specify the first part of the URL for the REST call as the name of the application.

When you export and import this class to another namespace(s), you will have multiple different copies. I think much better to have the same class in all namespaces. You can do it with package mapping. And here you have two ways create a mapping in the each namespace where you need access to this class, or create special namespace %ALL, and configure mapping which will be available in all namespaces (except DOCBOOK and SAMPLES).

$case is used to convert one value to another. Like, you have some code, but you need a display text for it, you can do so:

set display=$case(gender,"F":"Female","M","Male",:"Unknown")

$select returns value when meets the first true condition. It needs if can't compare only one variable, or you have some more conditions.

write $SELECT(0=$ISVALIDNUM(x):"not a number",x=0:"zero",""=$NUMBER(x,"I"):"not an integer",x#2=1:"odd",1:"even")

Hi Greg, 

It is a very interesting question. I can't give you all that you want, but I'll try to give some hints. 

Deploy Script

In first, you are looking for some script. While you have to execute some script from Operation System, you have different ways how to do it. And here again, depends on what are you going to inside Caché. As you working on some Linux system, I'll start from it.

Linux:

To start some script inside of Caché you may use csession tool, in two ways: 

  • specify some routine or class, which will be executed at once, and after finish, that code csession will exit. In this case, you have to use some internal code, which already ships by InterSystems, or you can install some of your code.
    csession ENSEMBLE -UUSER ##CLASS(package.class).method()
  • or you can write some COS code, generated in your script, or just in a text file near to script. And send this code to csession. 
    csession ENSEMBLE -UUSER < deploy.mac

Windows:

On a Windows system, you don't have csession tool. But here available another tool cterm.

  • you can also specify routine name
    cterm /console=cn_ap:ENSEMBLE[USER]:^%D
  • but cterm also support special scripts format, which supports even interactive mode.

For both Windows and Linux also possible to launch executable file cache, and call your code in almost the same way as it does csession.

Deploy

To launch that script, you can use any of Continuous Integration system, which you like. I would recommend Jenkins, it is an opensource project, has lots of plugins, and supports multi servers installation. You can configure to launch your script, just by timetable, every time. Or check if appeared some new commits in your chosen System of control version (Subversion or so on), since it was run last time. Multi-server version may help have some different servers with a secondary installation of Jenkins, and control all of them from the master node.

Last time I found GitLab for myself, it quite good git server, with CI service inside. Supports multiple runners for CI, and you can choose which runner should execute some stages. You can easily configure multiple tasks which will be run after every commit. Like build, test and deploy if everything is OK.

You can find answer on your question in the documentation.

The Caché Java Binding is Deprecated

Java Persistence Architecture (JPA) is the recommended persistence technology for complex object hierarchies in Java projects. Caché and Ensemble currently support JPA 1.0 and 2.0 via the Hibernate implementations of the JPA specifications. See “Using the Caché Hibernate Dialect” in Using Caché with JDBC.

Extreme Event Persistence (XEP) is the recommended persistence technology for high-performance simple to medium complexity object hierarchies in Java projects. See “Using eXTreme Event Persistence” in Using Java with Caché eXTreme.

Looks like, you don't know how this technology works.

The server will send content after all content is ready to send. Browser shows page, just after loading all the page, or partially, if this page is too big.

To do what you want, you should have some code on client side, which will ask the server for the new lines by Ajax. Or with WebSocket, just get new lines from the server. But it means that process which generates such logs, should be different to the session process.