Skip to content

Latest commit

 

History

History
163 lines (121 loc) · 4.81 KB

File metadata and controls

163 lines (121 loc) · 4.81 KB

GOSS Quick Start Guide

Get up and running with GOSS in 5 minutes.

Prerequisites

  • Java 21 installed
  • Git for cloning the repository

1. Clone and Build

git clone <your-repository-url>
cd GOSS

# Verify Java 21
java -version

# Build executable JARs
./gradlew :pnnl.goss.core.runner:createSimpleRunner

2. Run GOSS

# Navigate to executable
cd pnnl.goss.core.runner/generated/executable

# Start GOSS (will run until Ctrl+C)
java -jar goss-simple-runner.jar

You should see:

Starting GOSS Simple Runner...
GOSS Core services are running
ActiveMQ Broker: tcp://0.0.0.0:61617
STOMP: tcp://0.0.0.0:61618
GOSS Simple Runner started successfully!
Press Ctrl+C to stop

3. Test Connection

Using Java Client

// Connect to GOSS
ClientFactory factory = new ClientFactoryImpl();
Client client = factory.create("tcp://localhost:61617");

// Send a message
MyRequest request = new MyRequest();
Response response = client.getResponse(request);

Using Command Line (STOMP)

# Install STOMP client (optional)
npm install -g stomp-client

# Connect and send message
stomp connect stomp://localhost:61618
stomp send /queue/test "Hello GOSS!"

4. What's Running?

GOSS provides:

  • Message Broker: ActiveMQ on port 61617 (OpenWire) and 61618 (STOMP)
  • Request/Response: Synchronous and asynchronous messaging
  • Security Framework: Apache Shiro (currently disabled for simplicity)
  • Extensible Handlers: Plugin architecture for custom request processing

Next Steps

For Developers

  • Read DEVELOPER-SETUP.md for IDE setup
  • Explore pnnl.goss.core/src/ for API documentation
  • Run integration tests: ./gradlew check

For Production

Create Your First Handler

@Component
public class HelloWorldHandler implements RequestHandler {

    @Override
    public Response handle(Request request) {
        return new HelloWorldResponse("Hello from GOSS!");
    }

    @Override
    public Class<? extends Request> getHandledRequestType() {
        return HelloWorldRequest.class;
    }
}

Troubleshooting

Port already in use?

# Check what's using port 61617
sudo netstat -tlnp | grep 61617

# Or modify the ports in GossSimpleRunner.java and rebuild

Java version issues?

# Make sure you're using Java 21
export JAVA_HOME=/path/to/java-21
java -version

Build failures?

# Clean build
./gradlew clean build

Architecture Overview

┌─────────────────────────────────────────────┐
│                 GOSS Platform               │
├─────────────────────────────────────────────┤
│  Request Handlers  │  Security Framework   │
│  ┌───────────────┐  │  ┌─────────────────┐  │
│  │ Custom        │  │  │ Apache Shiro    │  │
│  │ Handlers      │  │  │ Authentication  │  │
│  └───────────────┘  │  │ Authorization   │  │
│                     │  └─────────────────┘  │
├─────────────────────────────────────────────┤
│            Core GOSS Framework              │
│  ┌─────────────────────────────────────────┐ │
│  │          Request/Response API           │ │
│  │    Client Factory │ Message Routing    │ │
│  └─────────────────────────────────────────┘ │
├─────────────────────────────────────────────┤
│           Apache ActiveMQ Broker           │
│  ┌───────────┐ ┌──────────┐ ┌─────────────┐ │
│  │ OpenWire  │ │  STOMP   │ │ Persistence │ │
│  │:61617     │ │  :61618  │ │   KahaDB    │ │
│  └───────────┘ └──────────┘ └─────────────┘ │
└─────────────────────────────────────────────┘

Congratulations! You now have GOSS running. Start building your distributed messaging applications!