bunny_farm 0.1.2
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 +7 -0
- data/.envrc +1 -0
- data/.github/workflows/docs.yml +38 -0
- data/.gitignore +11 -0
- data/.travis.yml +3 -0
- data/CHANGELOG.md +61 -0
- data/COMMITS.md +196 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +330 -0
- data/Rakefile +9 -0
- data/bunny_farm.gemspec +30 -0
- data/config/bunny.yml.erb +29 -0
- data/config/bunny_test.yml.erb +29 -0
- data/config/hipchat.yml.erb +12 -0
- data/docs/api/configuration.md +9 -0
- data/docs/api/consumer.md +8 -0
- data/docs/api/message-class.md +419 -0
- data/docs/api/publisher.md +9 -0
- data/docs/architecture/integration.md +8 -0
- data/docs/architecture/message-flow.md +11 -0
- data/docs/architecture/overview.md +448 -0
- data/docs/architecture/scaling.md +8 -0
- data/docs/assets/actions_dsl_flow.svg +109 -0
- data/docs/assets/architecture_overview.svg +152 -0
- data/docs/assets/best_practices_patterns.svg +203 -0
- data/docs/assets/bunny_farm_logo.png +0 -0
- data/docs/assets/configuration_api_methods.svg +104 -0
- data/docs/assets/configuration_flow.svg +130 -0
- data/docs/assets/configuration_hierarchy.svg +70 -0
- data/docs/assets/data_processing_pipeline.svg +131 -0
- data/docs/assets/debugging_monitoring.svg +165 -0
- data/docs/assets/ecommerce_example_flow.svg +145 -0
- data/docs/assets/email_campaign_example.svg +127 -0
- data/docs/assets/environment_variables_map.svg +78 -0
- data/docs/assets/error_handling_flow.svg +114 -0
- data/docs/assets/favicon.ico +1 -0
- data/docs/assets/fields_dsl_structure.svg +89 -0
- data/docs/assets/instance_methods_lifecycle.svg +137 -0
- data/docs/assets/integration_patterns.svg +207 -0
- data/docs/assets/json_serialization_flow.svg +153 -0
- data/docs/assets/logo.svg +4 -0
- data/docs/assets/message_api_overview.svg +126 -0
- data/docs/assets/message_encapsulation.svg +113 -0
- data/docs/assets/message_lifecycle.svg +110 -0
- data/docs/assets/message_structure.svg +138 -0
- data/docs/assets/publisher_consumer_api.svg +120 -0
- data/docs/assets/scaling_deployment_patterns.svg +195 -0
- data/docs/assets/smart_routing_diagram.svg +131 -0
- data/docs/assets/system_architecture_overview.svg +155 -0
- data/docs/assets/task_scheduling_flow.svg +139 -0
- data/docs/assets/testing_strategies.svg +146 -0
- data/docs/assets/workflow_patterns.svg +183 -0
- data/docs/assets/yaml_config_structure.svg +72 -0
- data/docs/configuration/environment-variables.md +14 -0
- data/docs/configuration/overview.md +373 -0
- data/docs/configuration/programmatic-setup.md +10 -0
- data/docs/configuration/yaml-configuration.md +12 -0
- data/docs/core-features/configuration.md +528 -0
- data/docs/core-features/error-handling.md +82 -0
- data/docs/core-features/json-serialization.md +545 -0
- data/docs/core-features/message-design.md +406 -0
- data/docs/core-features/smart-routing.md +467 -0
- data/docs/core-features/task-scheduling.md +67 -0
- data/docs/core-features/workflow-support.md +112 -0
- data/docs/development/contributing.md +345 -0
- data/docs/development/roadmap.md +9 -0
- data/docs/development/testing.md +14 -0
- data/docs/examples/order-processing.md +10 -0
- data/docs/examples/overview.md +269 -0
- data/docs/examples/real-world.md +8 -0
- data/docs/examples/simple-producer-consumer.md +15 -0
- data/docs/examples/task-scheduler.md +9 -0
- data/docs/getting-started/basic-concepts.md +274 -0
- data/docs/getting-started/installation.md +122 -0
- data/docs/getting-started/quick-start.md +158 -0
- data/docs/index.md +106 -0
- data/docs/message-structure/actions-dsl.md +163 -0
- data/docs/message-structure/fields-dsl.md +146 -0
- data/docs/message-structure/instance-methods.md +115 -0
- data/docs/message-structure/overview.md +211 -0
- data/examples/README.md +212 -0
- data/examples/consumer.rb +41 -0
- data/examples/images/message_flow.svg +87 -0
- data/examples/images/order_workflow.svg +122 -0
- data/examples/images/producer_consumer.svg +96 -0
- data/examples/images/task_scheduler.svg +140 -0
- data/examples/order_processor.rb +238 -0
- data/examples/producer.rb +60 -0
- data/examples/simple_message.rb +43 -0
- data/examples/task_scheduler.rb +263 -0
- data/images/architecture_overview.svg +152 -0
- data/images/bunny_farm_logo.png +0 -0
- data/images/configuration_flow.svg +130 -0
- data/images/message_structure.svg +138 -0
- data/lib/bunny_farm/.irbrc +7 -0
- data/lib/bunny_farm/generic_consumer.rb +12 -0
- data/lib/bunny_farm/hash_ext.rb +37 -0
- data/lib/bunny_farm/init_bunny.rb +137 -0
- data/lib/bunny_farm/init_hipchat.rb +49 -0
- data/lib/bunny_farm/message.rb +218 -0
- data/lib/bunny_farm/message_elements.rb +25 -0
- data/lib/bunny_farm/version.rb +3 -0
- data/lib/bunny_farm.rb +9 -0
- data/mkdocs.yml +148 -0
- metadata +244 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
<svg width="900" height="600" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<!-- Background transparent -->
|
|
3
|
+
<rect width="900" height="600" fill="transparent"/>
|
|
4
|
+
|
|
5
|
+
<!-- Title -->
|
|
6
|
+
<text x="450" y="35" text-anchor="middle" font-family="Arial, sans-serif" font-size="22" font-weight="bold" fill="#e0e0e0">
|
|
7
|
+
BunnyFarm Architecture Overview
|
|
8
|
+
</text>
|
|
9
|
+
|
|
10
|
+
<!-- Ruby Application Layer -->
|
|
11
|
+
<g>
|
|
12
|
+
<rect x="50" y="80" width="800" height="120" rx="15" fill="#2d3748" stroke="#68d391" stroke-width="3"/>
|
|
13
|
+
<text x="450" y="110" text-anchor="middle" font-family="Arial, sans-serif" font-size="18" font-weight="bold" fill="#68d391">
|
|
14
|
+
Ruby Application Layer
|
|
15
|
+
</text>
|
|
16
|
+
|
|
17
|
+
<!-- Producer Apps -->
|
|
18
|
+
<rect x="80" y="130" width="140" height="50" rx="8" fill="#1a202c" stroke="#68d391" stroke-width="1"/>
|
|
19
|
+
<text x="150" y="150" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#68d391">Web App</text>
|
|
20
|
+
<text x="150" y="165" text-anchor="middle" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">Form Submissions</text>
|
|
21
|
+
|
|
22
|
+
<rect x="240" y="130" width="140" height="50" rx="8" fill="#1a202c" stroke="#68d391" stroke-width="1"/>
|
|
23
|
+
<text x="310" y="150" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#68d391">API Server</text>
|
|
24
|
+
<text x="310" y="165" text-anchor="middle" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">REST Endpoints</text>
|
|
25
|
+
|
|
26
|
+
<rect x="400" y="130" width="140" height="50" rx="8" fill="#1a202c" stroke="#68d391" stroke-width="1"/>
|
|
27
|
+
<text x="470" y="150" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#68d391">Scheduler</text>
|
|
28
|
+
<text x="470" y="165" text-anchor="middle" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">Cron Jobs</text>
|
|
29
|
+
|
|
30
|
+
<!-- Consumer Apps -->
|
|
31
|
+
<rect x="560" y="130" width="140" height="50" rx="8" fill="#1a202c" stroke="#ed8936" stroke-width="1"/>
|
|
32
|
+
<text x="630" y="150" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#ed8936">Worker 1</text>
|
|
33
|
+
<text x="630" y="165" text-anchor="middle" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">Background Jobs</text>
|
|
34
|
+
|
|
35
|
+
<rect x="720" y="130" width="140" height="50" rx="8" fill="#1a202c" stroke="#ed8936" stroke-width="1"/>
|
|
36
|
+
<text x="790" y="150" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#ed8936">Worker 2</text>
|
|
37
|
+
<text x="790" y="165" text-anchor="middle" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">Microservice</text>
|
|
38
|
+
</g>
|
|
39
|
+
|
|
40
|
+
<!-- BunnyFarm Library Layer -->
|
|
41
|
+
<g>
|
|
42
|
+
<rect x="50" y="240" width="800" height="100" rx="15" fill="#2d3748" stroke="#9f7aea" stroke-width="3"/>
|
|
43
|
+
<text x="450" y="270" text-anchor="middle" font-family="Arial, sans-serif" font-size="18" font-weight="bold" fill="#9f7aea">
|
|
44
|
+
BunnyFarm Library
|
|
45
|
+
</text>
|
|
46
|
+
|
|
47
|
+
<!-- Core Components -->
|
|
48
|
+
<rect x="80" y="285" width="120" height="40" rx="5" fill="#9f7aea" stroke="#9f7aea" stroke-width="1"/>
|
|
49
|
+
<text x="140" y="300" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" font-weight="bold" fill="#1a202c">Message</text>
|
|
50
|
+
<text x="140" y="315" text-anchor="middle" font-family="Arial, sans-serif" font-size="9" fill="#1a202c">Base Class</text>
|
|
51
|
+
|
|
52
|
+
<rect x="220" y="285" width="120" height="40" rx="5" fill="#9f7aea" stroke="#9f7aea" stroke-width="1"/>
|
|
53
|
+
<text x="280" y="300" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" font-weight="bold" fill="#1a202c">Publisher</text>
|
|
54
|
+
<text x="280" y="315" text-anchor="middle" font-family="Arial, sans-serif" font-size="9" fill="#1a202c">Send Messages</text>
|
|
55
|
+
|
|
56
|
+
<rect x="360" y="285" width="120" height="40" rx="5" fill="#9f7aea" stroke="#9f7aea" stroke-width="1"/>
|
|
57
|
+
<text x="420" y="300" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" font-weight="bold" fill="#1a202c">Consumer</text>
|
|
58
|
+
<text x="420" y="315" text-anchor="middle" font-family="Arial, sans-serif" font-size="9" fill="#1a202c">Receive and Process</text>
|
|
59
|
+
|
|
60
|
+
<rect x="500" y="285" width="120" height="40" rx="5" fill="#9f7aea" stroke="#9f7aea" stroke-width="1"/>
|
|
61
|
+
<text x="560" y="300" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" font-weight="bold" fill="#1a202c">Config</text>
|
|
62
|
+
<text x="560" y="315" text-anchor="middle" font-family="Arial, sans-serif" font-size="9" fill="#1a202c">Settings</text>
|
|
63
|
+
|
|
64
|
+
<rect x="640" y="285" width="120" height="40" rx="5" fill="#9f7aea" stroke="#9f7aea" stroke-width="1"/>
|
|
65
|
+
<text x="700" y="300" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" font-weight="bold" fill="#1a202c">Router</text>
|
|
66
|
+
<text x="700" y="315" text-anchor="middle" font-family="Arial, sans-serif" font-size="9" fill="#1a202c">Routing Keys</text>
|
|
67
|
+
</g>
|
|
68
|
+
|
|
69
|
+
<!-- RabbitMQ Layer -->
|
|
70
|
+
<g>
|
|
71
|
+
<rect x="50" y="380" width="800" height="120" rx="15" fill="#1a365d" stroke="#2b6cb0" stroke-width="3"/>
|
|
72
|
+
<text x="450" y="410" text-anchor="middle" font-family="Arial, sans-serif" font-size="18" font-weight="bold" fill="#90cdf4">
|
|
73
|
+
RabbitMQ Message Broker
|
|
74
|
+
</text>
|
|
75
|
+
|
|
76
|
+
<!-- Exchange -->
|
|
77
|
+
<rect x="120" y="430" width="140" height="50" rx="8" fill="#2b6cb0" stroke="#90cdf4" stroke-width="1"/>
|
|
78
|
+
<text x="190" y="450" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#e6fffa">Exchange</text>
|
|
79
|
+
<text x="190" y="465" text-anchor="middle" font-family="Arial, sans-serif" font-size="10" fill="#bee3f8">Topic Router</text>
|
|
80
|
+
|
|
81
|
+
<!-- Queues -->
|
|
82
|
+
<rect x="300" y="430" width="100" height="50" rx="8" fill="#2b6cb0" stroke="#90cdf4" stroke-width="1"/>
|
|
83
|
+
<text x="350" y="450" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#e6fffa">Queue 1</text>
|
|
84
|
+
<text x="350" y="465" text-anchor="middle" font-family="Arial, sans-serif" font-size="10" fill="#bee3f8">Orders</text>
|
|
85
|
+
|
|
86
|
+
<rect x="420" y="430" width="100" height="50" rx="8" fill="#2b6cb0" stroke="#90cdf4" stroke-width="1"/>
|
|
87
|
+
<text x="470" y="450" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#e6fffa">Queue 2</text>
|
|
88
|
+
<text x="470" y="465" text-anchor="middle" font-family="Arial, sans-serif" font-size="10" fill="#bee3f8">Tasks</text>
|
|
89
|
+
|
|
90
|
+
<rect x="540" y="430" width="100" height="50" rx="8" fill="#2b6cb0" stroke="#90cdf4" stroke-width="1"/>
|
|
91
|
+
<text x="590" y="450" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#e6fffa">Queue 3</text>
|
|
92
|
+
<text x="590" y="465" text-anchor="middle" font-family="Arial, sans-serif" font-size="10" fill="#bee3f8">Emails</text>
|
|
93
|
+
|
|
94
|
+
<!-- Management -->
|
|
95
|
+
<rect x="680" y="430" width="100" height="50" rx="8" fill="#2b6cb0" stroke="#90cdf4" stroke-width="1"/>
|
|
96
|
+
<text x="730" y="450" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#e6fffa">Management</text>
|
|
97
|
+
<text x="730" y="465" text-anchor="middle" font-family="Arial, sans-serif" font-size="10" fill="#bee3f8">Web UI</text>
|
|
98
|
+
</g>
|
|
99
|
+
|
|
100
|
+
<!-- Storage Layer -->
|
|
101
|
+
<g>
|
|
102
|
+
<rect x="50" y="540" width="800" height="50" rx="15" fill="#2d3748" stroke="#4a5568" stroke-width="2"/>
|
|
103
|
+
<text x="450" y="560" text-anchor="middle" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#cbd5e0">
|
|
104
|
+
Persistence and External Services
|
|
105
|
+
</text>
|
|
106
|
+
|
|
107
|
+
<rect x="100" y="555" width="120" height="30" rx="5" fill="#4a5568"/>
|
|
108
|
+
<text x="160" y="573" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">Database</text>
|
|
109
|
+
|
|
110
|
+
<rect x="240" y="555" width="120" height="30" rx="5" fill="#4a5568"/>
|
|
111
|
+
<text x="300" y="573" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">Email Service</text>
|
|
112
|
+
|
|
113
|
+
<rect x="380" y="555" width="120" height="30" rx="5" fill="#4a5568"/>
|
|
114
|
+
<text x="440" y="573" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">File Storage</text>
|
|
115
|
+
|
|
116
|
+
<rect x="520" y="555" width="120" height="30" rx="5" fill="#4a5568"/>
|
|
117
|
+
<text x="580" y="573" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">APIs</text>
|
|
118
|
+
|
|
119
|
+
<rect x="660" y="555" width="120" height="30" rx="5" fill="#4a5568"/>
|
|
120
|
+
<text x="720" y="573" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">Cache/Redis</text>
|
|
121
|
+
</g>
|
|
122
|
+
|
|
123
|
+
<!-- Flow Arrows -->
|
|
124
|
+
<defs>
|
|
125
|
+
<marker id="arrow-down" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
|
|
126
|
+
<polygon points="0 0, 10 3.5, 0 7" fill="#68d391"/>
|
|
127
|
+
</marker>
|
|
128
|
+
<marker id="arrow-up" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
|
|
129
|
+
<polygon points="0 0, 10 3.5, 0 7" fill="#ed8936"/>
|
|
130
|
+
</marker>
|
|
131
|
+
</defs>
|
|
132
|
+
|
|
133
|
+
<!-- Publishers to BunnyFarm -->
|
|
134
|
+
<line x1="310" y1="200" x2="310" y2="240" stroke="#68d391" stroke-width="2" marker-end="url(#arrow-down)"/>
|
|
135
|
+
<text x="320" y="220" font-family="Arial, sans-serif" font-size="10" fill="#68d391">publish</text>
|
|
136
|
+
|
|
137
|
+
<!-- BunnyFarm to RabbitMQ -->
|
|
138
|
+
<line x1="450" y1="340" x2="450" y2="380" stroke="#9f7aea" stroke-width="2" marker-end="url(#arrow-down)"/>
|
|
139
|
+
<text x="460" y="360" font-family="Arial, sans-serif" font-size="10" fill="#9f7aea">AMQP</text>
|
|
140
|
+
|
|
141
|
+
<!-- RabbitMQ to BunnyFarm (consumers) -->
|
|
142
|
+
<line x1="650" y1="380" x2="650" y2="340" stroke="#ed8936" stroke-width="2" marker-end="url(#arrow-up)"/>
|
|
143
|
+
<text x="660" y="360" font-family="Arial, sans-serif" font-size="10" fill="#ed8936">consume</text>
|
|
144
|
+
|
|
145
|
+
<!-- BunnyFarm to Consumers -->
|
|
146
|
+
<line x1="650" y1="240" x2="650" y2="200" stroke="#ed8936" stroke-width="2" marker-end="url(#arrow-up)"/>
|
|
147
|
+
<text x="660" y="220" font-family="Arial, sans-serif" font-size="10" fill="#ed8936">execute</text>
|
|
148
|
+
|
|
149
|
+
<!-- Workers to Storage -->
|
|
150
|
+
<line x1="720" y1="500" x2="720" y2="540" stroke="#4a5568" stroke-width="2" marker-end="url(#arrow-down)"/>
|
|
151
|
+
<text x="730" y="520" font-family="Arial, sans-serif" font-size="10" fill="#9ca3af">store/fetch</text>
|
|
152
|
+
</svg>
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
<svg width="1000" height="800" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="1000" height="800" fill="transparent"/>
|
|
3
|
+
|
|
4
|
+
<!-- Title -->
|
|
5
|
+
<text x="500" y="30" text-anchor="middle" font-family="Arial, sans-serif" font-size="18" font-weight="bold" fill="#e0e0e0">
|
|
6
|
+
Best Practices and Design Patterns
|
|
7
|
+
</text>
|
|
8
|
+
|
|
9
|
+
<!-- Design Principles -->
|
|
10
|
+
<g>
|
|
11
|
+
<text x="500" y="70" text-anchor="middle" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#68d391">
|
|
12
|
+
Core Design Principles
|
|
13
|
+
</text>
|
|
14
|
+
|
|
15
|
+
<!-- Single Responsibility -->
|
|
16
|
+
<rect x="50" y="100" width="180" height="100" rx="8" fill="#2d3748" stroke="#68d391" stroke-width="2"/>
|
|
17
|
+
<text x="140" y="125" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#68d391">Single Responsibility</text>
|
|
18
|
+
<text x="60" y="145" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• One message = one purpose</text>
|
|
19
|
+
<text x="60" y="160" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Focused business logic</text>
|
|
20
|
+
<text x="60" y="175" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Clear action methods</text>
|
|
21
|
+
<text x="60" y="190" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Minimal dependencies</text>
|
|
22
|
+
|
|
23
|
+
<!-- Idempotency -->
|
|
24
|
+
<rect x="250" y="100" width="180" height="100" rx="8" fill="#2d3748" stroke="#4299e1" stroke-width="2"/>
|
|
25
|
+
<text x="340" y="125" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#4299e1">Idempotency</text>
|
|
26
|
+
<text x="260" y="145" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Safe to retry operations</text>
|
|
27
|
+
<text x="260" y="160" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Unique message IDs</text>
|
|
28
|
+
<text x="260" y="175" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• State validation</text>
|
|
29
|
+
<text x="260" y="190" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Duplicate detection</text>
|
|
30
|
+
|
|
31
|
+
<!-- Loose Coupling -->
|
|
32
|
+
<rect x="450" y="100" width="180" height="100" rx="8" fill="#2d3748" stroke="#9f7aea" stroke-width="2"/>
|
|
33
|
+
<text x="540" y="125" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#9f7aea">Loose Coupling</text>
|
|
34
|
+
<text x="460" y="145" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Message-driven design</text>
|
|
35
|
+
<text x="460" y="160" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Service boundaries</text>
|
|
36
|
+
<text x="460" y="175" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Event-driven architecture</text>
|
|
37
|
+
<text x="460" y="190" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Async communication</text>
|
|
38
|
+
|
|
39
|
+
<!-- Error Resilience -->
|
|
40
|
+
<rect x="650" y="100" width="180" height="100" rx="8" fill="#2d3748" stroke="#f6e05e" stroke-width="2"/>
|
|
41
|
+
<text x="740" y="125" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#f6e05e">Error Resilience</text>
|
|
42
|
+
<text x="660" y="145" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Graceful degradation</text>
|
|
43
|
+
<text x="660" y="160" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Circuit breakers</text>
|
|
44
|
+
<text x="660" y="175" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Retry strategies</text>
|
|
45
|
+
<text x="660" y="190" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Dead letter handling</text>
|
|
46
|
+
</g>
|
|
47
|
+
|
|
48
|
+
<!-- Message Design Patterns -->
|
|
49
|
+
<g>
|
|
50
|
+
<text x="500" y="250" text-anchor="middle" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#e0e0e0">
|
|
51
|
+
Message Design Patterns
|
|
52
|
+
</text>
|
|
53
|
+
|
|
54
|
+
<!-- Command Pattern -->
|
|
55
|
+
<rect x="50" y="280" width="220" height="140" rx="6" fill="#2d3748" stroke="#68d391" stroke-width="1"/>
|
|
56
|
+
<text x="160" y="305" text-anchor="middle" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#68d391">Command Pattern</text>
|
|
57
|
+
|
|
58
|
+
<text x="70" y="325" font-family="monospace" font-size="9" fill="#9ca3af"># Encapsulate requests</text>
|
|
59
|
+
<text x="70" y="340" font-family="monospace" font-size="9" fill="#e0e0e0">class ProcessOrderCommand</text>
|
|
60
|
+
<text x="80" y="355" font-family="monospace" font-size="9" fill="#e0e0e0">fields :order_id, :user_id</text>
|
|
61
|
+
<text x="80" y="370" font-family="monospace" font-size="9" fill="#e0e0e0">actions :execute, :undo</text>
|
|
62
|
+
|
|
63
|
+
<text x="80" y="390" font-family="monospace" font-size="9" fill="#e0e0e0">def execute</text>
|
|
64
|
+
<text x="90" y="405" font-family="monospace" font-size="9" fill="#e0e0e0">OrderService.process(order_id)</text>
|
|
65
|
+
<text x="70" y="420" font-family="monospace" font-size="9" fill="#e0e0e0">end</text>
|
|
66
|
+
|
|
67
|
+
<!-- Event Pattern -->
|
|
68
|
+
<rect x="290" y="280" width="220" height="140" rx="6" fill="#2d3748" stroke="#4299e1" stroke-width="1"/>
|
|
69
|
+
<text x="400" y="305" text-anchor="middle" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#4299e1">Event Pattern</text>
|
|
70
|
+
|
|
71
|
+
<text x="310" y="325" font-family="monospace" font-size="9" fill="#9ca3af"># Record what happened</text>
|
|
72
|
+
<text x="310" y="340" font-family="monospace" font-size="9" fill="#e0e0e0">class OrderProcessedEvent</text>
|
|
73
|
+
<text x="320" y="355" font-family="monospace" font-size="9" fill="#e0e0e0">fields :order_id, :timestamp</text>
|
|
74
|
+
<text x="320" y="370" font-family="monospace" font-size="9" fill="#e0e0e0">actions :notify, :update_metrics</text>
|
|
75
|
+
|
|
76
|
+
<text x="320" y="390" font-family="monospace" font-size="9" fill="#e0e0e0">def notify</text>
|
|
77
|
+
<text x="330" y="405" font-family="monospace" font-size="9" fill="#e0e0e0">publish('email_confirmation')</text>
|
|
78
|
+
<text x="310" y="420" font-family="monospace" font-size="9" fill="#e0e0e0">end</text>
|
|
79
|
+
|
|
80
|
+
<!-- Document Pattern -->
|
|
81
|
+
<rect x="530" y="280" width="220" height="140" rx="6" fill="#2d3748" stroke="#9f7aea" stroke-width="1"/>
|
|
82
|
+
<text x="640" y="305" text-anchor="middle" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#9f7aea">Document Pattern</text>
|
|
83
|
+
|
|
84
|
+
<text x="550" y="325" font-family="monospace" font-size="9" fill="#9ca3af"># Rich data structures</text>
|
|
85
|
+
<text x="550" y="340" font-family="monospace" font-size="9" fill="#e0e0e0">class CustomerDocumentMsg</text>
|
|
86
|
+
<text x="560" y="355" font-family="monospace" font-size="9" fill="#e0e0e0">fields :customer, :orders,</text>
|
|
87
|
+
<text x="570" y="370" font-family="monospace" font-size="9" fill="#e0e0e0">:preferences, :history</text>
|
|
88
|
+
|
|
89
|
+
<text x="560" y="390" font-family="monospace" font-size="9" fill="#e0e0e0">def enrich</text>
|
|
90
|
+
<text x="570" y="405" font-family="monospace" font-size="9" fill="#e0e0e0">load_related_data</text>
|
|
91
|
+
<text x="550" y="420" font-family="monospace" font-size="9" fill="#e0e0e0">end</text>
|
|
92
|
+
|
|
93
|
+
<!-- Request-Reply Pattern -->
|
|
94
|
+
<rect x="770" y="280" width="200" height="140" rx="6" fill="#2d3748" stroke="#f6e05e" stroke-width="1"/>
|
|
95
|
+
<text x="870" y="305" text-anchor="middle" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#f6e05e">Request-Reply</text>
|
|
96
|
+
|
|
97
|
+
<text x="790" y="325" font-family="monospace" font-size="9" fill="#9ca3af"># Synchronous-like</text>
|
|
98
|
+
<text x="790" y="340" font-family="monospace" font-size="9" fill="#e0e0e0">class PriceQuoteRequest</text>
|
|
99
|
+
<text x="800" y="355" font-family="monospace" font-size="9" fill="#e0e0e0">fields :item_id, :reply_to</text>
|
|
100
|
+
|
|
101
|
+
<text x="800" y="375" font-family="monospace" font-size="9" fill="#e0e0e0">def process</text>
|
|
102
|
+
<text x="810" y="390" font-family="monospace" font-size="9" fill="#e0e0e0">price = calculate_price</text>
|
|
103
|
+
<text x="810" y="405" font-family="monospace" font-size="9" fill="#e0e0e0">reply(price)</text>
|
|
104
|
+
<text x="790" y="420" font-family="monospace" font-size="9" fill="#e0e0e0">end</text>
|
|
105
|
+
</g>
|
|
106
|
+
|
|
107
|
+
<!-- Performance Patterns -->
|
|
108
|
+
<g>
|
|
109
|
+
<text x="500" y="470" text-anchor="middle" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#e0e0e0">
|
|
110
|
+
Performance and Scaling Patterns
|
|
111
|
+
</text>
|
|
112
|
+
|
|
113
|
+
<!-- Message Batching -->
|
|
114
|
+
<rect x="50" y="500" width="180" height="120" rx="6" fill="#1a202c" stroke="#68d391" stroke-width="1"/>
|
|
115
|
+
<text x="140" y="525" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#68d391">Message Batching</text>
|
|
116
|
+
<text x="60" y="545" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Group similar operations</text>
|
|
117
|
+
<text x="60" y="560" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Reduce I/O overhead</text>
|
|
118
|
+
<text x="60" y="575" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Bulk database operations</text>
|
|
119
|
+
<text x="60" y="590" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Configurable batch sizes</text>
|
|
120
|
+
<text x="60" y="605" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Time-based flushing</text>
|
|
121
|
+
|
|
122
|
+
<!-- Priority Queues -->
|
|
123
|
+
<rect x="250" y="500" width="180" height="120" rx="6" fill="#1a202c" stroke="#4299e1" stroke-width="1"/>
|
|
124
|
+
<text x="340" y="525" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#4299e1">Priority Queues</text>
|
|
125
|
+
<text x="260" y="545" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Critical message routing</text>
|
|
126
|
+
<text x="260" y="560" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• SLA-based processing</text>
|
|
127
|
+
<text x="260" y="575" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• VIP customer handling</text>
|
|
128
|
+
<text x="260" y="590" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Emergency operations</text>
|
|
129
|
+
<text x="260" y="605" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Resource allocation</text>
|
|
130
|
+
|
|
131
|
+
<!-- Partitioning -->
|
|
132
|
+
<rect x="450" y="500" width="180" height="120" rx="6" fill="#1a202c" stroke="#9f7aea" stroke-width="1"/>
|
|
133
|
+
<text x="540" y="525" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#9f7aea">Queue Partitioning</text>
|
|
134
|
+
<text x="460" y="545" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Tenant-based separation</text>
|
|
135
|
+
<text x="460" y="560" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Geographic distribution</text>
|
|
136
|
+
<text x="460" y="575" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Load balancing</text>
|
|
137
|
+
<text x="460" y="590" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Parallel processing</text>
|
|
138
|
+
<text x="460" y="605" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Hotspot avoidance</text>
|
|
139
|
+
|
|
140
|
+
<!-- Caching -->
|
|
141
|
+
<rect x="650" y="500" width="180" height="120" rx="6" fill="#1a202c" stroke="#f6e05e" stroke-width="1"/>
|
|
142
|
+
<text x="740" y="525" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#f6e05e">Message Caching</text>
|
|
143
|
+
<text x="660" y="545" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Reference data caching</text>
|
|
144
|
+
<text x="660" y="560" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Result memoization</text>
|
|
145
|
+
<text x="660" y="575" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Expensive lookups</text>
|
|
146
|
+
<text x="660" y="590" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• TTL-based invalidation</text>
|
|
147
|
+
<text x="660" y="605" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Cache warming</text>
|
|
148
|
+
</g>
|
|
149
|
+
|
|
150
|
+
<!-- Security Best Practices -->
|
|
151
|
+
<g>
|
|
152
|
+
<text x="500" y="670" text-anchor="middle" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#e0e0e0">
|
|
153
|
+
Security and Compliance
|
|
154
|
+
</text>
|
|
155
|
+
|
|
156
|
+
<!-- Message Encryption -->
|
|
157
|
+
<rect x="80" y="690" width="160" height="80" rx="6" fill="#1a202c" stroke="#e53e3e" stroke-width="1"/>
|
|
158
|
+
<text x="160" y="710" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" font-weight="bold" fill="#e53e3e">Encryption</text>
|
|
159
|
+
<text x="90" y="730" font-family="Arial, sans-serif" font-size="9" fill="#e0e0e0">• Sensitive data protection</text>
|
|
160
|
+
<text x="90" y="745" font-family="Arial, sans-serif" font-size="9" fill="#e0e0e0">• End-to-end security</text>
|
|
161
|
+
<text x="90" y="760" font-family="Arial, sans-serif" font-size="9" fill="#e0e0e0">• Key management</text>
|
|
162
|
+
|
|
163
|
+
<!-- Authentication -->
|
|
164
|
+
<rect x="260" y="690" width="160" height="80" rx="6" fill="#1a202c" stroke="#f6e05e" stroke-width="1"/>
|
|
165
|
+
<text x="340" y="710" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" font-weight="bold" fill="#f6e05e">Authentication</text>
|
|
166
|
+
<text x="270" y="730" font-family="Arial, sans-serif" font-size="9" fill="#e0e0e0">• Connection security</text>
|
|
167
|
+
<text x="270" y="745" font-family="Arial, sans-serif" font-size="9" fill="#e0e0e0">• Client certificates</text>
|
|
168
|
+
<text x="270" y="760" font-family="Arial, sans-serif" font-size="9" fill="#e0e0e0">• Access control</text>
|
|
169
|
+
|
|
170
|
+
<!-- Audit Logging -->
|
|
171
|
+
<rect x="440" y="690" width="160" height="80" rx="6" fill="#1a202c" stroke="#4299e1" stroke-width="1"/>
|
|
172
|
+
<text x="520" y="710" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" font-weight="bold" fill="#4299e1">Audit Logging</text>
|
|
173
|
+
<text x="450" y="730" font-family="Arial, sans-serif" font-size="9" fill="#e0e0e0">• Message traceability</text>
|
|
174
|
+
<text x="450" y="745" font-family="Arial, sans-serif" font-size="9" fill="#e0e0e0">• Compliance reporting</text>
|
|
175
|
+
<text x="450" y="760" font-family="Arial, sans-serif" font-size="9" fill="#e0e0e0">• Security monitoring</text>
|
|
176
|
+
|
|
177
|
+
<!-- Data Privacy -->
|
|
178
|
+
<rect x="620" y="690" width="160" height="80" rx="6" fill="#1a202c" stroke="#9f7aea" stroke-width="1"/>
|
|
179
|
+
<text x="700" y="710" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" font-weight="bold" fill="#9f7aea">Data Privacy</text>
|
|
180
|
+
<text x="630" y="730" font-family="Arial, sans-serif" font-size="9" fill="#e0e0e0">• PII handling</text>
|
|
181
|
+
<text x="630" y="745" font-family="Arial, sans-serif" font-size="9" fill="#e0e0e0">• Data minimization</text>
|
|
182
|
+
<text x="630" y="760" font-family="Arial, sans-serif" font-size="9" fill="#e0e0e0">• Retention policies</text>
|
|
183
|
+
|
|
184
|
+
<!-- Network Security -->
|
|
185
|
+
<rect x="800" y="690" width="160" height="80" rx="6" fill="#1a202c" stroke="#68d391" stroke-width="1"/>
|
|
186
|
+
<text x="880" y="710" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" font-weight="bold" fill="#68d391">Network Security</text>
|
|
187
|
+
<text x="810" y="730" font-family="Arial, sans-serif" font-size="9" fill="#e0e0e0">• TLS encryption</text>
|
|
188
|
+
<text x="810" y="745" font-family="Arial, sans-serif" font-size="9" fill="#e0e0e0">• VPN connections</text>
|
|
189
|
+
<text x="810" y="760" font-family="Arial, sans-serif" font-size="9" fill="#e0e0e0">• Firewall rules</text>
|
|
190
|
+
</g>
|
|
191
|
+
|
|
192
|
+
<!-- Connection arrows for flow -->
|
|
193
|
+
<defs>
|
|
194
|
+
<marker id="arrow-pattern" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
|
|
195
|
+
<polygon points="0 0, 8 3, 0 6" fill="#ff9800"/>
|
|
196
|
+
</marker>
|
|
197
|
+
</defs>
|
|
198
|
+
|
|
199
|
+
<!-- Design principles flow -->
|
|
200
|
+
<line x1="230" y1="150" x2="250" y2="150" stroke="#ff9800" stroke-width="1" marker-end="url(#arrow-pattern)"/>
|
|
201
|
+
<line x1="430" y1="150" x2="450" y2="150" stroke="#ff9800" stroke-width="1" marker-end="url(#arrow-pattern)"/>
|
|
202
|
+
<line x1="630" y1="150" x2="650" y2="150" stroke="#ff9800" stroke-width="1" marker-end="url(#arrow-pattern)"/>
|
|
203
|
+
</svg>
|
|
Binary file
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<svg width="800" height="600" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="800" height="600" fill="transparent"/>
|
|
3
|
+
|
|
4
|
+
<!-- Title -->
|
|
5
|
+
<text x="400" y="30" text-anchor="middle" font-family="Arial, sans-serif" font-size="18" font-weight="bold" fill="#e0e0e0">
|
|
6
|
+
Configuration API Methods
|
|
7
|
+
</text>
|
|
8
|
+
|
|
9
|
+
<!-- Global Configuration -->
|
|
10
|
+
<g>
|
|
11
|
+
<text x="400" y="70" text-anchor="middle" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#ff9800">
|
|
12
|
+
Global Configuration Interface
|
|
13
|
+
</text>
|
|
14
|
+
|
|
15
|
+
<rect x="50" y="90" width="700" height="140" rx="8" fill="#2d3748" stroke="#ff9800" stroke-width="2"/>
|
|
16
|
+
<text x="400" y="115" text-anchor="middle" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="#ff9800">BunnyFarm.configure</text>
|
|
17
|
+
|
|
18
|
+
<text x="70" y="140" font-family="monospace" font-size="11" fill="#4299e1">BunnyFarm.configure do |config|</text>
|
|
19
|
+
<text x="90" y="160" font-family="monospace" font-size="11" fill="#68d391">config.rabbitmq_url</text>
|
|
20
|
+
<text x="250" y="160" font-family="monospace" font-size="11" fill="#e0e0e0">= "amqp://localhost:5672"</text>
|
|
21
|
+
<text x="90" y="175" font-family="monospace" font-size="11" fill="#68d391">config.exchange_name</text>
|
|
22
|
+
<text x="250" y="175" font-family="monospace" font-size="11" fill="#e0e0e0">= "bunny_farm"</text>
|
|
23
|
+
<text x="90" y="190" font-family="monospace" font-size="11" fill="#68d391">config.retry_attempts</text>
|
|
24
|
+
<text x="250" y="190" font-family="monospace" font-size="11" fill="#e0e0e0">= 3</text>
|
|
25
|
+
<text x="90" y="205" font-family="monospace" font-size="11" fill="#68d391">config.logger</text>
|
|
26
|
+
<text x="250" y="205" font-family="monospace" font-size="11" fill="#e0e0e0">= Rails.logger</text>
|
|
27
|
+
<text x="70" y="220" font-family="monospace" font-size="11" fill="#4299e1">end</text>
|
|
28
|
+
</g>
|
|
29
|
+
|
|
30
|
+
<!-- Configuration Categories -->
|
|
31
|
+
<g>
|
|
32
|
+
<text x="400" y="270" text-anchor="middle" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#e0e0e0">
|
|
33
|
+
Configuration Method Categories
|
|
34
|
+
</text>
|
|
35
|
+
|
|
36
|
+
<!-- Connection Methods -->
|
|
37
|
+
<rect x="50" y="290" width="160" height="140" rx="6" fill="#2d3748" stroke="#4299e1" stroke-width="2"/>
|
|
38
|
+
<text x="130" y="315" text-anchor="middle" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#4299e1">Connection</text>
|
|
39
|
+
<text x="60" y="335" font-family="monospace" font-size="10" fill="#e0e0e0">rabbitmq_url</text>
|
|
40
|
+
<text x="60" y="350" font-family="monospace" font-size="10" fill="#e0e0e0">rabbitmq_host</text>
|
|
41
|
+
<text x="60" y="365" font-family="monospace" font-size="10" fill="#e0e0e0">rabbitmq_port</text>
|
|
42
|
+
<text x="60" y="380" font-family="monospace" font-size="10" fill="#e0e0e0">rabbitmq_vhost</text>
|
|
43
|
+
<text x="60" y="395" font-family="monospace" font-size="10" fill="#e0e0e0">rabbitmq_username</text>
|
|
44
|
+
<text x="60" y="410" font-family="monospace" font-size="10" fill="#e0e0e0">rabbitmq_password</text>
|
|
45
|
+
|
|
46
|
+
<!-- Exchange Methods -->
|
|
47
|
+
<rect x="230" y="290" width="160" height="140" rx="6" fill="#2d3748" stroke="#68d391" stroke-width="2"/>
|
|
48
|
+
<text x="310" y="315" text-anchor="middle" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#68d391">Exchange</text>
|
|
49
|
+
<text x="240" y="335" font-family="monospace" font-size="10" fill="#e0e0e0">exchange_name</text>
|
|
50
|
+
<text x="240" y="350" font-family="monospace" font-size="10" fill="#e0e0e0">exchange_type</text>
|
|
51
|
+
<text x="240" y="365" font-family="monospace" font-size="10" fill="#e0e0e0">exchange_durable</text>
|
|
52
|
+
<text x="240" y="380" font-family="monospace" font-size="10" fill="#e0e0e0">routing_key_prefix</text>
|
|
53
|
+
<text x="240" y="395" font-family="monospace" font-size="10" fill="#e0e0e0">default_queue_name</text>
|
|
54
|
+
|
|
55
|
+
<!-- Error Handling Methods -->
|
|
56
|
+
<rect x="410" y="290" width="160" height="140" rx="6" fill="#2d3748" stroke="#e53e3e" stroke-width="2"/>
|
|
57
|
+
<text x="490" y="315" text-anchor="middle" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#e53e3e">Error Handling</text>
|
|
58
|
+
<text x="420" y="335" font-family="monospace" font-size="10" fill="#e0e0e0">retry_attempts</text>
|
|
59
|
+
<text x="420" y="350" font-family="monospace" font-size="10" fill="#e0e0e0">retry_delay</text>
|
|
60
|
+
<text x="420" y="365" font-family="monospace" font-size="10" fill="#e0e0e0">retry_backoff</text>
|
|
61
|
+
<text x="420" y="380" font-family="monospace" font-size="10" fill="#e0e0e0">dead_letter_queue</text>
|
|
62
|
+
<text x="420" y="395" font-family="monospace" font-size="10" fill="#e0e0e0">error_handler</text>
|
|
63
|
+
|
|
64
|
+
<!-- Logging Methods -->
|
|
65
|
+
<rect x="590" y="290" width="160" height="140" rx="6" fill="#2d3748" stroke="#f6e05e" stroke-width="2"/>
|
|
66
|
+
<text x="670" y="315" text-anchor="middle" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#f6e05e">Logging</text>
|
|
67
|
+
<text x="600" y="335" font-family="monospace" font-size="10" fill="#e0e0e0">logger</text>
|
|
68
|
+
<text x="600" y="350" font-family="monospace" font-size="10" fill="#e0e0e0">log_level</text>
|
|
69
|
+
<text x="600" y="365" font-family="monospace" font-size="10" fill="#e0e0e0">log_format</text>
|
|
70
|
+
<text x="600" y="380" font-family="monospace" font-size="10" fill="#e0e0e0">enable_metrics</text>
|
|
71
|
+
<text x="600" y="395" font-family="monospace" font-size="10" fill="#e0e0e0">metrics_reporter</text>
|
|
72
|
+
</g>
|
|
73
|
+
|
|
74
|
+
<!-- Configuration Access -->
|
|
75
|
+
<g>
|
|
76
|
+
<text x="400" y="470" text-anchor="middle" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#e0e0e0">
|
|
77
|
+
Configuration Access and Management
|
|
78
|
+
</text>
|
|
79
|
+
|
|
80
|
+
<!-- Reading Configuration -->
|
|
81
|
+
<rect x="50" y="490" width="220" height="90" rx="6" fill="#1a202c" stroke="#9f7aea" stroke-width="1"/>
|
|
82
|
+
<text x="160" y="510" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#9f7aea">Reading Config</text>
|
|
83
|
+
<text x="60" y="530" font-family="monospace" font-size="10" fill="#e0e0e0">BunnyFarm.configuration</text>
|
|
84
|
+
<text x="60" y="545" font-family="monospace" font-size="10" fill="#e0e0e0">BunnyFarm.config.rabbitmq_url</text>
|
|
85
|
+
<text x="60" y="560" font-family="monospace" font-size="10" fill="#e0e0e0">BunnyFarm.config.retry_attempts</text>
|
|
86
|
+
<text x="60" y="575" font-family="monospace" font-size="10" fill="#e0e0e0">BunnyFarm.configured?</text>
|
|
87
|
+
|
|
88
|
+
<!-- Environment Loading -->
|
|
89
|
+
<rect x="290" y="490" width="220" height="90" rx="6" fill="#1a202c" stroke="#68d391" stroke-width="1"/>
|
|
90
|
+
<text x="400" y="510" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#68d391">Environment Loading</text>
|
|
91
|
+
<text x="300" y="530" font-family="monospace" font-size="10" fill="#e0e0e0">BunnyFarm.load_config</text>
|
|
92
|
+
<text x="300" y="545" font-family="monospace" font-size="10" fill="#e0e0e0">BunnyFarm.load_from_file</text>
|
|
93
|
+
<text x="300" y="560" font-family="monospace" font-size="10" fill="#e0e0e0">BunnyFarm.load_from_env</text>
|
|
94
|
+
<text x="300" y="575" font-family="monospace" font-size="10" fill="#e0e0e0">BunnyFarm.merge_config</text>
|
|
95
|
+
|
|
96
|
+
<!-- Validation -->
|
|
97
|
+
<rect x="530" y="490" width="220" height="90" rx="6" fill="#1a202c" stroke="#f6e05e" stroke-width="1"/>
|
|
98
|
+
<text x="640" y="510" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#f6e05e">Validation</text>
|
|
99
|
+
<text x="540" y="530" font-family="monospace" font-size="10" fill="#e0e0e0">BunnyFarm.validate_config</text>
|
|
100
|
+
<text x="540" y="545" font-family="monospace" font-size="10" fill="#e0e0e0">BunnyFarm.config_valid?</text>
|
|
101
|
+
<text x="540" y="560" font-family="monospace" font-size="10" fill="#e0e0e0">BunnyFarm.config_errors</text>
|
|
102
|
+
<text x="540" y="575" font-family="monospace" font-size="10" fill="#e0e0e0">BunnyFarm.reset_config</text>
|
|
103
|
+
</g>
|
|
104
|
+
</svg>
|