|
| 1 | +# Changelog |
| 2 | + |
| 3 | +All notable changes to this project will be documented in this file. |
| 4 | + |
| 5 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
| 6 | +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 | + |
| 8 | +## [0.6.0] - 2025-12-10 |
| 9 | + |
| 10 | +### Added |
| 11 | + |
| 12 | +- **Deferred Reply Pattern for GenServer** - Full Erlang-style deferred reply support |
| 13 | + - Added `CallResponse<T>` enum with `Reply(T)` and `NoReply` variants |
| 14 | + - Implemented `ReplyHandle<T>` for sending deferred replies asynchronously |
| 15 | + - Server can now accept requests, return immediately, and reply later when work completes |
| 16 | + - Multiple concurrent deferred calls supported |
| 17 | + - Matches Erlang's `{noreply, State}` and `gen_server:reply/2` semantics exactly |
| 18 | + - Breaking change: `GenServer::handle_call` now returns `CallResponse<Self::CallReply>` instead of `Self::CallReply` |
| 19 | + |
| 20 | +- **Selective Receive** - Erlang-style pattern matching for messages |
| 21 | + - Added pending queue (`Mutex<VecDeque<Envelope>>`) to `Mailbox` for non-matching messages |
| 22 | + - Implemented `recv_matching()` with timeout support |
| 23 | + - Implemented `try_recv_matching()` for non-blocking selective receive |
| 24 | + - Added three public methods to `ActorContext`: |
| 25 | + - `receive(predicate)` - Wait indefinitely for matching message |
| 26 | + - `receive_timeout(predicate, timeout)` - Wait with timeout |
| 27 | + - `try_receive(predicate)` - Non-blocking check |
| 28 | + - Non-matching messages saved to pending queue and checked first on subsequent receives |
| 29 | + - Maintains message ordering through `VecDeque` |
| 30 | + - Perfect for RPC patterns with correlation IDs |
| 31 | + |
| 32 | +- **Examples** |
| 33 | + - `gen_server_deferred_reply.rs` - Job processor demonstrating async work with deferred replies |
| 34 | + - `actor_selective_receive.rs` - RPC client/server with correlation IDs using selective receive |
| 35 | + |
| 36 | +- **Documentation** |
| 37 | + - Updated `GETTING_STARTED.md` with comprehensive deferred reply and selective receive sections |
| 38 | + - Updated `GETTING_STARTED_RU.md` with full Russian translations |
| 39 | + - Added code examples, benefits, use cases, and Erlang mappings |
| 40 | + - Updated example lists in both English and Russian guides |
| 41 | + |
| 42 | +### Fixed |
| 43 | + |
| 44 | +- Resolved clippy warnings in `actor_selective_receive` example |
| 45 | +- Removed unused `monitored` field from `MonitorActor` struct |
| 46 | +- Collapsed nested if statements using let-chain patterns |
| 47 | + |
| 48 | +### Changed |
| 49 | + |
| 50 | +- **Breaking**: `GenServer::handle_call` signature changed to return `CallResponse<Self::CallReply>` |
| 51 | + - Migration: wrap existing returns in `CallResponse::Reply(value)` |
| 52 | + - Example: `state.value` → `CallResponse::Reply(state.value)` |
| 53 | + |
| 54 | +### Technical Details |
| 55 | + |
| 56 | +- Deferred reply uses `tokio::spawn` for async work without blocking the server |
| 57 | +- Selective receive uses `Mutex<VecDeque<Envelope>>` for thread-safe pending queue |
| 58 | +- Predicates use `FnMut(&Message) -> Option<T>` for flexible pattern matching |
| 59 | +- Timeout support via `tokio::time::timeout_at` |
| 60 | +- All new features include comprehensive test suites (12 new tests total) |
| 61 | +- All tests passing, code formatted, clippy clean |
| 62 | + |
| 63 | +## [0.5.0] - 2024-12-09 |
| 64 | + |
| 65 | +### Added |
| 66 | + |
| 67 | +- Comprehensive Getting Started guides in English and Russian |
| 68 | +- Property-based testing with QuickCheck for improved reliability |
| 69 | +- Distributed system metrics for telemetry |
| 70 | +- Unified `ActorSystem` with transparent distributed support |
| 71 | +- Location-transparent messaging (same API for local and remote actors) |
| 72 | +- Remote messaging support with full RPC capabilities |
| 73 | +- Ping/pong RPC for remote `is_process_alive()` |
| 74 | +- Handshake protocol for bidirectional connections |
| 75 | +- EPMD (Erlang Port Mapper Daemon) client and server implementation |
| 76 | +- Custom telemetry providers support |
| 77 | +- Memory tracking for actors and mailboxes |
| 78 | + |
| 79 | +### Changed |
| 80 | + |
| 81 | +- Deprecated `DistributedSystem` in favor of `ActorSystem::new_distributed()` |
| 82 | +- Cleaned up CI verbosity and deprecated struct documentation |
| 83 | +- Migrated to unified ActorSystem architecture |
| 84 | + |
| 85 | +### Fixed |
| 86 | + |
| 87 | +- Resolved clippy warnings in distributed.rs |
| 88 | +- Various documentation consistency improvements |
| 89 | + |
| 90 | +## Earlier Versions |
| 91 | + |
| 92 | +For earlier version history, see the git commit log. |
| 93 | + |
| 94 | +[0.6.0]: https://github.com/am-kantox/joerl/compare/v0.5.0...v0.6.0 |
| 95 | +[0.5.0]: https://github.com/am-kantox/joerl/compare/v0.4.0...v0.5.0 |
0 commit comments