This is a short introduction to creating web services that can be deployed to any Language Grid server. The Service Grid uses SOAP for inter-service communications, however the complexities of working with SOAP have been abstracted away by the Service Grid and Language Grid layers.
For this tutorial you will require:
- Java 1.7 (or later)
- Maven 3.0.x
- an IDE such as IntelliJ or Eclipse
- about < 2 hours
We will go through a step-by-step tutorial to create a simple Lappsgrid service, WhitespaceTokenizer
implementing all requirement for a language grid service. The tutorial includes writing java programs, packaging to Maven WAR package, and testing the package.
Each step covers a single topic, and will take 15 - 30 minutes
In step #1, we will set up a Maven project (POM) with lappgrid API dependencies for Lappsgrid services. (Goto step1)
In step #2, we will take a close look at implementation requirements for a Lappsgrid service - especially I/O specifications, and then write a simple toknization method satisfying partial requirements in the WhitespaceTokenizer
service implementation. (Goto step2)
In step #3, we will see what should be implemented as metadata for our WhitespaceTokenizer
service, and then go through two example ways to implement getMetadata()
, another required method for a Lappsgrid service. (Goto step3)
In step #4, we will see how to compile a service into a Maven WAR package with service manifests. We also taks a quick look at how to deploy compiled service onto a tomcat server. (Goto step4)
In step #5, we will test out WhitespaceTokenizer
service, first as a java program, then as a web-service. (Goto step5)
Coming soon.
Coming soon.
To start the tutorial from the first step, run the command:
> git checkout step1
Or follow the link: step1