Follow the Installation instructions below to create your environment for developing SWIM applications.
Refer to the SWIM developer site for an overview of SWIM concepts.
We highly recommend that you go through at LEAST the basics tutorial to see how these concepts manifest themselves in a real SWIM application.
-
Install JDK 8. Ensure that your JAVA_HOME environment variable is pointed to the Java 8 installation location. Ensure that your PATH includes $JAVA_HOME.
-
Refer to the sample build.gradle for reference. You may use this build.gradle for all your applications.
-
To build the application execute the command
./gradlew build
from a shell pointed to the application's home directory. This will create a.zip
and a.tar
inAPP_HOME/build/distributions
directory. Unpackage the.zip
or the.tar
file. The unpackaged contents will contain abin/
directory which contains scripts that can be used to run the application.user@machine:~$ ./gradlew run
-
Alternatively, if you don't mind running through the Gradle VM, execute the command
./gradlew run
. This will both build and run the application.user@machine:~$ ./gradlew run
SWIM is an eventually consistent, real-time, distributed object system. The building blocks of a SWIM server are Services
, Lanes
, Links
, and a single Plane
, where
Services
are objectsLanes
are the fields and methods, ofServices
Links
are references toLanes
inServices
- The
Plane
is a collection ofService
definitions.
Public Services
and Lanes
form a SWIM API (streaming API over web-sockets).
We again refer you to the [SWIM developer site](SWIM developer site for a detailed overview of these SWIM concepts.
There are just three steps to build a SWIM Application.
- Write SWIM
Services
with appropriateLane
declarations and configurations - Define a
Plane
with allServiceType
fields appropriately declared and all desired configurations loaded - Ingest data into
Lanes
usingcommands
orDownlinks
, via either aSwimClient
instance or an external program
That's it! Services
spawn lazily when a URI associated with a Service
or Lane
instance is invoked for the first time, so SWIM Services
will process data immediately upon its availability without requiring their explicit instantiation.
Visit the following tutorials to see concrete applications built through these steps.