smart_message 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/deploy-github-pages.yml +38 -0
  3. data/.gitignore +5 -0
  4. data/CHANGELOG.md +30 -0
  5. data/Gemfile.lock +35 -4
  6. data/README.md +169 -71
  7. data/Rakefile +29 -4
  8. data/docs/assets/images/ddq_architecture.svg +130 -0
  9. data/docs/assets/images/dlq_architecture.svg +115 -0
  10. data/docs/assets/images/enhanced-dual-publishing.svg +136 -0
  11. data/docs/assets/images/enhanced-fluent-api.svg +149 -0
  12. data/docs/assets/images/enhanced-microservices-routing.svg +115 -0
  13. data/docs/assets/images/enhanced-pattern-matching.svg +107 -0
  14. data/docs/assets/images/fluent-api-demo.svg +59 -0
  15. data/docs/assets/images/performance-comparison.svg +161 -0
  16. data/docs/assets/images/redis-basic-architecture.svg +53 -0
  17. data/docs/assets/images/redis-enhanced-architecture.svg +88 -0
  18. data/docs/assets/images/redis-queue-architecture.svg +101 -0
  19. data/docs/assets/images/smart_message.jpg +0 -0
  20. data/docs/assets/images/smart_message_walking.jpg +0 -0
  21. data/docs/assets/images/smartmessage_architecture_overview.svg +173 -0
  22. data/docs/assets/images/transport-comparison-matrix.svg +171 -0
  23. data/docs/assets/javascripts/mathjax.js +17 -0
  24. data/docs/assets/stylesheets/extra.css +51 -0
  25. data/docs/{addressing.md → core-concepts/addressing.md} +5 -7
  26. data/docs/{architecture.md → core-concepts/architecture.md} +78 -138
  27. data/docs/{dispatcher.md → core-concepts/dispatcher.md} +21 -21
  28. data/docs/{message_filtering.md → core-concepts/message-filtering.md} +2 -3
  29. data/docs/{message_processing.md → core-concepts/message-processing.md} +17 -17
  30. data/docs/{troubleshooting.md → development/troubleshooting.md} +7 -7
  31. data/docs/{examples.md → getting-started/examples.md} +115 -89
  32. data/docs/{getting-started.md → getting-started/quick-start.md} +47 -18
  33. data/docs/guides/redis-queue-getting-started.md +697 -0
  34. data/docs/guides/redis-queue-patterns.md +889 -0
  35. data/docs/guides/redis-queue-production.md +1091 -0
  36. data/docs/index.md +64 -0
  37. data/docs/{dead_letter_queue.md → reference/dead-letter-queue.md} +2 -3
  38. data/docs/{logging.md → reference/logging.md} +1 -1
  39. data/docs/{message_deduplication.md → reference/message-deduplication.md} +1 -0
  40. data/docs/{proc_handlers_summary.md → reference/proc-handlers.md} +7 -6
  41. data/docs/{serializers.md → reference/serializers.md} +3 -5
  42. data/docs/{transports.md → reference/transports.md} +133 -11
  43. data/docs/transports/memory-transport.md +374 -0
  44. data/docs/transports/redis-enhanced-transport.md +524 -0
  45. data/docs/transports/redis-queue-transport.md +1304 -0
  46. data/docs/transports/redis-transport-comparison.md +496 -0
  47. data/docs/transports/redis-transport.md +509 -0
  48. data/examples/README.md +98 -5
  49. data/examples/city_scenario/911_emergency_call_flow.svg +99 -0
  50. data/examples/city_scenario/README.md +515 -0
  51. data/examples/city_scenario/ai_visitor_intelligence_flow.svg +108 -0
  52. data/examples/city_scenario/citizen.rb +195 -0
  53. data/examples/city_scenario/city_diagram.svg +125 -0
  54. data/examples/city_scenario/common/health_monitor.rb +80 -0
  55. data/examples/city_scenario/common/logger.rb +30 -0
  56. data/examples/city_scenario/emergency_dispatch_center.rb +270 -0
  57. data/examples/city_scenario/fire_department.rb +446 -0
  58. data/examples/city_scenario/fire_emergency_flow.svg +95 -0
  59. data/examples/city_scenario/health_department.rb +100 -0
  60. data/examples/city_scenario/health_monitoring_system.svg +130 -0
  61. data/examples/city_scenario/house.rb +244 -0
  62. data/examples/city_scenario/local_bank.rb +217 -0
  63. data/examples/city_scenario/messages/emergency_911_message.rb +81 -0
  64. data/examples/city_scenario/messages/emergency_resolved_message.rb +43 -0
  65. data/examples/city_scenario/messages/fire_dispatch_message.rb +43 -0
  66. data/examples/city_scenario/messages/fire_emergency_message.rb +45 -0
  67. data/examples/city_scenario/messages/health_check_message.rb +22 -0
  68. data/examples/city_scenario/messages/health_status_message.rb +35 -0
  69. data/examples/city_scenario/messages/police_dispatch_message.rb +46 -0
  70. data/examples/city_scenario/messages/silent_alarm_message.rb +38 -0
  71. data/examples/city_scenario/police_department.rb +316 -0
  72. data/examples/city_scenario/redis_monitor.rb +129 -0
  73. data/examples/city_scenario/redis_stats.rb +743 -0
  74. data/examples/city_scenario/room_for_improvement.md +240 -0
  75. data/examples/city_scenario/security_emergency_flow.svg +95 -0
  76. data/examples/city_scenario/service_internal_architecture.svg +154 -0
  77. data/examples/city_scenario/smart_message_ai_agent.rb +364 -0
  78. data/examples/city_scenario/start_demo.sh +236 -0
  79. data/examples/city_scenario/stop_demo.sh +106 -0
  80. data/examples/city_scenario/visitor.rb +631 -0
  81. data/examples/{10_message_deduplication.rb → memory/01_message_deduplication_demo.rb} +1 -1
  82. data/examples/{09_dead_letter_queue_demo.rb → memory/02_dead_letter_queue_demo.rb} +13 -40
  83. data/examples/{01_point_to_point_orders.rb → memory/03_point_to_point_orders.rb} +1 -1
  84. data/examples/{02_publish_subscribe_events.rb → memory/04_publish_subscribe_events.rb} +2 -2
  85. data/examples/{03_many_to_many_chat.rb → memory/05_many_to_many_chat.rb} +4 -4
  86. data/examples/{show_me.rb → memory/06_pretty_print_demo.rb} +1 -1
  87. data/examples/{05_proc_handlers.rb → memory/07_proc_handlers_demo.rb} +2 -2
  88. data/examples/{06_custom_logger_example.rb → memory/08_custom_logger_demo.rb} +17 -14
  89. data/examples/{07_error_handling_scenarios.rb → memory/09_error_handling_demo.rb} +4 -4
  90. data/examples/{08_entity_addressing_basic.rb → memory/10_entity_addressing_basic.rb} +8 -8
  91. data/examples/{08_entity_addressing_with_filtering.rb → memory/11_entity_addressing_with_filtering.rb} +6 -6
  92. data/examples/{09_regex_filtering_microservices.rb → memory/12_regex_filtering_microservices.rb} +2 -2
  93. data/examples/{10_header_block_configuration.rb → memory/13_header_block_configuration.rb} +6 -6
  94. data/examples/{11_global_configuration_example.rb → memory/14_global_configuration_demo.rb} +19 -8
  95. data/examples/{show_logger.rb → memory/15_logger_demo.rb} +1 -1
  96. data/examples/memory/README.md +163 -0
  97. data/examples/memory/memory_transport_architecture.svg +90 -0
  98. data/examples/memory/point_to_point_pattern.svg +94 -0
  99. data/examples/memory/publish_subscribe_pattern.svg +125 -0
  100. data/examples/{04_redis_smart_home_iot.rb → redis/01_smart_home_iot_demo.rb} +5 -5
  101. data/examples/redis/README.md +230 -0
  102. data/examples/redis/alert_system_flow.svg +127 -0
  103. data/examples/redis/dashboard_status_flow.svg +107 -0
  104. data/examples/redis/device_command_flow.svg +113 -0
  105. data/examples/redis/redis_transport_architecture.svg +115 -0
  106. data/examples/{smart_home_iot_dataflow.md → redis/smart_home_iot_dataflow.md} +4 -116
  107. data/examples/redis/smart_home_system_architecture.svg +133 -0
  108. data/examples/redis_enhanced/README.md +319 -0
  109. data/examples/redis_enhanced/enhanced_01_basic_patterns.rb +233 -0
  110. data/examples/redis_enhanced/enhanced_02_fluent_api.rb +331 -0
  111. data/examples/redis_enhanced/enhanced_03_dual_publishing.rb +281 -0
  112. data/examples/redis_enhanced/enhanced_04_advanced_routing.rb +419 -0
  113. data/examples/redis_queue/01_basic_messaging.rb +221 -0
  114. data/examples/redis_queue/01_comprehensive_examples.rb +508 -0
  115. data/examples/redis_queue/02_pattern_routing.rb +405 -0
  116. data/examples/redis_queue/03_fluent_api.rb +422 -0
  117. data/examples/redis_queue/04_load_balancing.rb +486 -0
  118. data/examples/redis_queue/05_microservices.rb +735 -0
  119. data/examples/redis_queue/06_emergency_alerts.rb +777 -0
  120. data/examples/redis_queue/07_queue_management.rb +587 -0
  121. data/examples/redis_queue/README.md +366 -0
  122. data/examples/redis_queue/enhanced_01_basic_patterns.rb +233 -0
  123. data/examples/redis_queue/enhanced_02_fluent_api.rb +331 -0
  124. data/examples/redis_queue/enhanced_03_dual_publishing.rb +281 -0
  125. data/examples/redis_queue/enhanced_04_advanced_routing.rb +419 -0
  126. data/examples/redis_queue/redis_queue_architecture.svg +148 -0
  127. data/ideas/README.md +41 -0
  128. data/ideas/agents.md +1001 -0
  129. data/ideas/database_transport.md +980 -0
  130. data/ideas/improvement.md +359 -0
  131. data/ideas/meshage.md +1788 -0
  132. data/ideas/message_discovery.md +178 -0
  133. data/ideas/message_schema.md +1381 -0
  134. data/lib/smart_message/.idea/.gitignore +8 -0
  135. data/lib/smart_message/.idea/markdown.xml +6 -0
  136. data/lib/smart_message/.idea/misc.xml +4 -0
  137. data/lib/smart_message/.idea/modules.xml +8 -0
  138. data/lib/smart_message/.idea/smart_message.iml +16 -0
  139. data/lib/smart_message/.idea/vcs.xml +6 -0
  140. data/lib/smart_message/addressing.rb +15 -0
  141. data/lib/smart_message/base.rb +0 -2
  142. data/lib/smart_message/configuration.rb +1 -1
  143. data/lib/smart_message/logger.rb +15 -4
  144. data/lib/smart_message/plugins.rb +5 -2
  145. data/lib/smart_message/serializer.rb +14 -0
  146. data/lib/smart_message/transport/redis_enhanced_transport.rb +399 -0
  147. data/lib/smart_message/transport/redis_queue_transport.rb +555 -0
  148. data/lib/smart_message/transport/registry.rb +1 -0
  149. data/lib/smart_message/transport.rb +34 -1
  150. data/lib/smart_message/version.rb +1 -1
  151. data/lib/smart_message.rb +5 -52
  152. data/mkdocs.yml +184 -0
  153. data/p2p_plan.md +326 -0
  154. data/p2p_roadmap.md +287 -0
  155. data/smart_message.gemspec +2 -0
  156. data/smart_message.svg +51 -0
  157. metadata +170 -44
  158. data/docs/README.md +0 -57
  159. data/examples/dead_letters.jsonl +0 -12
  160. data/examples/temp.txt +0 -94
  161. data/examples/tmux_chat/README.md +0 -283
  162. data/examples/tmux_chat/bot_agent.rb +0 -278
  163. data/examples/tmux_chat/human_agent.rb +0 -199
  164. data/examples/tmux_chat/room_monitor.rb +0 -160
  165. data/examples/tmux_chat/shared_chat_system.rb +0 -328
  166. data/examples/tmux_chat/start_chat_demo.sh +0 -190
  167. data/examples/tmux_chat/stop_chat_demo.sh +0 -22
  168. /data/docs/{properties.md → core-concepts/properties.md} +0 -0
  169. /data/docs/{ideas_to_think_about.md → development/ideas.md} +0 -0
data/p2p_roadmap.md ADDED
@@ -0,0 +1,287 @@
1
+ # SmartMessage P2P Implementation Roadmap
2
+
3
+ This roadmap tracks the implementation progress of the P2P plan for SmartMessage transport extensions and multi-transport system development. Each phase contains detailed checklists to ensure systematic implementation of the enhanced BunnyFarm + SmartMessage + Lanet integration.
4
+
5
+ ---
6
+
7
+ ## Phase 1: Enhanced BunnyFarm Foundation (Weeks 1-4)
8
+
9
+ ### 1.1 BunnyFarm + SmartMessage Integration
10
+ - [ ] **Research & Analysis**
11
+ - [ ] Deep dive into BunnyFarm's current message handling architecture
12
+ - [ ] Analyze SmartMessage's transport abstraction patterns
13
+ - [ ] Document integration points and potential conflicts
14
+ - [ ] Create migration strategy document
15
+
16
+ - [ ] **Core Integration Development**
17
+ - [ ] Replace `BunnyFarm::Message` base class with `SmartMessage::Base`
18
+ - [ ] Migrate BunnyFarm's workflow methods (`process`, `success`, `failure`) to SmartMessage pattern
19
+ - [ ] Maintain BunnyFarm's automatic routing (`ClassName.action`) compatibility
20
+ - [ ] Implement enhanced BunnyFarm configuration system
21
+ - [ ] Create backward compatibility layer for existing BunnyFarm code
22
+
23
+ - [ ] **Testing Framework**
24
+ - [ ] Set up test suite for enhanced BunnyFarm
25
+ - [ ] Create unit tests for message workflow preservation
26
+ - [ ] Test automatic routing functionality with SmartMessage
27
+ - [ ] Validate configuration flexibility across transport plugins
28
+ - [ ] Performance benchmarks: enhanced vs original BunnyFarm
29
+
30
+ ### 1.2 Multi-Transport Support Infrastructure
31
+ - [ ] **SmartMessage Transport Plugin Architecture**
32
+ - [ ] Design and implement `SmartMessage::Transport::Base` interface
33
+ - [ ] Create plugin registration system for auto-discovery
34
+ - [ ] Implement transport factory pattern for dynamic selection
35
+ - [ ] Add transport health monitoring and connection management
36
+ - [ ] Design configuration system for transport-specific settings
37
+
38
+ - [ ] **Core Transport Implementations**
39
+ - [ ] Enhance existing Memory transport for in-process communication
40
+ - [ ] Create Named Pipes transport for high-performance same-machine IPC
41
+ - [ ] Enhance existing Redis transport for multi-process pub/sub scenarios
42
+ - [ ] Create AMQP transport plugin using existing BunnyFarm patterns
43
+ - [ ] Implement transport failover and retry mechanisms
44
+ - [ ] Add transport performance metrics collection
45
+
46
+ - [ ] **Named Pipes Transport Development**
47
+ - [ ] Create `smart_message-transport-named_pipes` gem structure
48
+ - [ ] Implement unidirectional pipe creation with naming convention
49
+ - [ ] Add pipe discovery and registry integration
50
+ - [ ] Implement secure permissions (0600) and cleanup mechanisms
51
+ - [ ] Create configuration system with namespace support
52
+ - [ ] Add deadlock prevention for bidirectional communication
53
+ - [ ] Test performance vs Redis for same-machine scenarios
54
+
55
+ - [ ] **Enhanced Workflow System**
56
+ - [ ] Extend BunnyFarm's process/success/failure pattern across all transports
57
+ - [ ] Implement SmartMessage entity addressing (FROM/TO/REPLY_TO)
58
+ - [ ] Create workflow state tracking across transport boundaries
59
+ - [ ] Add workflow error handling and recovery mechanisms
60
+ - [ ] Maintain BunnyFarm's K.I.S.S. design philosophy
61
+
62
+ ### 1.3 Documentation & Community Preparation
63
+ - [ ] **Documentation**
64
+ - [ ] Create enhanced BunnyFarm API documentation
65
+ - [ ] Write transport plugin development guide
66
+ - [ ] Document migration path from original BunnyFarm
67
+ - [ ] Create performance comparison benchmarks
68
+ - [ ] Write configuration and setup guides
69
+
70
+ - [ ] **Community & Ecosystem**
71
+ - [ ] Prepare enhanced BunnyFarm gem for release
72
+ - [ ] Create example applications demonstrating multi-transport workflows
73
+ - [ ] Set up CI/CD pipeline for enhanced BunnyFarm
74
+ - [ ] Plan backward compatibility strategy for existing users
75
+ - [ ] Prepare deprecation timeline for original BunnyFarm patterns
76
+
77
+ ---
78
+
79
+ ## Phase 2: SmartMessage Transport Extensions (Weeks 5-6)
80
+
81
+ ### 2.1 Transport Extension Framework
82
+ - [ ] **Extension Gem Infrastructure**
83
+ - [ ] Design transport extension gem template and structure
84
+ - [ ] Create auto-registration system for transport plugins
85
+ - [ ] Implement version compatibility checking between core and extensions
86
+ - [ ] Design configuration system for transport-specific settings
87
+ - [ ] Create transport discovery and factory pattern implementation
88
+
89
+ - [ ] **Core Transport Extension Development**
90
+ - [ ] Create `smart_message-transport-named_pipes` gem
91
+ - [ ] Create `smart_message-transport-amqp` gem
92
+ - [ ] Create `smart_message-transport-lanet` gem
93
+ - [ ] Create `smart_message-transport-nats` gem
94
+ - [ ] Implement unified API across all transport extensions
95
+ - [ ] Add transport health monitoring and metrics collection
96
+
97
+ ### 2.2 Named Pipes Transport Implementation
98
+ - [ ] **Named Pipes Core Development**
99
+ - [ ] Implement unidirectional pipe creation with standard naming convention
100
+ - [ ] Add secure permissions (0600) and automatic cleanup mechanisms
101
+ - [ ] Create pipe discovery system for agent-to-agent communication
102
+ - [ ] Implement deadlock prevention for bidirectional scenarios
103
+ - [ ] Add namespace support for multi-environment deployments
104
+
105
+ - [ ] **Performance & Testing**
106
+ - [ ] Benchmark Named Pipes vs Redis for same-machine scenarios
107
+ - [ ] Test pipe creation, discovery, and cleanup mechanisms
108
+ - [ ] Validate security permissions and access control
109
+ - [ ] Test namespace isolation and multi-environment support
110
+ - [ ] Create comprehensive test suite for Named Pipes transport
111
+
112
+ ---
113
+
114
+ ## Phase 3: Lanet P2P Integration (Weeks 7-8)
115
+
116
+ ### 3.1 Lanet Transport Plugin Development
117
+ - [ ] **SmartMessage-Transport-Lanet Gem Creation**
118
+ - [ ] Create new gem: `smart_message-transport-lanet`
119
+ - [ ] Implement `SmartMessage::Transport::Lanet` class
120
+ - [ ] Add Lanet-specific configuration and connection management
121
+ - [ ] Implement BunnyFarm workflow patterns over Lanet P2P
122
+ - [ ] Create auto-registration system for Lanet transport
123
+
124
+ - [ ] **Lanet Integration Implementation**
125
+ - [ ] Integrate Lanet's network discovery with SmartMessage routing
126
+ - [ ] Implement IP resolution for agent UUIDs using Lanet scanning
127
+ - [ ] Add Lanet P2P message routing with BunnyFarm workflows
128
+ - [ ] Implement Lanet encryption/decryption in transport layer
129
+ - [ ] Add Lanet connection health monitoring and failover
130
+
131
+ - [ ] **P2P Workflow Support**
132
+ - [ ] Ensure BunnyFarm workflows work over direct P2P connections
133
+ - [ ] Implement P2P-specific success/failure handling
134
+ - [ ] Add P2P message acknowledgment and retry mechanisms
135
+ - [ ] Create P2P network topology discovery and mapping
136
+ - [ ] Handle P2P connection failures and transport failover
137
+
138
+ ### 3.2 Intelligent Transport Selection
139
+ - [ ] **Smart Routing Implementation**
140
+ - [ ] Implement intelligent transport selection algorithm
141
+ - [ ] Add `same_process?()` detection for Memory transport
142
+ - [ ] Add `same_machine?()` detection for Named Pipes vs Redis selection
143
+ - [ ] Add `same_lan?()` detection logic for Lanet routing
144
+ - [ ] Create transport preference configuration system
145
+ - [ ] Implement automatic fallback when connections fail
146
+ - [ ] Add transport selection based on message type and requirements
147
+ - [ ] Implement performance-based transport selection
148
+
149
+ - [ ] **Network Discovery & Topology**
150
+ - [ ] Integrate Lanet network scanning with SmartMessage routing
151
+ - [ ] Implement automatic agent network topology mapping
152
+ - [ ] Add LAN segment detection and agent grouping
153
+ - [ ] Create network health monitoring and reporting
154
+ - [ ] Implement dynamic transport selection based on network conditions
155
+
156
+ - [ ] **Hybrid P2P System Completion**
157
+ - [ ] Complete integration of all transport layers (Memory, Named Pipes, Redis, AMQP, Lanet)
158
+ - [ ] Implement comprehensive transport selection decision tree
159
+ - [ ] Add transport performance monitoring and optimization
160
+ - [ ] Create transport usage analytics and reporting
161
+ - [ ] Validate complete hybrid P2P system functionality
162
+ - [ ] Document transport selection hierarchy and use cases
163
+
164
+ ---
165
+
166
+ ## Phase 4: Production Readiness (Weeks 9-10)
167
+
168
+ ### 4.1 System Integration & Testing
169
+ - [ ] **End-to-End Integration**
170
+ - [ ] Complete system testing: SmartMessage + All Transport Extensions
171
+ - [ ] Multi-scenario testing across all transport combinations
172
+ - [ ] Test transport hierarchy: Memory → Named Pipes → Redis → Lanet → AMQP/NATS
173
+ - [ ] Load testing with multiple processes across different network topologies
174
+ - [ ] Stress testing transport failover and recovery mechanisms
175
+ - [ ] Security testing for P2P encryption and message integrity
176
+ - [ ] Performance validation: Named Pipes vs Redis for same-machine scenarios
177
+
178
+ - [ ] **Performance Optimization**
179
+ - [ ] Profile and optimize transport selection algorithms
180
+ - [ ] Implement connection pooling and message batching optimizations
181
+ - [ ] Add caching for agent discovery and network topology
182
+ - [ ] Optimize memory usage across all transport implementations
183
+ - [ ] Benchmark complete system against original SmartMessage performance
184
+
185
+ - [ ] **Monitoring & Observability**
186
+ - [ ] Implement comprehensive logging across all system components
187
+ - [ ] Add metrics collection for transport usage and performance
188
+ - [ ] Create health check endpoints for all system components
189
+ - [ ] Implement alerting for transport failures and performance issues
190
+ - [ ] Add debugging tools for multi-transport message flows
191
+
192
+ ### 4.2 Documentation & Migration
193
+ - [ ] **Production Documentation**
194
+ - [ ] Complete API documentation for enhanced SmartMessage system
195
+ - [ ] Create deployment guides for different network configurations
196
+ - [ ] Write troubleshooting guides for common issues
197
+ - [ ] Document performance tuning and optimization recommendations
198
+ - [ ] Create monitoring and maintenance guides
199
+
200
+ - [ ] **Migration Support**
201
+ - [ ] Create automated migration tools for existing SmartMessage deployments
202
+ - [ ] Write step-by-step migration guides with examples
203
+ - [ ] Develop backward compatibility testing framework
204
+ - [ ] Create rollback procedures for failed migrations
205
+ - [ ] Prepare support documentation for migration issues
206
+
207
+ - [ ] **Community & Ecosystem**
208
+ - [ ] Prepare all gems for public release (enhanced BunnyFarm, transport extensions)
209
+ - [ ] Create example applications showcasing P2P capabilities
210
+ - [ ] Write blog posts and tutorials about the new architecture
211
+ - [ ] Prepare conference talks and presentations
212
+ - [ ] Set up community support channels and documentation sites
213
+
214
+ ---
215
+
216
+ ## Phase 5: NATS Integration & Advanced Features (Weeks 11-12)
217
+
218
+ ### 5.1 NATS Transport Plugin
219
+ - [ ] **SmartMessage-Transport-NATS Gem Creation**
220
+ - [ ] Create new gem: `smart_message-transport-nats`
221
+ - [ ] Implement `SmartMessage::Transport::NATS` class
222
+ - [ ] Add NATS-specific configuration and clustering support
223
+ - [ ] Implement BunnyFarm workflows over NATS messaging
224
+ - [ ] Create auto-registration system for NATS transport
225
+
226
+ - [ ] **NATS Integration Features**
227
+ - [ ] Map SmartMessage routing to NATS subject patterns
228
+ - [ ] Implement NATS clustering for high availability
229
+ - [ ] Add NATS monitoring integration with SmartMessage health checks
230
+ - [ ] Create NATS-specific performance optimizations
231
+ - [ ] Implement NATS subject-based message filtering
232
+
233
+ ### 5.2 Advanced System Features
234
+ - [ ] **Load Balancing & Auto-Scaling**
235
+ - [ ] Implement load balancing across multiple process instances
236
+ - [ ] Add auto-scaling triggers based on message load
237
+ - [ ] Create process deployment automation tools
238
+ - [ ] Implement dynamic process discovery and registration
239
+ - [ ] Add capacity planning and resource management tools
240
+
241
+ - [ ] **Advanced Security & Authentication**
242
+ - [ ] Implement end-to-end message encryption across all transports
243
+ - [ ] Add process authentication and authorization framework
244
+ - [ ] Create secure key management and distribution system
245
+ - [ ] Implement message signing and verification
246
+ - [ ] Add audit logging for security compliance
247
+
248
+ ---
249
+
250
+ ## Progress Tracking
251
+
252
+ ### Overall Progress
253
+ - [ ] **Phase 1 Complete** (0/4 weeks) - Enhanced BunnyFarm + Named Pipes
254
+ - [ ] **Phase 2 Complete** (0/2 weeks) - Transport Extensions
255
+ - [ ] **Phase 3 Complete** (0/2 weeks) - Lanet P2P Integration
256
+ - [ ] **Phase 4 Complete** (0/2 weeks) - Production Readiness
257
+ - [ ] **Phase 5 Complete** (0/2 weeks) - NATS + Advanced Features
258
+
259
+ ### Key Milestones
260
+ - [ ] Enhanced BunnyFarm with SmartMessage integration released
261
+ - [ ] Named Pipes transport implemented and benchmarked
262
+ - [ ] SmartMessage transport extension framework completed
263
+ - [ ] Lanet P2P transport fully integrated and tested
264
+ - [ ] Complete transport hierarchy operational (6 transport layers)
265
+ - [ ] Production-ready system with full documentation
266
+ - [ ] NATS transport and advanced features completed
267
+
268
+ ### Risk Mitigation
269
+ - [ ] Backward compatibility maintained throughout migration
270
+ - [ ] Performance benchmarks meet or exceed original system
271
+ - [ ] Security audit completed and vulnerabilities addressed
272
+ - [ ] Community adoption and feedback incorporated
273
+ - [ ] Production deployments successful and stable
274
+
275
+ ---
276
+
277
+ ## Notes
278
+ - Each checklist item should be treated as an atomic unit of work
279
+ - Items can be worked on in parallel where dependencies allow
280
+ - Regular milestone reviews should be conducted at the end of each week
281
+ - Community feedback should be incorporated throughout the development process
282
+ - Performance benchmarks should be maintained and monitored continuously
283
+
284
+ ---
285
+
286
+ *Last Updated: 2025-01-03*
287
+ *Status: Ready for Implementation*
@@ -44,6 +44,8 @@ Gem::Specification.new do |spec|
44
44
  spec.add_dependency 'zeitwerk'
45
45
  spec.add_dependency 'lumberjack'
46
46
  spec.add_dependency 'colorize'
47
+ spec.add_dependency 'async'
48
+ spec.add_dependency 'async-redis'
47
49
 
48
50
  spec.add_development_dependency 'bundler'
49
51
  spec.add_development_dependency 'rake'
data/smart_message.svg ADDED
@@ -0,0 +1,51 @@
1
+ <svg width="600" height="200" xmlns="http://www.w3.org/2000/svg">
2
+ <!-- First Row: SMART -->
3
+ <!-- S Block -->
4
+ <rect x="20" y="20" width="60" height="60" fill="#4CAF50" stroke="#2E7D32" stroke-width="2" rx="5"/>
5
+ <text x="50" y="58" font-family="Arial, sans-serif" font-size="36" font-weight="bold" text-anchor="middle" fill="white">S</text>
6
+
7
+ <!-- M Block -->
8
+ <rect x="100" y="20" width="60" height="60" fill="#2196F3" stroke="#1565C0" stroke-width="2" rx="5"/>
9
+ <text x="130" y="58" font-family="Arial, sans-serif" font-size="36" font-weight="bold" text-anchor="middle" fill="white">M</text>
10
+
11
+ <!-- A Block -->
12
+ <rect x="180" y="20" width="60" height="60" fill="#FF9800" stroke="#E65100" stroke-width="2" rx="5"/>
13
+ <text x="210" y="58" font-family="Arial, sans-serif" font-size="36" font-weight="bold" text-anchor="middle" fill="white">A</text>
14
+
15
+ <!-- R Block -->
16
+ <rect x="260" y="20" width="60" height="60" fill="#9C27B0" stroke="#6A1B9A" stroke-width="2" rx="5"/>
17
+ <text x="290" y="58" font-family="Arial, sans-serif" font-size="36" font-weight="bold" text-anchor="middle" fill="white">R</text>
18
+
19
+ <!-- T Block -->
20
+ <rect x="340" y="20" width="60" height="60" fill="#F44336" stroke="#C62828" stroke-width="2" rx="5"/>
21
+ <text x="370" y="58" font-family="Arial, sans-serif" font-size="36" font-weight="bold" text-anchor="middle" fill="white">T</text>
22
+
23
+ <!-- Second Row: MESSAGE -->
24
+ <!-- M Block -->
25
+ <rect x="20" y="110" width="60" height="60" fill="#607D8B" stroke="#37474F" stroke-width="2" rx="5"/>
26
+ <text x="50" y="148" font-family="Arial, sans-serif" font-size="36" font-weight="bold" text-anchor="middle" fill="white">M</text>
27
+
28
+ <!-- E Block -->
29
+ <rect x="100" y="110" width="60" height="60" fill="#795548" stroke="#4E342E" stroke-width="2" rx="5"/>
30
+ <text x="130" y="148" font-family="Arial, sans-serif" font-size="36" font-weight="bold" text-anchor="middle" fill="white">E</text>
31
+
32
+ <!-- S Block -->
33
+ <rect x="180" y="110" width="60" height="60" fill="#009688" stroke="#00695C" stroke-width="2" rx="5"/>
34
+ <text x="210" y="148" font-family="Arial, sans-serif" font-size="36" font-weight="bold" text-anchor="middle" fill="white">S</text>
35
+
36
+ <!-- S Block -->
37
+ <rect x="260" y="110" width="60" height="60" fill="#FF5722" stroke="#D84315" stroke-width="2" rx="5"/>
38
+ <text x="290" y="148" font-family="Arial, sans-serif" font-size="36" font-weight="bold" text-anchor="middle" fill="white">S</text>
39
+
40
+ <!-- A Block -->
41
+ <rect x="340" y="110" width="60" height="60" fill="#CDDC39" stroke="#827717" stroke-width="2" rx="5"/>
42
+ <text x="370" y="148" font-family="Arial, sans-serif" font-size="36" font-weight="bold" text-anchor="middle" fill="white">A</text>
43
+
44
+ <!-- G Block -->
45
+ <rect x="420" y="110" width="60" height="60" fill="#3F51B5" stroke="#283593" stroke-width="2" rx="5"/>
46
+ <text x="450" y="148" font-family="Arial, sans-serif" font-size="36" font-weight="bold" text-anchor="middle" fill="white">G</text>
47
+
48
+ <!-- E Block -->
49
+ <rect x="500" y="110" width="60" height="60" fill="#E91E63" stroke="#AD1457" stroke-width="2" rx="5"/>
50
+ <text x="530" y="148" font-family="Arial, sans-serif" font-size="36" font-weight="bold" text-anchor="middle" fill="white">E</text>
51
+ </svg>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_message
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dewayne VanHoozer
@@ -121,6 +121,34 @@ dependencies:
121
121
  - - ">="
122
122
  - !ruby/object:Gem::Version
123
123
  version: '0'
124
+ - !ruby/object:Gem::Dependency
125
+ name: async
126
+ requirement: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ type: :runtime
132
+ prerelease: false
133
+ version_requirements: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: '0'
138
+ - !ruby/object:Gem::Dependency
139
+ name: async-redis
140
+ requirement: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: '0'
145
+ type: :runtime
146
+ prerelease: false
147
+ version_requirements: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
124
152
  - !ruby/object:Gem::Dependency
125
153
  name: bundler
126
154
  requirement: !ruby/object:Gem::Requirement
@@ -244,6 +272,7 @@ extensions: []
244
272
  extra_rdoc_files: []
245
273
  files:
246
274
  - ".envrc"
275
+ - ".github/workflows/deploy-github-pages.yml"
247
276
  - ".gitignore"
248
277
  - ".irbrc"
249
278
  - ".travis.yml"
@@ -255,40 +284,101 @@ files:
255
284
  - Rakefile
256
285
  - bin/console
257
286
  - bin/setup
258
- - docs/README.md
259
- - docs/addressing.md
260
- - docs/architecture.md
261
- - docs/dead_letter_queue.md
262
- - docs/dispatcher.md
263
- - docs/examples.md
264
- - docs/getting-started.md
265
- - docs/ideas_to_think_about.md
266
- - docs/logging.md
267
- - docs/message_deduplication.md
268
- - docs/message_filtering.md
269
- - docs/message_processing.md
270
- - docs/proc_handlers_summary.md
271
- - docs/properties.md
272
- - docs/serializers.md
273
- - docs/transports.md
274
- - docs/troubleshooting.md
287
+ - docs/assets/images/ddq_architecture.svg
288
+ - docs/assets/images/dlq_architecture.svg
289
+ - docs/assets/images/enhanced-dual-publishing.svg
290
+ - docs/assets/images/enhanced-fluent-api.svg
291
+ - docs/assets/images/enhanced-microservices-routing.svg
292
+ - docs/assets/images/enhanced-pattern-matching.svg
293
+ - docs/assets/images/fluent-api-demo.svg
294
+ - docs/assets/images/performance-comparison.svg
295
+ - docs/assets/images/redis-basic-architecture.svg
296
+ - docs/assets/images/redis-enhanced-architecture.svg
297
+ - docs/assets/images/redis-queue-architecture.svg
298
+ - docs/assets/images/smart_message.jpg
299
+ - docs/assets/images/smart_message_walking.jpg
300
+ - docs/assets/images/smartmessage_architecture_overview.svg
301
+ - docs/assets/images/transport-comparison-matrix.svg
302
+ - docs/assets/javascripts/mathjax.js
303
+ - docs/assets/stylesheets/extra.css
304
+ - docs/core-concepts/addressing.md
305
+ - docs/core-concepts/architecture.md
306
+ - docs/core-concepts/dispatcher.md
307
+ - docs/core-concepts/message-filtering.md
308
+ - docs/core-concepts/message-processing.md
309
+ - docs/core-concepts/properties.md
310
+ - docs/development/ideas.md
311
+ - docs/development/troubleshooting.md
312
+ - docs/getting-started/examples.md
313
+ - docs/getting-started/quick-start.md
314
+ - docs/guides/redis-queue-getting-started.md
315
+ - docs/guides/redis-queue-patterns.md
316
+ - docs/guides/redis-queue-production.md
317
+ - docs/index.md
318
+ - docs/reference/dead-letter-queue.md
319
+ - docs/reference/logging.md
320
+ - docs/reference/message-deduplication.md
321
+ - docs/reference/proc-handlers.md
322
+ - docs/reference/serializers.md
323
+ - docs/reference/transports.md
324
+ - docs/transports/memory-transport.md
325
+ - docs/transports/redis-enhanced-transport.md
326
+ - docs/transports/redis-queue-transport.md
327
+ - docs/transports/redis-transport-comparison.md
328
+ - docs/transports/redis-transport.md
275
329
  - examples/.gitignore
276
- - examples/01_point_to_point_orders.rb
277
- - examples/02_publish_subscribe_events.rb
278
- - examples/03_many_to_many_chat.rb
279
- - examples/04_redis_smart_home_iot.rb
280
- - examples/05_proc_handlers.rb
281
- - examples/06_custom_logger_example.rb
282
- - examples/07_error_handling_scenarios.rb
283
- - examples/08_entity_addressing_basic.rb
284
- - examples/08_entity_addressing_with_filtering.rb
285
- - examples/09_dead_letter_queue_demo.rb
286
- - examples/09_regex_filtering_microservices.rb
287
- - examples/10_header_block_configuration.rb
288
- - examples/10_message_deduplication.rb
289
- - examples/11_global_configuration_example.rb
290
330
  - examples/README.md
291
- - examples/dead_letters.jsonl
331
+ - examples/city_scenario/911_emergency_call_flow.svg
332
+ - examples/city_scenario/README.md
333
+ - examples/city_scenario/ai_visitor_intelligence_flow.svg
334
+ - examples/city_scenario/citizen.rb
335
+ - examples/city_scenario/city_diagram.svg
336
+ - examples/city_scenario/common/health_monitor.rb
337
+ - examples/city_scenario/common/logger.rb
338
+ - examples/city_scenario/emergency_dispatch_center.rb
339
+ - examples/city_scenario/fire_department.rb
340
+ - examples/city_scenario/fire_emergency_flow.svg
341
+ - examples/city_scenario/health_department.rb
342
+ - examples/city_scenario/health_monitoring_system.svg
343
+ - examples/city_scenario/house.rb
344
+ - examples/city_scenario/local_bank.rb
345
+ - examples/city_scenario/messages/emergency_911_message.rb
346
+ - examples/city_scenario/messages/emergency_resolved_message.rb
347
+ - examples/city_scenario/messages/fire_dispatch_message.rb
348
+ - examples/city_scenario/messages/fire_emergency_message.rb
349
+ - examples/city_scenario/messages/health_check_message.rb
350
+ - examples/city_scenario/messages/health_status_message.rb
351
+ - examples/city_scenario/messages/police_dispatch_message.rb
352
+ - examples/city_scenario/messages/silent_alarm_message.rb
353
+ - examples/city_scenario/police_department.rb
354
+ - examples/city_scenario/redis_monitor.rb
355
+ - examples/city_scenario/redis_stats.rb
356
+ - examples/city_scenario/room_for_improvement.md
357
+ - examples/city_scenario/security_emergency_flow.svg
358
+ - examples/city_scenario/service_internal_architecture.svg
359
+ - examples/city_scenario/smart_message_ai_agent.rb
360
+ - examples/city_scenario/start_demo.sh
361
+ - examples/city_scenario/stop_demo.sh
362
+ - examples/city_scenario/visitor.rb
363
+ - examples/memory/01_message_deduplication_demo.rb
364
+ - examples/memory/02_dead_letter_queue_demo.rb
365
+ - examples/memory/03_point_to_point_orders.rb
366
+ - examples/memory/04_publish_subscribe_events.rb
367
+ - examples/memory/05_many_to_many_chat.rb
368
+ - examples/memory/06_pretty_print_demo.rb
369
+ - examples/memory/07_proc_handlers_demo.rb
370
+ - examples/memory/08_custom_logger_demo.rb
371
+ - examples/memory/09_error_handling_demo.rb
372
+ - examples/memory/10_entity_addressing_basic.rb
373
+ - examples/memory/11_entity_addressing_with_filtering.rb
374
+ - examples/memory/12_regex_filtering_microservices.rb
375
+ - examples/memory/13_header_block_configuration.rb
376
+ - examples/memory/14_global_configuration_demo.rb
377
+ - examples/memory/15_logger_demo.rb
378
+ - examples/memory/README.md
379
+ - examples/memory/memory_transport_architecture.svg
380
+ - examples/memory/point_to_point_pattern.svg
381
+ - examples/memory/publish_subscribe_pattern.svg
292
382
  - examples/performance_metrics/benchmark_results_ractor_20250818_205603.json
293
383
  - examples/performance_metrics/benchmark_results_ractor_20250818_205831.json
294
384
  - examples/performance_metrics/benchmark_results_test_20250818_204942.json
@@ -301,19 +391,48 @@ files:
301
391
  - examples/performance_metrics/compare_benchmarks.rb
302
392
  - examples/performance_metrics/dead_letters.jsonl
303
393
  - examples/performance_metrics/performance_benchmark.rb
304
- - examples/show_logger.rb
305
- - examples/show_me.rb
306
- - examples/smart_home_iot_dataflow.md
307
- - examples/temp.txt
308
- - examples/tmux_chat/README.md
309
- - examples/tmux_chat/bot_agent.rb
310
- - examples/tmux_chat/human_agent.rb
311
- - examples/tmux_chat/room_monitor.rb
312
- - examples/tmux_chat/shared_chat_system.rb
313
- - examples/tmux_chat/start_chat_demo.sh
314
- - examples/tmux_chat/stop_chat_demo.sh
394
+ - examples/redis/01_smart_home_iot_demo.rb
395
+ - examples/redis/README.md
396
+ - examples/redis/alert_system_flow.svg
397
+ - examples/redis/dashboard_status_flow.svg
398
+ - examples/redis/device_command_flow.svg
399
+ - examples/redis/redis_transport_architecture.svg
400
+ - examples/redis/smart_home_iot_dataflow.md
401
+ - examples/redis/smart_home_system_architecture.svg
402
+ - examples/redis_enhanced/README.md
403
+ - examples/redis_enhanced/enhanced_01_basic_patterns.rb
404
+ - examples/redis_enhanced/enhanced_02_fluent_api.rb
405
+ - examples/redis_enhanced/enhanced_03_dual_publishing.rb
406
+ - examples/redis_enhanced/enhanced_04_advanced_routing.rb
407
+ - examples/redis_queue/01_basic_messaging.rb
408
+ - examples/redis_queue/01_comprehensive_examples.rb
409
+ - examples/redis_queue/02_pattern_routing.rb
410
+ - examples/redis_queue/03_fluent_api.rb
411
+ - examples/redis_queue/04_load_balancing.rb
412
+ - examples/redis_queue/05_microservices.rb
413
+ - examples/redis_queue/06_emergency_alerts.rb
414
+ - examples/redis_queue/07_queue_management.rb
415
+ - examples/redis_queue/README.md
416
+ - examples/redis_queue/enhanced_01_basic_patterns.rb
417
+ - examples/redis_queue/enhanced_02_fluent_api.rb
418
+ - examples/redis_queue/enhanced_03_dual_publishing.rb
419
+ - examples/redis_queue/enhanced_04_advanced_routing.rb
420
+ - examples/redis_queue/redis_queue_architecture.svg
421
+ - ideas/README.md
422
+ - ideas/agents.md
423
+ - ideas/database_transport.md
424
+ - ideas/improvement.md
425
+ - ideas/meshage.md
426
+ - ideas/message_discovery.md
427
+ - ideas/message_schema.md
315
428
  - lib/simple_stats.rb
316
429
  - lib/smart_message.rb
430
+ - lib/smart_message/.idea/.gitignore
431
+ - lib/smart_message/.idea/markdown.xml
432
+ - lib/smart_message/.idea/misc.xml
433
+ - lib/smart_message/.idea/modules.xml
434
+ - lib/smart_message/.idea/smart_message.iml
435
+ - lib/smart_message/.idea/vcs.xml
317
436
  - lib/smart_message/addressing.rb
318
437
  - lib/smart_message/base.rb
319
438
  - lib/smart_message/circuit_breaker.rb
@@ -337,12 +456,15 @@ files:
337
456
  - lib/smart_message/plugins.rb
338
457
  - lib/smart_message/property_descriptions.rb
339
458
  - lib/smart_message/property_validations.rb
459
+ - lib/smart_message/serializer.rb
340
460
  - lib/smart_message/serializer/base.rb
341
461
  - lib/smart_message/serializer/json.rb
342
462
  - lib/smart_message/subscription.rb
343
463
  - lib/smart_message/transport.rb
344
464
  - lib/smart_message/transport/base.rb
345
465
  - lib/smart_message/transport/memory_transport.rb
466
+ - lib/smart_message/transport/redis_enhanced_transport.rb
467
+ - lib/smart_message/transport/redis_queue_transport.rb
346
468
  - lib/smart_message/transport/redis_transport.rb
347
469
  - lib/smart_message/transport/registry.rb
348
470
  - lib/smart_message/transport/stdout_transport.rb
@@ -350,7 +472,11 @@ files:
350
472
  - lib/smart_message/version.rb
351
473
  - lib/smart_message/versioning.rb
352
474
  - lib/smart_message/wrapper.rb.bak
475
+ - mkdocs.yml
476
+ - p2p_plan.md
477
+ - p2p_roadmap.md
353
478
  - smart_message.gemspec
479
+ - smart_message.svg
354
480
  homepage: https://github.com/MadBomber/smart_message
355
481
  licenses: []
356
482
  metadata: