Packages

Lightweight, embeddable MQTT broker for BEAM-based edge applications

Current section

Files

Jump to
nipper CHANGELOG.md
Raw

CHANGELOG.md

# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.1.0] - 2024-08-13
### Added
#### Core MQTT Protocol Support
- **MQTT 3.1.1 protocol implementation** with full packet encoding/decoding
- **Connection management** with ThousandIsland TCP server integration
- **Message routing** using Phoenix.PubSub for efficient topic subscriptions
- **QoS 0 and QoS 1** message delivery support
- **Clean session** and **persistent session** support
- **Keep-alive mechanism** with configurable timeouts
- **Will messages** and **retained messages** support
- **Client authentication** with pluggable auth modules
#### GenStage Pipeline Architecture
- **Event-driven streaming** architecture using GenStage
- **Upstream producer** for event batching and delivery
- **Configurable event processing** with backpressure handling
- **Multiple transport options** including mock transport for testing
- **Telemetry integration** throughout the pipeline
#### DoS Protection & Security (Milestone 6.1)
- **Rate limiting system** with sliding window algorithm
- Connection rate limiting (10 connections/minute per IP)
- Message rate limiting (100 messages/minute per client)
- Authentication failure rate limiting (5 failures/5 minutes per IP)
- **Packet size enforcement** with configurable limits
- Maximum packet size (65KB default)
- Maximum payload size limits
- Topic length and client ID length restrictions
- **Resource cleanup on crash** with automatic monitoring
- Process monitoring and cleanup callbacks
- Resource leak detection and prevention
- Memory usage tracking per connection
- **Memory usage monitoring** with automatic alerts
- Real-time memory tracking across components
- Configurable warning and critical thresholds
- Automatic garbage collection under pressure
- Memory leak detection algorithms
#### Authentication & Authorization
- **Pluggable authentication** architecture
- **AllowAll** authentication module (development/testing)
- **Username/password** authentication support
- **Per-client metadata** and session tracking
- **Authentication rate limiting** for brute-force protection
#### Observability & Monitoring
- **Comprehensive telemetry** using `:telemetry` library
- **Connection lifecycle events** (connect, disconnect, keepalive)
- **Message flow tracking** (publish, subscribe, route)
- **Authentication events** and failure tracking
- **Rate limiting events** and threshold violations
- **Memory monitoring events** with automatic alerts
- **Resource monitoring events** for crash detection
- **Default telemetry handlers** with configurable logging
#### Configuration & Deployment
- **Flexible configuration** via Application environment
- **Multiple listener support** with different ports/transports
- **Configurable protocol options** (keepalive, packet sizes)
- **Development and production** environment support
- **Supervisor tree** with proper OTP design patterns
### Technical Features
#### Networking & Protocol
- **ThousandIsland integration** for high-performance TCP handling
- **Binary protocol parsing** with efficient bitstring operations
- **Streaming packet decoder** with proper buffer management
- **Connection state management** with FSM-like transitions
- **Graceful connection shutdown** and cleanup
#### Data Management
- **ETS-based rate limiting** with microsecond precision
- **Phoenix.PubSub** for scalable message routing
- **Registry-based** client session tracking
- **In-memory state management** with proper cleanup
- **Configurable retention policies**
#### Error Handling & Resilience
- **Comprehensive error handling** with proper logging
- **Graceful degradation** under resource pressure
- **Automatic recovery** from process crashes
- **Resource leak prevention** with monitoring
- **Circuit breaker patterns** for upstream connections
#### Performance & Scalability
- **Non-blocking I/O** with ThousandIsland
- **Efficient message routing** with topic matching
- **Memory-efficient** packet processing
- **Configurable connection limits** and resource quotas
- **Automatic garbage collection** under memory pressure
### Testing & Quality Assurance
- **Comprehensive test suite** with 207+ passing tests
- **Property-based testing** using StreamData
- **Integration tests** for end-to-end scenarios
- **Unit tests** for all major components
- **Code coverage tracking** with ExCoveralls
- **Static analysis** with Credo and Dialyzer
- **Benchmarking support** with Benchee
### Documentation
- **Inline documentation** with ExDoc
- **Comprehensive README** with setup instructions
- **API documentation** for all public functions
- **Architecture documentation** with diagrams
- **Configuration examples** and best practices
### Dependencies
- **thousand_island** ~> 1.0 - High-performance TCP server
- **phoenix_pubsub** ~> 2.1 - Scalable pub/sub system
- **gen_stage** ~> 1.2 - Event streaming pipeline
- **telemetry** ~> 1.0 - Metrics and observability
- **jason** ~> 1.4 - JSON encoding/decoding
### Development Tools
- **ex_doc** for documentation generation
- **dialyxir** for static type analysis
- **credo** for code quality checks
- **excoveralls** for test coverage
- **stream_data** for property-based testing
- **benchee** for performance testing
## [Unreleased]
### Planned for 0.2.0
- MQTT 5.0 protocol support
- SSL/TLS transport layer
- Persistent message storage
- Cluster support and horizontal scaling
- Advanced authentication providers
- WebSocket transport support
- Metrics dashboard and monitoring UI
### Planned for 0.3.0
- MQTT bridge functionality
- Message transformation plugins
- Advanced routing rules
- Performance optimizations
- Docker containerization
- Kubernetes deployment manifests
## Development Status
This is an **initial release (0.1.0)** of Nipper MQTT broker. While the core functionality is solid and well-tested, this version is recommended for:
- **Development environments**
- **Proof-of-concept projects**
- **Small-scale deployments**
- **Learning and experimentation**
For production use, please:
1. Thoroughly test in your specific environment
2. Monitor resource usage and performance
3. Configure appropriate security measures
4. Set up proper observability and alerting
5. Plan for backup and disaster recovery
## Breaking Changes
N/A - Initial release
## Migration Guide
N/A - Initial release