smart_message 0.0.7 → 0.0.9
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/.irbrc +24 -0
- data/CHANGELOG.md +143 -0
- data/Gemfile.lock +6 -1
- data/README.md +289 -15
- data/docs/README.md +3 -1
- data/docs/addressing.md +119 -13
- data/docs/architecture.md +68 -0
- data/docs/dead_letter_queue.md +673 -0
- data/docs/dispatcher.md +87 -0
- data/docs/examples.md +59 -1
- data/docs/getting-started.md +8 -1
- data/docs/logging.md +382 -326
- data/docs/message_filtering.md +451 -0
- data/examples/01_point_to_point_orders.rb +54 -53
- data/examples/02_publish_subscribe_events.rb +14 -10
- data/examples/03_many_to_many_chat.rb +16 -8
- data/examples/04_redis_smart_home_iot.rb +20 -10
- data/examples/05_proc_handlers.rb +12 -11
- data/examples/06_custom_logger_example.rb +95 -100
- data/examples/07_error_handling_scenarios.rb +4 -2
- data/examples/08_entity_addressing_basic.rb +18 -6
- data/examples/08_entity_addressing_with_filtering.rb +27 -9
- data/examples/09_dead_letter_queue_demo.rb +559 -0
- data/examples/09_regex_filtering_microservices.rb +407 -0
- data/examples/10_header_block_configuration.rb +263 -0
- data/examples/11_global_configuration_example.rb +219 -0
- data/examples/README.md +102 -0
- data/examples/dead_letters.jsonl +12 -0
- data/examples/performance_metrics/benchmark_results_ractor_20250818_205603.json +135 -0
- data/examples/performance_metrics/benchmark_results_ractor_20250818_205831.json +135 -0
- data/examples/performance_metrics/benchmark_results_test_20250818_204942.json +130 -0
- data/examples/performance_metrics/benchmark_results_threadpool_20250818_204942.json +130 -0
- data/examples/performance_metrics/benchmark_results_threadpool_20250818_204959.json +130 -0
- data/examples/performance_metrics/benchmark_results_threadpool_20250818_205044.json +130 -0
- data/examples/performance_metrics/benchmark_results_threadpool_20250818_205109.json +130 -0
- data/examples/performance_metrics/benchmark_results_threadpool_20250818_205252.json +130 -0
- data/examples/performance_metrics/benchmark_results_unknown_20250819_172852.json +130 -0
- data/examples/performance_metrics/compare_benchmarks.rb +519 -0
- data/examples/performance_metrics/dead_letters.jsonl +3100 -0
- data/examples/performance_metrics/performance_benchmark.rb +344 -0
- data/examples/show_logger.rb +367 -0
- data/examples/show_me.rb +145 -0
- data/examples/temp.txt +94 -0
- data/examples/tmux_chat/bot_agent.rb +4 -2
- data/examples/tmux_chat/human_agent.rb +4 -2
- data/examples/tmux_chat/room_monitor.rb +4 -2
- data/examples/tmux_chat/shared_chat_system.rb +6 -3
- data/lib/smart_message/addressing.rb +259 -0
- data/lib/smart_message/base.rb +121 -599
- data/lib/smart_message/circuit_breaker.rb +23 -6
- data/lib/smart_message/configuration.rb +199 -0
- data/lib/smart_message/dead_letter_queue.rb +361 -0
- data/lib/smart_message/dispatcher.rb +90 -49
- data/lib/smart_message/header.rb +5 -0
- data/lib/smart_message/logger/base.rb +21 -1
- data/lib/smart_message/logger/default.rb +88 -138
- data/lib/smart_message/logger/lumberjack.rb +324 -0
- data/lib/smart_message/logger/null.rb +81 -0
- data/lib/smart_message/logger.rb +17 -9
- data/lib/smart_message/messaging.rb +100 -0
- data/lib/smart_message/plugins.rb +132 -0
- data/lib/smart_message/serializer/base.rb +25 -8
- data/lib/smart_message/serializer/json.rb +5 -4
- data/lib/smart_message/subscription.rb +193 -0
- data/lib/smart_message/transport/base.rb +84 -53
- data/lib/smart_message/transport/memory_transport.rb +7 -5
- data/lib/smart_message/transport/redis_transport.rb +15 -45
- data/lib/smart_message/transport/stdout_transport.rb +18 -8
- data/lib/smart_message/transport.rb +1 -34
- data/lib/smart_message/utilities.rb +142 -0
- data/lib/smart_message/version.rb +1 -1
- data/lib/smart_message/versioning.rb +85 -0
- data/lib/smart_message/wrapper.rb.bak +132 -0
- data/lib/smart_message.rb +74 -27
- data/smart_message.gemspec +3 -0
- metadata +77 -3
- data/lib/smart_message/serializer.rb +0 -10
- data/lib/smart_message/wrapper.rb +0 -43
@@ -0,0 +1,130 @@
|
|
1
|
+
{
|
2
|
+
"benchmark_info": {
|
3
|
+
"timestamp": "2025-08-18T20:52:52-05:00",
|
4
|
+
"implementation": "thread_pool",
|
5
|
+
"ruby_version": "3.4.5",
|
6
|
+
"platform": "arm64-darwin24",
|
7
|
+
"processor_count": 12
|
8
|
+
},
|
9
|
+
"overall_stats": {
|
10
|
+
"total_runtime": 1.71345,
|
11
|
+
"memory_used_mb": 67.484375
|
12
|
+
},
|
13
|
+
"scenario_results": {
|
14
|
+
"cpu_light": {
|
15
|
+
"name": "CPU Light",
|
16
|
+
"messages_generated": 1000,
|
17
|
+
"messages_published": 1000,
|
18
|
+
"messages_processed": 1000,
|
19
|
+
"errors": 0,
|
20
|
+
"times": {
|
21
|
+
"total": 0.358245,
|
22
|
+
"publish": 0.146183,
|
23
|
+
"processing": 0.105031
|
24
|
+
},
|
25
|
+
"throughput": {
|
26
|
+
"messages_per_second": 2791.385783472205,
|
27
|
+
"publish_rate": 6840.740715404664
|
28
|
+
},
|
29
|
+
"dispatcher_stats": {
|
30
|
+
"scheduled_task_count": 1000,
|
31
|
+
"completed_task_count": 1000,
|
32
|
+
"queue_length": 0,
|
33
|
+
"length": 767,
|
34
|
+
"running": true
|
35
|
+
}
|
36
|
+
},
|
37
|
+
"cpu_heavy": {
|
38
|
+
"name": "CPU Heavy",
|
39
|
+
"messages_generated": 500,
|
40
|
+
"messages_published": 500,
|
41
|
+
"messages_processed": 500,
|
42
|
+
"errors": 0,
|
43
|
+
"times": {
|
44
|
+
"total": 0.551001,
|
45
|
+
"publish": 0.037816,
|
46
|
+
"processing": 0.445864
|
47
|
+
},
|
48
|
+
"throughput": {
|
49
|
+
"messages_per_second": 907.439369438531,
|
50
|
+
"publish_rate": 13221.916649037443
|
51
|
+
},
|
52
|
+
"dispatcher_stats": {
|
53
|
+
"scheduled_task_count": 1500,
|
54
|
+
"completed_task_count": 1500,
|
55
|
+
"queue_length": 0,
|
56
|
+
"length": 767,
|
57
|
+
"running": true
|
58
|
+
}
|
59
|
+
},
|
60
|
+
"io_light": {
|
61
|
+
"name": "I/O Light",
|
62
|
+
"messages_generated": 800,
|
63
|
+
"messages_published": 800,
|
64
|
+
"messages_processed": 800,
|
65
|
+
"errors": 0,
|
66
|
+
"times": {
|
67
|
+
"total": 0.254371,
|
68
|
+
"publish": 0.055562,
|
69
|
+
"processing": 0.105019
|
70
|
+
},
|
71
|
+
"throughput": {
|
72
|
+
"messages_per_second": 3145.0125997067275,
|
73
|
+
"publish_rate": 14398.329793743926
|
74
|
+
},
|
75
|
+
"dispatcher_stats": {
|
76
|
+
"scheduled_task_count": 2300,
|
77
|
+
"completed_task_count": 2300,
|
78
|
+
"queue_length": 0,
|
79
|
+
"length": 800,
|
80
|
+
"running": true
|
81
|
+
}
|
82
|
+
},
|
83
|
+
"io_heavy": {
|
84
|
+
"name": "I/O Heavy",
|
85
|
+
"messages_generated": 200,
|
86
|
+
"messages_published": 200,
|
87
|
+
"messages_processed": 200,
|
88
|
+
"errors": 0,
|
89
|
+
"times": {
|
90
|
+
"total": 0.136309,
|
91
|
+
"publish": 0.009807,
|
92
|
+
"processing": 0.105042
|
93
|
+
},
|
94
|
+
"throughput": {
|
95
|
+
"messages_per_second": 1467.2545466550264,
|
96
|
+
"publish_rate": 20393.596410727034
|
97
|
+
},
|
98
|
+
"dispatcher_stats": {
|
99
|
+
"scheduled_task_count": 2500,
|
100
|
+
"completed_task_count": 2500,
|
101
|
+
"queue_length": 0,
|
102
|
+
"length": 800,
|
103
|
+
"running": true
|
104
|
+
}
|
105
|
+
},
|
106
|
+
"mixed": {
|
107
|
+
"name": "Mixed Load",
|
108
|
+
"messages_generated": 600,
|
109
|
+
"messages_published": 600,
|
110
|
+
"messages_processed": 600,
|
111
|
+
"errors": 0,
|
112
|
+
"times": {
|
113
|
+
"total": 0.396035,
|
114
|
+
"publish": 0.034099,
|
115
|
+
"processing": 0.27945
|
116
|
+
},
|
117
|
+
"throughput": {
|
118
|
+
"messages_per_second": 1515.0176120797403,
|
119
|
+
"publish_rate": 17595.823924455264
|
120
|
+
},
|
121
|
+
"dispatcher_stats": {
|
122
|
+
"scheduled_task_count": 3100,
|
123
|
+
"completed_task_count": 3100,
|
124
|
+
"queue_length": 0,
|
125
|
+
"length": 800,
|
126
|
+
"running": true
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}
|
130
|
+
}
|
@@ -0,0 +1,130 @@
|
|
1
|
+
{
|
2
|
+
"benchmark_info": {
|
3
|
+
"timestamp": "2025-08-19T17:28:52-05:00",
|
4
|
+
"subject": "unknown",
|
5
|
+
"ruby_version": "3.4.5",
|
6
|
+
"platform": "arm64-darwin24",
|
7
|
+
"processors": 12
|
8
|
+
},
|
9
|
+
"overall_stats": {
|
10
|
+
"total_runtime": 2.160022,
|
11
|
+
"memory_used_mb": 86.9375
|
12
|
+
},
|
13
|
+
"scenario_results": {
|
14
|
+
"cpu_light": {
|
15
|
+
"name": "CPU Light",
|
16
|
+
"messages_generated": 1000,
|
17
|
+
"messages_published": 1000,
|
18
|
+
"messages_processed": 1000,
|
19
|
+
"errors": 0,
|
20
|
+
"times": {
|
21
|
+
"total": 0.635312,
|
22
|
+
"publish": 0.406514,
|
23
|
+
"processing": 0.105049
|
24
|
+
},
|
25
|
+
"throughput": {
|
26
|
+
"messages_per_second": 1574.0297680509734,
|
27
|
+
"publish_rate": 2459.939879069356
|
28
|
+
},
|
29
|
+
"dispatcher_stats": {
|
30
|
+
"scheduled_task_count": 1000,
|
31
|
+
"completed_task_count": 1000,
|
32
|
+
"queue_length": 0,
|
33
|
+
"length": 1000,
|
34
|
+
"running": true
|
35
|
+
}
|
36
|
+
},
|
37
|
+
"cpu_heavy": {
|
38
|
+
"name": "CPU Heavy",
|
39
|
+
"messages_generated": 500,
|
40
|
+
"messages_published": 500,
|
41
|
+
"messages_processed": 500,
|
42
|
+
"errors": 0,
|
43
|
+
"times": {
|
44
|
+
"total": 0.322838,
|
45
|
+
"publish": 0.150142,
|
46
|
+
"processing": 0.105063
|
47
|
+
},
|
48
|
+
"throughput": {
|
49
|
+
"messages_per_second": 1548.7643957650587,
|
50
|
+
"publish_rate": 3330.180762211773
|
51
|
+
},
|
52
|
+
"dispatcher_stats": {
|
53
|
+
"scheduled_task_count": 1500,
|
54
|
+
"completed_task_count": 1500,
|
55
|
+
"queue_length": 0,
|
56
|
+
"length": 1000,
|
57
|
+
"running": true
|
58
|
+
}
|
59
|
+
},
|
60
|
+
"io_light": {
|
61
|
+
"name": "I/O Light",
|
62
|
+
"messages_generated": 800,
|
63
|
+
"messages_published": 800,
|
64
|
+
"messages_processed": 800,
|
65
|
+
"errors": 0,
|
66
|
+
"times": {
|
67
|
+
"total": 0.50592,
|
68
|
+
"publish": 0.296219,
|
69
|
+
"processing": 0.10506
|
70
|
+
},
|
71
|
+
"throughput": {
|
72
|
+
"messages_per_second": 1581.2776723592663,
|
73
|
+
"publish_rate": 2700.7045462985157
|
74
|
+
},
|
75
|
+
"dispatcher_stats": {
|
76
|
+
"scheduled_task_count": 2300,
|
77
|
+
"completed_task_count": 2300,
|
78
|
+
"queue_length": 0,
|
79
|
+
"length": 1000,
|
80
|
+
"running": true
|
81
|
+
}
|
82
|
+
},
|
83
|
+
"io_heavy": {
|
84
|
+
"name": "I/O Heavy",
|
85
|
+
"messages_generated": 200,
|
86
|
+
"messages_published": 200,
|
87
|
+
"messages_processed": 200,
|
88
|
+
"errors": 0,
|
89
|
+
"times": {
|
90
|
+
"total": 0.204666,
|
91
|
+
"publish": 0.070861,
|
92
|
+
"processing": 0.105044
|
93
|
+
},
|
94
|
+
"throughput": {
|
95
|
+
"messages_per_second": 977.2018801364175,
|
96
|
+
"publish_rate": 2822.427004981584
|
97
|
+
},
|
98
|
+
"dispatcher_stats": {
|
99
|
+
"scheduled_task_count": 2500,
|
100
|
+
"completed_task_count": 2500,
|
101
|
+
"queue_length": 0,
|
102
|
+
"length": 1000,
|
103
|
+
"running": true
|
104
|
+
}
|
105
|
+
},
|
106
|
+
"mixed": {
|
107
|
+
"name": "Mixed Load",
|
108
|
+
"messages_generated": 600,
|
109
|
+
"messages_published": 600,
|
110
|
+
"messages_processed": 600,
|
111
|
+
"errors": 0,
|
112
|
+
"times": {
|
113
|
+
"total": 0.47226,
|
114
|
+
"publish": 0.263228,
|
115
|
+
"processing": 0.105055
|
116
|
+
},
|
117
|
+
"throughput": {
|
118
|
+
"messages_per_second": 1270.4865963664083,
|
119
|
+
"publish_rate": 2279.3927697661343
|
120
|
+
},
|
121
|
+
"dispatcher_stats": {
|
122
|
+
"scheduled_task_count": 3100,
|
123
|
+
"completed_task_count": 3100,
|
124
|
+
"queue_length": 0,
|
125
|
+
"length": 1000,
|
126
|
+
"running": true
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}
|
130
|
+
}
|