platform-java is a Java application platform designed to run multiple independent Java applications within a single JVM with comprehensive isolation - similar to running them in separate terminal windows, but with managed resources and optional inter-app communication.
platform-java/
├── pom.xml (parent aggregator)
├── platform-java-api/ ✅ COMPLETE - 22 interface/class files
├── platform-java-core/ 📦 Structure ready
├── platform-java-classloader/ 📦 Structure ready
├── platform-java-threadpool/ 📦 Structure ready
├── platform-java-security/ 📦 Structure ready
├── platform-java-monitoring/ 📦 Structure ready
├── platform-java-messaging/ 📦 Structure ready
├── platform-java-deployment/ 📦 Structure ready
├── platform-java-launcher/ 📦 Structure ready
└── platform-java-samples/ 📦 Structure ready
Core Application APIs:
Application- Application lifecycle interfaceApplicationContext- Runtime context with access to all platform featuresApplicationDescriptor- Deployment metadataApplicationState- Lifecycle state enumApplicationLifecycleListener- Event listener for lifecycle changes
Thread Pool APIs:
ThreadPoolExecutor- Managed thread pool interfaceThreadPoolConfig- Thread pool configurationThreadPoolStats- Thread pool metrics
Security APIs:
SecurityPolicy- Security enforcement interfaceSecurityConfig- Security configuration
Resource Monitoring APIs:
ResourceMonitor- Resource tracking interfaceResourceSnapshot- Point-in-time resource metricsResourceQuota- Resource limit configurationResourceUsageHistory- Historical metricsResourceEventListener- Resource event notificationsResourceConfig- Resource configuration
Messaging APIs (Optional):
MessageBus- Publish/subscribe messagingMessage- Message data structureMessageHandler- Message handler interfaceSubscription- Subscription handleServiceRegistry- Service registration and lookup
PlatformSharedClassLoader (platform-java-api - shared)
├── App1ClassLoader (parent-last delegation)
├── App2ClassLoader (parent-last delegation)
└── App3ClassLoader (parent-last delegation)
- File system (drop JARs, auto-detect)
- Programmatic API
- CLI/Console
- Configuration files (YAML/JSON/XML)
- REST API (planned)
- Socket-based (planned)
- ClassLoader Isolation - Prevents version conflicts
- Thread Pool Isolation - Per-app thread pools with limits
- Security Isolation - Configurable permissions
- Resource Monitoring - CPU, memory, thread tracking
- Applications can opt-in to messaging
- Event bus for publish/subscribe
- Service registry for service lookup
- Complete isolation for apps that don't need it
✅ API module compiles successfully ✅ Maven structure validates 📦 Ready for core implementation
-
Implement IsolatedClassLoader (platform-java-classloader)
- Parent-last delegation for app classes
- Parent-first for platform APIs
- Resource tracking for cleanup
-
Implement ManagedThreadPool (platform-java-threadpool)
- Wrapper around java.util.concurrent.ThreadPoolExecutor
- Thread naming with applicationId
- Graceful shutdown
- Statistics tracking
-
Implement ApplicationManager (platform-java-core)
- Application registry
- Lifecycle state machine
- Coordination of isolation subsystems
- ApplicationContext implementation
-
Basic Platform Launcher (platform-java-launcher)
- Bootstrap process
- Configuration loading
- Shutdown hooks
- File system deployment provider
- CLI deployment interface
- Config file deployment
- Security policy implementation
- Resource monitoring implementation
- Messaging implementation
- Monitoring exporters (JMX, Prometheus)
- Sample applications
- Integration tests
- Build System: Maven (multi-module)
- Java Version: Java 11+ (target 11, compatible with 17+)
- Isolation Levels: All four (ClassLoader, ThreadPool, Security, ResourceMonitor)
- Security Approach: Dual mode (SecurityManager for Java 8-16, instrumentation for 17+)
- Resource Monitoring: ThreadMXBean for CPU, estimated heap tracking, optional JVMTI agent
- Communication: Optional opt-in (MessageBus + ServiceRegistry)
- Application Types: Support both
Applicationinterface and plainmain()methods
- REST API framework (Spring Boot vs embedded Jetty vs Javalin)
- CLI framework (picocli vs JCommander)
- Configuration format priority (YAML primary vs JSON vs XML)
- Logging framework specifics (already using SLF4J + Logback)
- Test framework details (already using JUnit 5)
public class MyApp implements Application {
@Override
public void start(ApplicationContext context) {
context.getThreadPool().submit(() -> {
// Do work
});
context.getMessageBus().ifPresent(bus -> {
bus.subscribe("events", msg -> {
// Handle message
});
});
}
@Override
public void stop() {
// Cleanup
}
}public class LegacyApp {
public static void main(String[] args) {
// Standard Java app - runs in isolation
}
}ApplicationManager manager = new ApplicationManager();
ApplicationDescriptor descriptor = ApplicationDescriptor.builder()
.applicationId("my-app")
.mainClass("com.example.MyApp")
.addClasspathEntry(new File("my-app.jar").toURI())
.threadPoolConfig(ThreadPoolConfig.builder()
.corePoolSize(4)
.maxPoolSize(10)
.build())
.enableMessaging(true)
.build();
manager.deploy(descriptor);
manager.start("my-app");- ✅
README.md- Project overview and architecture - ✅
PROJECT_STATUS.md- This file - 📋 JavaDoc (to be generated)
- 📋 User Guide (to be written)
- 📋 Developer Guide (to be written)
Lines of Code: ~1,000+ (API definitions) Test Coverage: 0% (no tests yet) Working Features: API definitions complete Build Time: < 2 seconds Build Status: ✅ SUCCESS
- Scot P. Floess (initial design and architecture)
- Phase 1 (MVP): 2-3 weeks - Basic deployment, ClassLoader, ThreadPool, lifecycle
- Phase 2 (Deployment): 1-2 weeks - Filesystem, CLI, config-based deployment
- Phase 3 (Isolation): 1-2 weeks - Security, resource monitoring
- Phase 4 (Advanced): 2-3 weeks - Messaging, REST API, monitoring exporters
- Phase 5 (Production): Ongoing - JVMTI agent, clustering, web console
Total to Production-Ready: ~2-3 months part-time
See README.md for architecture details and design decisions.