How research-iobserve/distributed-jpetstore-experiment works
Project type and purpose
• This is an experiment‐orchestration framework for a microservices version of JPetStore.
• It uses shell scripts to launch JPetStore services (account, catalog, order, frontend) in Docker or Kubernetes, runs a workload generator (Selenium), collects monitoring data with Kieker or iObserve, and stores results.
File structure
• Top‐level scripts:
• execute-jpetstore-with-workload.sh
• execute-observation.sh
• execute-integrated-experiment.sh
• execute-integrated-kube-experiment.sh
• helper scripts (common-functions.sh, show-log-info.sh, tag-and-push-to-repository.sh, etc.)
• Configuration:
• config.template → user‐filled config with $BASE_DIR, TOOLS_DIR, DATA_DIR, RESULT_DIR, DOCKER_REPO, LOGGER, JPETSTORE, WORKLOAD_RUNNER, WEB_DRIVER, COLLECTOR
• jpetstore-configuration.yaml
• Deployment directories:
• kubernetes/ and kub2/ → Kubernetes YAMLs for the four JPetStore services + services + optional USA geography
• Workload definitions:
• workloads/*.yaml → behavior/workload scenarios for Selenium-based runner
• Documentation:
• doc/*.md → setup instructions for Docker registry, Kubernetes, pushing images
• Output directories:
• results/ → alarms.txt, warnings.txt
Key insights from the README
• The scripts orchestrate:
• Stopping/removing old containers
• Starting JPetStore microservices on a bridged Docker network or on K8s
• Optionally starting the Selenium workload runner
• Optionally starting a monitoring collector (Kieker or iObserve) that sends logs to LOGGER host
• Dependencies: JPetStore-6 codebase, selenium-workloads, iobserve-analysis, Kieker distributable, Docker engine, Kubernetes cluster
Main components
a. Orchestration layer (shell‐script runner)
– Reads config
– Invokes Docker CLI or kubectl
– Starts/stops containers or pods
– Launches workload runner
– Launches collector
b. JPetStore microservices
– account service container/pod
– catalog service container/pod
– order service container/pod
– frontend service container/pod (exposes HTTP on :8080)
c. Network
– Docker bridged network or K8s cluster network
– Kubernetes Service objects routing to pods
d. Workload runner
– Selenium‐based Java app reading workloads/*.yaml
– Drives HTTP traffic against frontend
e. Monitoring collector
– Kieker or iObserve collector
– Receives tracing/monitoring events from instrumented services
– Sends logs to LOGGER host (could be local or remote)
f. Storage
– DATA_DIR for raw logs
– RESULT_DIR for analysis output
g. External systems
– Docker registry (optional, for pushing/pulling images)
– Kubernetes API server (when using k8s)
Relationships and data flows
• Orchestrator → Docker/K8s API: creates JPetStore service instances
• JPetStore services ↔ each other (account ↔ order ↔ catalog, etc.)
• Frontend ← HTTP ← Workload runner
• Services → monitoring events → Collector → LOGGER host → files in DATA_DIR
• After experiment: Collector/analysis tools → RESULT_DIR
• Images ←→ Docker registry (tag‐and‐push)
Architectural patterns & principles
• Microservices for core JPetStore domains
• Infrastructure‐as‐code: Kubernetes YAMLs, shell scripts as automation
• Separation of concerns: orchestration vs. workload generation vs. monitoring
• Pluggable monitoring backends (Kieker vs. iObserve)
• Config‐driven experiments (via config.template)