The Swim Java SDK contains software framework for building stateful web services that interact via multiplexed streaming APIs.
- Web Agents: Every endpoint URI is backed by a dedicated virtual compute process, called a Web Agent.
- Lanes: Each Web Agent stores data in its own virtual "files", called Lanes.
- Links: Lanes can be continuously synchronized by dynamically "linking" to their streaming APIs.
The vertically integrated backend runtime executes in a single, self-contained OS process per compute node.
- Massive Scale: Millions of Web Agents concurrently run on each server, with linear scalability across clusters.
- General Purpose: Application logic executes in remembered context at the speed of change.
- Really Real-Time: Precise updates propagate through the streaming web with ping latency.
Clone the Swim starter application repository:
git clone https://github.com/swimos/tutorial.git
Start the application to run the complete software stack in a local process.
cd tutorial
./gradlew run
- Swim backend stack
- Building stateful Web Agents
- Managing real-time state in lanes
- Synchronizing remote state with links
- Deploying Web Agents as microservices
To embed the self-contained Swim runtime in a Java application,
add the swim
library as a dependency of the project.
compile group: 'org.swimos', name: 'swim', version: '4.1.0-SNAPSHOT'
<dependency>
<groupId>org.swimos</groupId>
<artifactId>swim</artifactId>
<version>4.1.0-SNAPSHOT</version>
</dependency>
The Swim backend stack runs on any Java 11+ JVM. Depending only on the minimal
java.base
module, it has no other Java library dependencies.
Install a Java 11+ JDK, such as OpenJDK or GraalVM.
The stack is built with Gradle, which can be invoked via the
included gradlew
script.
./gradlew compileJava
./gradlew test
./gradlew :javadoc
Check out the Contributing Guide to learn how to contribute to the Swim Java SDK.
Licensed under the Apache 2.0 License.