-
Notifications
You must be signed in to change notification settings - Fork 23
Server Create
The Server enables using the biomedical concept recognition services through simple and self-explanatory interfaces. That way, users without computer science background can also take advantage of such advanced features. Moreover, the Server also provides administration features, which allows real-time configuration of existing services characteristics and available resources. In summary, the Web Server provides two different interaction points:
- Service: allows any one to use the annotation service through a simple and interactive interface, or through the REST API;
- Administration: allows administrators do manage their services, by adding, editing or removing services, dictionaries and machine learning models.
A demo is available at https://neji.bmd-software.com/annotate/default.
Due to a compatibility issue between the most recent versions of Java and JSPs, the Web Server only works with Java 8u77, which can be downloaded from http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html#jre-8u77-oth-JPR.
To start the Web server, please use the nejiWeb.sh
executable, which provides detailed help information.
Executing nejiWeb.sh
starts the Web server with default configurations, running an HTTPS server at port 8010 with number of cores minus 1 parallel processing threads. After the server starts, by loading the associated resources and tools, please go to https://localhost:8010/, and if the interface appears, you are ready to go and start using the concept annotation services.
If the default server settings do not fit your infrastructure, you can easily change the default configurations. For instance, to run the server at the port 443 using two parallel processing threads, please execute the following command:
./nejiWeb.sh –port 443 –t 2
Installing the Web server as a service is straightforward. Such resources are available in the "service" folder. Thus, you should configure the following variables in the "neji” file:
- JAVA_HOME: folder where Java is installed. Default value is “/usr/lib/jvm/java-7-oracle”;
- DIR: folder where the software package is available. Default value is “/opt/neji”.
To install the Web server as a service, in the “service” folder, just execute:
./install-service.sh
Afterwards, the server can be controlled using the Operating System service manager:
-
service neji start
: start the Web server; -
service neji stop
: stop the Web server; -
service neji status
: check the Web server status; -
service neji logs
: get Web server logs;
You can also use neji.sh
to create a deployable Web server package with a pre-defined processing pipeline and resources.
For instance, if you are using Neji locally to process your documents, and want to deploy that specific processing pipeline as a REST service and Web Page, you just need to add the option -s
.
The following command will create a Web server package ready to deploy on any machine:
./neji.sh -i example/annotate/in/ -if RAW -o example/annotate/out/ -of JSON -d resources/dictionaries/ -m resources/models/ -t 1 -s