smart_message 0.0.13 → 0.0.17
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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +184 -0
- data/Gemfile.lock +6 -6
- data/README.md +75 -25
- data/docs/guides/transport-selection.md +361 -0
- data/docs/index.md +2 -0
- data/docs/reference/transports.md +78 -29
- data/docs/transports/file-transport.md +535 -0
- data/docs/transports/memory-transport.md +2 -1
- data/docs/transports/multi-transport.md +484 -0
- data/docs/transports/redis-transport.md +1 -1
- data/docs/transports/stdout-transport.md +580 -0
- data/examples/file/00_run_all_file_demos.rb +260 -0
- data/examples/file/01_basic_file_transport_demo.rb +237 -0
- data/examples/file/02_fifo_transport_demo.rb +289 -0
- data/examples/file/03_file_watching_demo.rb +332 -0
- data/examples/file/04_multi_transport_file_demo.rb +432 -0
- data/examples/file/README.md +257 -0
- data/examples/memory/00_run_all_demos.rb +317 -0
- data/examples/memory/01_message_deduplication_demo.rb +18 -30
- data/examples/memory/02_dead_letter_queue_demo.rb +9 -9
- data/examples/memory/03_point_to_point_orders.rb +3 -3
- data/examples/memory/04_publish_subscribe_events.rb +15 -15
- data/examples/memory/05_many_to_many_chat.rb +19 -19
- data/examples/memory/06_stdout_publish_only.rb +118 -0
- data/examples/memory/07_proc_handlers_demo.rb +13 -13
- data/examples/memory/08_custom_logger_demo.rb +136 -136
- data/examples/memory/09_error_handling_demo.rb +7 -7
- data/examples/memory/10_entity_addressing_basic.rb +25 -25
- data/examples/memory/11_entity_addressing_with_filtering.rb +32 -32
- data/examples/memory/12_regex_filtering_microservices.rb +10 -10
- data/examples/memory/14_global_configuration_demo.rb +12 -12
- data/examples/memory/README.md +34 -17
- data/examples/memory/log/demo_app.log.2 +100 -0
- data/examples/multi_transport_example.rb +114 -0
- data/examples/redis/01_smart_home_iot_demo.rb +20 -20
- data/examples/utilities/box_it.rb +12 -0
- data/examples/utilities/doing.rb +19 -0
- data/examples/utilities/temp.md +28 -0
- data/lib/smart_message/base.rb +5 -7
- data/lib/smart_message/errors.rb +3 -0
- data/lib/smart_message/header.rb +1 -1
- data/lib/smart_message/logger/default.rb +1 -1
- data/lib/smart_message/messaging.rb +36 -6
- data/lib/smart_message/plugins.rb +46 -4
- data/lib/smart_message/serializer/base.rb +1 -1
- data/lib/smart_message/serializer.rb +3 -2
- data/lib/smart_message/subscription.rb +18 -20
- data/lib/smart_message/transport/async_publish_queue.rb +284 -0
- data/lib/smart_message/transport/fifo_operations.rb +264 -0
- data/lib/smart_message/transport/file_operations.rb +232 -0
- data/lib/smart_message/transport/file_transport.rb +152 -0
- data/lib/smart_message/transport/file_watching.rb +72 -0
- data/lib/smart_message/transport/partitioned_files.rb +46 -0
- data/lib/smart_message/transport/stdout_transport.rb +7 -81
- data/lib/smart_message/transport/stdout_transport.rb.backup +88 -0
- data/lib/smart_message/version.rb +1 -1
- data/mkdocs.yml +4 -5
- metadata +26 -10
- data/ideas/README.md +0 -41
- data/ideas/agents.md +0 -1001
- data/ideas/database_transport.md +0 -980
- data/ideas/improvement.md +0 -359
- data/ideas/meshage.md +0 -1788
- data/ideas/message_discovery.md +0 -178
- data/ideas/message_schema.md +0 -1381
- data/lib/smart_message/wrapper.rb.bak +0 -132
- /data/examples/memory/{06_pretty_print_demo.rb → 16_pretty_print_demo.rb} +0 -0
data/mkdocs.yml
CHANGED
@@ -169,13 +169,12 @@ nav:
|
|
169
169
|
- 🚚 Transports:
|
170
170
|
- Memory Transport: transports/memory-transport.md
|
171
171
|
- Redis Transport: transports/redis-transport.md
|
172
|
-
-
|
173
|
-
-
|
172
|
+
- STDOUT Transport: transports/stdout-transport.md
|
173
|
+
- File Transport: transports/file-transport.md
|
174
|
+
- Multi-Transport Publishing: transports/multi-transport.md
|
174
175
|
- Redis Transport Comparison: transports/redis-transport-comparison.md
|
175
176
|
- 📚 Guides:
|
176
|
-
-
|
177
|
-
- Redis Queue Patterns: guides/redis-queue-patterns.md
|
178
|
-
- Redis Queue Production: guides/redis-queue-production.md
|
177
|
+
- Transport Selection: guides/transport-selection.md
|
179
178
|
- ⚙️ Development:
|
180
179
|
- Troubleshooting: development/troubleshooting.md
|
181
180
|
- Ideas & Roadmap: development/ideas.md
|
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.
|
4
|
+
version: 0.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dewayne VanHoozer
|
@@ -311,6 +311,7 @@ files:
|
|
311
311
|
- docs/development/troubleshooting.md
|
312
312
|
- docs/getting-started/examples.md
|
313
313
|
- docs/getting-started/quick-start.md
|
314
|
+
- docs/guides/transport-selection.md
|
314
315
|
- docs/index.md
|
315
316
|
- docs/reference/dead-letter-queue.md
|
316
317
|
- docs/reference/logging.md
|
@@ -318,9 +319,12 @@ files:
|
|
318
319
|
- docs/reference/proc-handlers.md
|
319
320
|
- docs/reference/serializers.md
|
320
321
|
- docs/reference/transports.md
|
322
|
+
- docs/transports/file-transport.md
|
321
323
|
- docs/transports/memory-transport.md
|
324
|
+
- docs/transports/multi-transport.md
|
322
325
|
- docs/transports/redis-transport-comparison.md
|
323
326
|
- docs/transports/redis-transport.md
|
327
|
+
- docs/transports/stdout-transport.md
|
324
328
|
- examples/.gitignore
|
325
329
|
- examples/README.md
|
326
330
|
- examples/city_scenario/911_emergency_call_flow.svg
|
@@ -355,12 +359,19 @@ files:
|
|
355
359
|
- examples/city_scenario/start_demo.sh
|
356
360
|
- examples/city_scenario/stop_demo.sh
|
357
361
|
- examples/city_scenario/visitor.rb
|
362
|
+
- examples/file/00_run_all_file_demos.rb
|
363
|
+
- examples/file/01_basic_file_transport_demo.rb
|
364
|
+
- examples/file/02_fifo_transport_demo.rb
|
365
|
+
- examples/file/03_file_watching_demo.rb
|
366
|
+
- examples/file/04_multi_transport_file_demo.rb
|
367
|
+
- examples/file/README.md
|
368
|
+
- examples/memory/00_run_all_demos.rb
|
358
369
|
- examples/memory/01_message_deduplication_demo.rb
|
359
370
|
- examples/memory/02_dead_letter_queue_demo.rb
|
360
371
|
- examples/memory/03_point_to_point_orders.rb
|
361
372
|
- examples/memory/04_publish_subscribe_events.rb
|
362
373
|
- examples/memory/05_many_to_many_chat.rb
|
363
|
-
- examples/memory/
|
374
|
+
- examples/memory/06_stdout_publish_only.rb
|
364
375
|
- examples/memory/07_proc_handlers_demo.rb
|
365
376
|
- examples/memory/08_custom_logger_demo.rb
|
366
377
|
- examples/memory/09_error_handling_demo.rb
|
@@ -370,10 +381,13 @@ files:
|
|
370
381
|
- examples/memory/13_header_block_configuration.rb
|
371
382
|
- examples/memory/14_global_configuration_demo.rb
|
372
383
|
- examples/memory/15_logger_demo.rb
|
384
|
+
- examples/memory/16_pretty_print_demo.rb
|
373
385
|
- examples/memory/README.md
|
386
|
+
- examples/memory/log/demo_app.log.2
|
374
387
|
- examples/memory/memory_transport_architecture.svg
|
375
388
|
- examples/memory/point_to_point_pattern.svg
|
376
389
|
- examples/memory/publish_subscribe_pattern.svg
|
390
|
+
- examples/multi_transport_example.rb
|
377
391
|
- examples/performance_metrics/benchmark_results_ractor_20250818_205603.json
|
378
392
|
- examples/performance_metrics/benchmark_results_ractor_20250818_205831.json
|
379
393
|
- examples/performance_metrics/benchmark_results_test_20250818_204942.json
|
@@ -394,13 +408,9 @@ files:
|
|
394
408
|
- examples/redis/redis_transport_architecture.svg
|
395
409
|
- examples/redis/smart_home_iot_dataflow.md
|
396
410
|
- examples/redis/smart_home_system_architecture.svg
|
397
|
-
-
|
398
|
-
-
|
399
|
-
-
|
400
|
-
- ideas/improvement.md
|
401
|
-
- ideas/meshage.md
|
402
|
-
- ideas/message_discovery.md
|
403
|
-
- ideas/message_schema.md
|
411
|
+
- examples/utilities/box_it.rb
|
412
|
+
- examples/utilities/doing.rb
|
413
|
+
- examples/utilities/temp.md
|
404
414
|
- lib/simple_stats.rb
|
405
415
|
- lib/smart_message.rb
|
406
416
|
- lib/smart_message/.idea/.gitignore
|
@@ -437,15 +447,21 @@ files:
|
|
437
447
|
- lib/smart_message/serializer/json.rb
|
438
448
|
- lib/smart_message/subscription.rb
|
439
449
|
- lib/smart_message/transport.rb
|
450
|
+
- lib/smart_message/transport/async_publish_queue.rb
|
440
451
|
- lib/smart_message/transport/base.rb
|
452
|
+
- lib/smart_message/transport/fifo_operations.rb
|
453
|
+
- lib/smart_message/transport/file_operations.rb
|
454
|
+
- lib/smart_message/transport/file_transport.rb
|
455
|
+
- lib/smart_message/transport/file_watching.rb
|
441
456
|
- lib/smart_message/transport/memory_transport.rb
|
457
|
+
- lib/smart_message/transport/partitioned_files.rb
|
442
458
|
- lib/smart_message/transport/redis_transport.rb
|
443
459
|
- lib/smart_message/transport/registry.rb
|
444
460
|
- lib/smart_message/transport/stdout_transport.rb
|
461
|
+
- lib/smart_message/transport/stdout_transport.rb.backup
|
445
462
|
- lib/smart_message/utilities.rb
|
446
463
|
- lib/smart_message/version.rb
|
447
464
|
- lib/smart_message/versioning.rb
|
448
|
-
- lib/smart_message/wrapper.rb.bak
|
449
465
|
- mkdocs.yml
|
450
466
|
- p2p_plan.md
|
451
467
|
- p2p_roadmap.md
|
data/ideas/README.md
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
# SmartMessage Ideas and Design Discussions
|
2
|
-
|
3
|
-
This directory contains design discussions and architectural ideas for extending the SmartMessage framework. Each document explores a different aspect of potential enhancements to the system.
|
4
|
-
|
5
|
-
## database_transport.md
|
6
|
-
|
7
|
-
Explores implementing a database-backed transport layer for SmartMessage, enabling persistent message queuing and reliable delivery without requiring external message brokers like RabbitMQ or Kafka. This approach would store messages directly in a PostgreSQL or MySQL database, providing built-in persistence, transactional guarantees, and the ability to query message history.
|
8
|
-
|
9
|
-
The design includes database schema definitions, message lifecycle management (pending, processing, completed, failed states), retry mechanisms with exponential backoff, and dead letter queue functionality. This transport would be particularly useful for applications that already have a database but don't want the operational complexity of managing a separate message broker, or for scenarios requiring long-term message retention and complex querying capabilities.
|
10
|
-
|
11
|
-
## improvement.md
|
12
|
-
|
13
|
-
Contains a comprehensive list of potential improvements and enhancements to the SmartMessage framework, covering areas from core functionality to developer experience. The ideas range from technical enhancements like performance optimizations and new transport implementations to architectural improvements such as better plugin systems and schema management.
|
14
|
-
|
15
|
-
Key improvement areas include adding support for additional transports (Redis, AWS SQS, Google Pub/Sub), implementing message compression and encryption, enhancing the validation framework, improving error handling and retry logic, and adding comprehensive metrics and monitoring capabilities. The document also explores developer experience improvements like better debugging tools, enhanced documentation, and a potential web UI for message inspection.
|
16
|
-
|
17
|
-
## message_discovery.md
|
18
|
-
|
19
|
-
Focuses on the service discovery and dynamic class creation capabilities that would allow SmartMessage-based services to automatically discover and use message types from other services without manual integration. This system would enable services to query a central registry to find available message schemas and dynamically create the corresponding Ruby classes at runtime.
|
20
|
-
|
21
|
-
The discovery mechanism includes APIs for browsing available message types by service, environment, or tags, dynamic class generation from stored schemas without requiring Ruby source files, and automatic synchronization when schemas are updated. This enables true microservice architectures where services can integrate with new message types without code changes or deployments, supporting patterns like partner integrations, multi-tenant systems, and runtime service composition.
|
22
|
-
|
23
|
-
## message_schema.md
|
24
|
-
|
25
|
-
Describes a comprehensive schema registry system that transforms SmartMessage from a messaging framework into a schema management platform. The core innovation is bidirectional conversion between SmartMessage Ruby classes and JSON Schema, enabling message definitions to be stored as data rather than code.
|
26
|
-
|
27
|
-
The system includes automatic schema registration when classes are defined, version tracking and evolution management, and most importantly, the ability to serialize a Ruby class definition to JSON Schema and reconstruct it later using `to_json_schema` and `from_json_schema` methods. This enables powerful capabilities like storing schemas in databases, sharing schemas across different programming languages (with examples for Rust, Python, TypeScript, Go, and Java), runtime schema updates without deployment, and schema governance with approval workflows. The JSON Schema approach provides cross-language interoperability while maintaining safety (no code execution) and human readability, fundamentally changing how distributed systems manage message contracts.
|
28
|
-
|
29
|
-
## meshage.md
|
30
|
-
|
31
|
-
Explores implementing a true mesh network transport for SmartMessage that enables completely decentralized messaging with location-agnostic publishing. Unlike direct peer-to-peer systems, mesh networks allow publishers to send messages to service names without knowing which physical nodes host those services - the mesh automatically routes messages through intermediate nodes until they reach their destination or expire.
|
32
|
-
|
33
|
-
The design emphasizes the key mesh network principles of complete decentralization, multi-hop message routing, and self-terminating messages with TTL. Services register themselves with the mesh, and the network maintains a distributed service directory that enables automatic route discovery. Messages can travel through multiple intermediate nodes (A → C → F → K) to reach their destination, with the mesh providing fault tolerance through alternate routing paths. The document incorporates insights from existing P2P libraries (journeta, p2p2) for proven patterns in NAT traversal, connection management, and network coordination. Multi-layer deduplication ensures message storms are prevented at subscriber, node, and network levels, while network control messages handle presence, health monitoring, and graceful shutdown protocols.
|
34
|
-
|
35
|
-
## agents.md
|
36
|
-
|
37
|
-
Comprehensive exploration of AI agents using SmartMessage for intelligent communication patterns. The document examines how AI agents represent the next evolution in distributed systems - intelligent entities that can make contextual decisions, adapt to scenarios, and communicate using natural language understanding combined with structured messaging.
|
38
|
-
|
39
|
-
The analysis covers three complementary architecture patterns: Agent99 for request/response service coordination, SmartMessage AI for context-aware dynamic messaging, and hybrid approaches that combine both. Key innovations include contextual message selection where AI chooses appropriate message types based on scenarios, intelligent property generation using LLM understanding of validation constraints, and self-healing validation with automatic retry logic.
|
40
|
-
|
41
|
-
The document includes a crucial analysis of Model Context Protocol (MCP) integration, demonstrating how MCP's resource sharing capabilities complement rather than compete with SmartMessage+Agent99. The integration creates a three-layer intelligence stack: Context Layer (MCP) for rich data access, Intelligence Layer (AI + SmartMessage) for smart decision making, and Coordination Layer (Agent99) for multi-agent orchestration. Real-world applications span smart city management, autonomous supply chains, and healthcare coordination systems, showing how these technologies enable truly intelligent distributed systems that understand context, communicate naturally, and coordinate seamlessly.
|