Skip to content

Releases: mustafabinguldev/nexus-cache-orchestrator

Nexus Engine - Version 1.4.2

Choose a tag to compare

@mustafabinguldev mustafabinguldev released this 03 Jun 14:41

🚀 Nexus Engine - Version 1.4.2

This release brings significant stability improvements, memory leak fixes, thread-safety enhancements, and clean refactoring across both core core application logic and data addon management.

📋 What's Changed

⚙️ Core & Lifecycle Enhancements (NexusApplication)

  • Thread Safety: Marked the singleton NexusApplication instance as volatile to prevent stale references in highly concurrent multi-threaded environments.
  • Memory & Resource Fixes: Wrapped URLClassLoader within a try-with-resources block to ensure file handles and memory resources are immediately freed after loading JARs.
  • Database & Threading: Resolved a parallel connection race condition on MongoDB by adding a 10-second initial delay to the scheduled task. Also standardized initial database verification tasks on the Swing thread.
  • Safety First: getInfluxDBManager() now returns an Optional<InfluxDBManager>, explicitly enforcing downstream NPE checks when metrics are disabled.

📊 Data & Metrics Refactoring (DataAddon)

  • Critical Bug Fix: Fixed a telemetry bug in handleIncrementData where the old JSON payload was being pushed instead of the newly updated one.
  • Performance Optimization: Reduced repetitive getApplication() and getRedisManager() lookups by caching them into local variables.
  • Early Validation: Added input validation before spawning Redis tasks to eliminate redundant asynchronous operations.
  • Code Cleanups: Modernized Optional handling via .ifPresent(...), simplified metric annotation lookups, and pruned unused imports.

Nexus Core - v1.4.1

Choose a tag to compare

@mustafabinguldev mustafabinguldev released this 23 May 19:49

Nexus Cache Orchestrator - v1.4.1

This release introduces a major stability and reliability improvement for the Nexus Cache Orchestrator system.

The focus of this version is to enhance database connectivity handling, introduce proactive health monitoring, and ensure safe system behavior under failure conditions.

✨ New Features
Added MongoDB client configuration with connection timeout control
Implemented periodic MongoDB health check (watchdog system)
Added automatic detection of connection failure states
Integrated Redis-based scheduled task execution for system monitoring
Added fail-safe shutdown mechanism on critical database failure
Swing-based user notification for critical runtime errors
🧠 Improvements
Improved overall system stability under network/database failures
Reduced risk of silent failures in long-running applications
Better separation between system initialization and runtime monitoring logic
⚠️ Behavior Changes
The system now actively monitors MongoDB connectivity at runtime
Application will perform a controlled shutdown if MongoDB becomes unavailable
Connection issues are now detected immediately instead of failing silently

Nexus Core - v1.4.0

Choose a tag to compare

@mustafabinguldev mustafabinguldev released this 29 Apr 17:31

🚀 Nexus Core - v1.4.0 Release Notes
This version introduces significant workflow automation and expands the core data capabilities of the network. Version 1.4 focuses on "Zero-Touch" initialization and highly efficient global data processing.

🔑 Key Features & Updates
⚙️ Persistent Configuration & Auto-Login
Smart Initialization: Redis and MongoDB connection credentials are now stored in a persistent config file.

Automated Startup: Once configured, the application automatically establishes all database connections on startup. The manual entry menu is now bypassed, allowing for a seamless "launch and go" experience.

🔌 New Global Data Protocols
We have introduced two major protocol-level features to the network architecture:

Global Ranking Protocol: * Provides asynchronous Top-N leaderboard fetching across all servers.

Supports dynamic sorting (ASC/DESC) for any data field.

Rank Finder Protocol: * A high-performance solution to calculate a specific key’s position in global rankings using optimized MongoDB logic.

🛠 NexusJsonDataContainer Enhancements
Fluid Data Manipulation: Added the .remove(String key) method. This allows for real-time data sanitization (e.g., stripping _id or sensitive fields) before the container is serialized and broadcasted.

⚡ Performance & Serialization Fixes
Jackson Compatibility: Fully resolved serialization errors by refactoring internal mapping to native Java structures, ensuring smooth Redis Pub/Sub operations.

Asynchronous Pipeline: Enhanced CompletableFuture handling to ensure heavy ranking and position queries never block the main communication thread.

📦 Technical Summary
Automation: Persistent config for DB/Redis credentials.

New Features: Global Leaderboards & Real-time Position Lookup.

Core Update: Chainable .remove() method added for better data management.

Version 1.3 - The Synchronization Update

Choose a tag to compare

@mustafabinguldev mustafabinguldev released this 27 Apr 16:30

📦 Release v1.3.0 - The Synchronization Update

This version introduces a high-performance data orchestration layer, focusing on real-time synchronization, modularity, and automated memory management.

🌟 New Features

  • Live Protocol Support: Full integration of real-time data streaming and cross-instance communication protocols.
  • Dynamic Cache TTL (Time-To-Live): Every DataAddon now defines its own getCacheTTL(), allowing granular, module-specific memory control.
  • Auto-Invalidating Cache (L1/L2 Sync): Integrated Redis Keyspace Notifications (notify-keyspace-events Ex). Nexus now automatically purges local RAM (L1) when a key expires in Redis (L2).
  • Sliding Expiration: Implemented "touch-to-renew" logic; active data stays in cache while inactive data is automatically evicted after its TTL.

⚡ Performance & Optimizations

  • Dual-Queue Worker Logic: Refined Inbound and Outbound worker threads to ensure non-blocking operations under heavy load.
  • Reflection Caching: Optimized field and annotation scanning within DataAddon to minimize serialization overhead.
  • Pool Stability: Enhanced JedisPool configuration for better stability in high-concurrency environments.

🛠 Technical Improvements

  • Protocol Refactoring: The DataAddon abstract class now enforces strict TTL management.
  • Smart Logging: Improved console feedback for cache invalidation events to assist in debugging.
  • Automatic Configuration: Redis settings are now automatically updated to support keyspace events upon connection.

Release v1.2.0 — DataAddon Performance Overhaul & Increment Protocol

Choose a tag to compare

@mustafabinguldev mustafabinguldev released this 26 Apr 00:10

Release v1.2.0 — DataAddon Performance Overhaul & Increment Protocol

Released: 2026-04-26

────────────────────────────────────────

WHAT'S NEW

INCREMENT_DATA Protocol
A new request type that allows atomic numeric field increments directly
over the network without a full SET_DATA round-trip. Supports both
integer (long) and floating-point (double) fields. Invalid fields,
missing keys, and null values are rejected early with structured warnings.

────────────────────────────────────────

PERFORMANCE IMPROVEMENTS

Shared ObjectMapper
ObjectMapper is now a static final constant shared across all DataAddon
instances. Previously a new instance was created per subclass, generating
unnecessary GC pressure under load.

Reflection Cache
Field scanning via getDeclaredFields() is now performed once and cached
per instance. getIdFieldName(), getIdClassName(), and getAnnotatedFields()
all benefit from lazy double-checked locking — repeated calls are now
effectively free.

L1 Cache Short-Circuit
getData() no longer runs modelInitComp() on memory-cached (L1) models.
modelInitComp() now only runs on Redis (L2) and MongoDB (L3) loads where
schema migration is actually needed.

────────────────────────────────────────

BUG FIXES

State Corruption in modelInit()
modelInit() was writing back to instance fields via field.set(this, ...)
as a side effect of JSON generation. Under concurrent load this caused
silent data corruption. modelInit() is now purely functional.

Race Condition in handleIncrementData()
Concurrent increments on the same key were overwriting each other.
A per-key ConcurrentHashMap lock now serializes the read-mutate-write
sequence atomically.

NullPointerException in handleRemove()
Boolean unboxing on a potentially null value from the JSON container
could throw NPE. Replaced with Boolean.TRUE.equals() for null-safe check.

Missing Primitive Types in convertToType()
long / Long and double / Double were not handled explicitly and fell
through to the reflection path unnecessarily. Both are now covered.

────────────────────────────────────────

INTERNAL / HOUSEKEEPING

  • All logging migrated from System.out and e.printStackTrace()
    to java.util.logging with structured [DataAddon/] prefixes
  • Log levels: SEVERE for unrecoverable errors, WARNING for bad input
  • All log messages and inline comments translated to English

────────────────────────────────────────

MIGRATION NOTES

No API changes. DataAddon subclasses require no modifications.
The INCREMENT_DATA handler is opt-in via handleRequest() routing.

────────────────────────────────────────

FULL CHANGELOG

v1.1.0 → v1.2.0
https://github.com/darkland/nexus/compare/v1.1.0...v1.2.0

v1.1.0 - Cache Layer Overhaul

Choose a tag to compare

@mustafabinguldev mustafabinguldev released this 25 Apr 17:27

v1.1.0 — Cache Layer Overhaul

Overview

This release is a full architectural redesign of the data synchronization layer (RedisDataContainer). The previous implementation had an ambiguous cache hierarchy, race conditions, and potential data loss paths. All known issues have been addressed.


What's New

Redis-Master Cache Hierarchy
Redis is now the single source of truth across all layers. No external process can override Redis data. Priority order is strictly enforced: Redis → L1 Cache → MongoDB.

Redis Evict / TTL Recovery
If a key is evicted from Redis or expires via TTL, the L1 Sync task automatically restores it from L1 and marks it dirty so the flush task re-persists it to MongoDB. Previously, evicted keys were silently skipped.

Batch Reconciliation
The reconciliation task now processes entries in batches of 50 concurrent MongoDB requests. Previously, all entries were queried simultaneously — on datasets of 1000+ entries this caused uncontrolled request spikes against MongoDB.

O(1) ID Lookup
getDataModelFromId() previously performed a full linear scan (O(n)) over the entire in-memory map. A reverse index (id → key) has been added, making lookups instant regardless of dataset size.


Bug Fixes

  • Data loss on flush failuredirtyKeys.remove() was called before confirming the MongoDB write. If the write failed, the dirty flag was already gone and the entry would never be retried. Fixed: flag is removed only after .get() confirms success.
  • TOCTOU race in removeModel()containsKey() followed by remove() is not atomic; another thread could delete the entry between the two calls. Fixed: direct remove() with return value check.
  • Deadlock risk in reconciliationprocessTask was being called from inside an already-running processTask via thenAccept. Fixed: all reconciliation logic runs within a single task context.
  • addModelFix() leaving Redis empty — the method wrote only to L1, leaving Redis without the key. The next L1 Sync would detect the missing key and trigger a redundant restore cycle. Fixed: both L1 and Redis are written together via writeToL1AndRedis().

Internal Changes

  • idToDataList renamed to keyToModel for clarity
  • updateInternal() renamed to writeToL1AndRedis() to reflect exact behaviour
  • System.out.println replaced with java.util.logging.Logger throughout
  • Sync intervals adjusted: L1 Sync 10s, Auto Flush 15s, Reconciliation 3min

Upgrade Notes

This release is a drop-in replacement. Public API method signatures are unchanged.
addModelFix() behaviour has changed slightly — it now also writes to Redis immediately, which is the correct behaviour and should not affect existing call sites.

v1.0.0 – Stable Release

Choose a tag to compare

@mustafabinguldev mustafabinguldev released this 24 Apr 20:00

This is the first stable release of the project.

✨ Features

  • Core functionality implemented
  • Stable and tested build
  • Ready for production use

📦 Build

  • Executable JAR file included

🚀 How to Run

java -jar nexus-core.jar