Skip to content

ZMX #78 Optimization#79

Open
zstoimchev wants to merge 6 commits into
developfrom
feature/ZMX-#78-optimization
Open

ZMX #78 Optimization#79
zstoimchev wants to merge 6 commits into
developfrom
feature/ZMX-#78-optimization

Conversation

@zstoimchev

Copy link
Copy Markdown
Owner

Implementation and enhancements of #78. See issue for more info...

@zstoimchev zstoimchev linked an issue Jun 7, 2026 that may be closed by this pull request
@zstoimchev

zstoimchev commented Jun 7, 2026

Copy link
Copy Markdown
Owner Author

Backlog

Logger

  • Add day-rolling — currently the file is opened once at startup with today's but never rolls over if the process runs past midnight
  • Add old file pruning — delete log files older than logger.retention.days (property exists in logger.properties but is never read or acted on)
  • Add JVM shutdown hook to flush and close FILE_OUT cleanly on exit

Networking

  • Fix thundering herd in startPeerMaintenance — currently submits a task for every unknown peer at once; limit to maxConnections - currentConnections
  • Track in-progress connections — maintenance ignores peers currently being to, causing duplicate connection attempts across cycles; use a ConcurrentHashMap keyed set to track them
  • Increase ServerSocket backlog in Server — default is 50, which gets overwhelmed at higher peer counts; set explicitly to 200+

CLI

  • Implement printCircuitRoutes() — method body is empty

Configuration

  • Add connection.retry.attempts and connection.timeout.milliseconds to node.peer.test1/2/3.properties — currently missing, falls back to defaults silently
  • Implement config value validation in Config — there is a TODO comment for this; at minimum guard all Integer.parseInt calls so a bad property value doesn't crash startup

Cleanup

  • Remove logback.xml from src/main/resources — dead file, no SLF4J or Logback dependency in pom.xml, does nothing
  • Clean up connectToPeer retry logic — if (retries == attempts) continue is misleading (works accidentally); replace with break or restructure the loop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimization

1 participant