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,137 @@
|
|
|
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
|
+
Instance Methods: Message Lifecycle Management
|
|
7
|
+
</text>
|
|
8
|
+
|
|
9
|
+
<!-- Method Categories -->
|
|
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
|
+
Core Instance Methods
|
|
13
|
+
</text>
|
|
14
|
+
|
|
15
|
+
<!-- Creation Methods -->
|
|
16
|
+
<rect x="50" y="100" width="160" height="120" rx="8" fill="#2d3748" stroke="#68d391" stroke-width="2"/>
|
|
17
|
+
<text x="130" y="125" text-anchor="middle" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#68d391">Creation and Setup</text>
|
|
18
|
+
<text x="60" y="145" font-family="monospace" font-size="10" fill="#e0e0e0">initialize(data={})</text>
|
|
19
|
+
<text x="60" y="160" font-family="monospace" font-size="10" fill="#e0e0e0">setup!</text>
|
|
20
|
+
<text x="60" y="175" font-family="monospace" font-size="10" fill="#e0e0e0">configure</text>
|
|
21
|
+
<text x="60" y="190" font-family="monospace" font-size="10" fill="#e0e0e0">validate!</text>
|
|
22
|
+
<text x="60" y="205" font-family="monospace" font-size="10" fill="#e0e0e0">prepare</text>
|
|
23
|
+
|
|
24
|
+
<!-- Publishing Methods -->
|
|
25
|
+
<rect x="230" y="100" width="160" height="120" rx="8" fill="#2d3748" stroke="#4299e1" stroke-width="2"/>
|
|
26
|
+
<text x="310" y="125" text-anchor="middle" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#4299e1">Publishing</text>
|
|
27
|
+
<text x="240" y="145" font-family="monospace" font-size="10" fill="#e0e0e0">publish(action)</text>
|
|
28
|
+
<text x="240" y="160" font-family="monospace" font-size="10" fill="#e0e0e0">publish_at(time)</text>
|
|
29
|
+
<text x="240" y="175" font-family="monospace" font-size="10" fill="#e0e0e0">publish_in(delay)</text>
|
|
30
|
+
<text x="240" y="190" font-family="monospace" font-size="10" fill="#e0e0e0">schedule(cron)</text>
|
|
31
|
+
<text x="240" y="205" font-family="monospace" font-size="10" fill="#e0e0e0">broadcast</text>
|
|
32
|
+
|
|
33
|
+
<!-- Processing Methods -->
|
|
34
|
+
<rect x="410" y="100" width="160" height="120" rx="8" fill="#2d3748" stroke="#9f7aea" stroke-width="2"/>
|
|
35
|
+
<text x="490" y="125" text-anchor="middle" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#9f7aea">Processing</text>
|
|
36
|
+
<text x="420" y="145" font-family="monospace" font-size="10" fill="#e0e0e0">process(action)</text>
|
|
37
|
+
<text x="420" y="160" font-family="monospace" font-size="10" fill="#e0e0e0">execute</text>
|
|
38
|
+
<text x="420" y="175" font-family="monospace" font-size="10" fill="#e0e0e0">perform</text>
|
|
39
|
+
<text x="420" y="190" font-family="monospace" font-size="10" fill="#e0e0e0">handle</text>
|
|
40
|
+
<text x="420" y="205" font-family="monospace" font-size="10" fill="#e0e0e0">run</text>
|
|
41
|
+
|
|
42
|
+
<!-- State Methods -->
|
|
43
|
+
<rect x="590" y="100" width="160" height="120" rx="8" fill="#2d3748" stroke="#f6e05e" stroke-width="2"/>
|
|
44
|
+
<text x="670" y="125" text-anchor="middle" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#f6e05e">State and Utility</text>
|
|
45
|
+
<text x="600" y="145" font-family="monospace" font-size="10" fill="#e0e0e0">valid?</text>
|
|
46
|
+
<text x="600" y="160" font-family="monospace" font-size="10" fill="#e0e0e0">errors</text>
|
|
47
|
+
<text x="600" y="175" font-family="monospace" font-size="10" fill="#e0e0e0">to_h / to_hash</text>
|
|
48
|
+
<text x="600" y="190" font-family="monospace" font-size="10" fill="#e0e0e0">to_json</text>
|
|
49
|
+
<text x="600" y="205" font-family="monospace" font-size="10" fill="#e0e0e0">inspect</text>
|
|
50
|
+
</g>
|
|
51
|
+
|
|
52
|
+
<!-- Lifecycle Flow -->
|
|
53
|
+
<g>
|
|
54
|
+
<text x="400" y="270" text-anchor="middle" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#e0e0e0">
|
|
55
|
+
Message Instance Lifecycle
|
|
56
|
+
</text>
|
|
57
|
+
|
|
58
|
+
<!-- Step 1: Initialize -->
|
|
59
|
+
<rect x="50" y="300" width="120" height="60" rx="6" fill="#1a202c" stroke="#68d391" stroke-width="2"/>
|
|
60
|
+
<text x="110" y="320" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" font-weight="bold" fill="#68d391">1. Initialize</text>
|
|
61
|
+
<text x="60" y="340" font-family="monospace" font-size="9" fill="#e0e0e0">msg = Message.new</text>
|
|
62
|
+
<text x="60" y="355" font-family="monospace" font-size="9" fill="#e0e0e0">msg.setup!</text>
|
|
63
|
+
|
|
64
|
+
<!-- Step 2: Configure -->
|
|
65
|
+
<rect x="190" y="300" width="120" height="60" rx="6" fill="#1a202c" stroke="#4299e1" stroke-width="2"/>
|
|
66
|
+
<text x="250" y="320" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" font-weight="bold" fill="#4299e1">2. Configure</text>
|
|
67
|
+
<text x="200" y="340" font-family="monospace" font-size="9" fill="#e0e0e0">msg[:field] = value</text>
|
|
68
|
+
<text x="200" y="355" font-family="monospace" font-size="9" fill="#e0e0e0">msg.validate!</text>
|
|
69
|
+
|
|
70
|
+
<!-- Step 3: Publish -->
|
|
71
|
+
<rect x="330" y="300" width="120" height="60" rx="6" fill="#1a202c" stroke="#9f7aea" stroke-width="2"/>
|
|
72
|
+
<text x="390" y="320" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" font-weight="bold" fill="#9f7aea">3. Publish</text>
|
|
73
|
+
<text x="340" y="340" font-family="monospace" font-size="9" fill="#e0e0e0">msg.publish('action')</text>
|
|
74
|
+
<text x="340" y="355" font-family="monospace" font-size="9" fill="#e0e0e0">Serialize and Send</text>
|
|
75
|
+
|
|
76
|
+
<!-- Step 4: Process -->
|
|
77
|
+
<rect x="470" y="300" width="120" height="60" rx="6" fill="#1a202c" stroke="#f6e05e" stroke-width="2"/>
|
|
78
|
+
<text x="530" y="320" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" font-weight="bold" fill="#f6e05e">4. Process</text>
|
|
79
|
+
<text x="480" y="340" font-family="monospace" font-size="9" fill="#e0e0e0">msg.process('action')</text>
|
|
80
|
+
<text x="480" y="355" font-family="monospace" font-size="9" fill="#e0e0e0">Execute business logic</text>
|
|
81
|
+
|
|
82
|
+
<!-- Step 5: Complete -->
|
|
83
|
+
<rect x="610" y="300" width="120" height="60" rx="6" fill="#1a202c" stroke="#e53e3e" stroke-width="2"/>
|
|
84
|
+
<text x="670" y="320" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" font-weight="bold" fill="#e53e3e">5. Complete</text>
|
|
85
|
+
<text x="620" y="340" font-family="monospace" font-size="9" fill="#e0e0e0">ACK/NACK</text>
|
|
86
|
+
<text x="620" y="355" font-family="monospace" font-size="9" fill="#e0e0e0">Cleanup</text>
|
|
87
|
+
</g>
|
|
88
|
+
|
|
89
|
+
<!-- Method Details -->
|
|
90
|
+
<g>
|
|
91
|
+
<text x="400" y="410" text-anchor="middle" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#e0e0e0">
|
|
92
|
+
Key Method Examples
|
|
93
|
+
</text>
|
|
94
|
+
|
|
95
|
+
<!-- Publishing Example -->
|
|
96
|
+
<rect x="50" y="430" width="220" height="120" rx="6" fill="#2d3748" stroke="#4299e1" stroke-width="1"/>
|
|
97
|
+
<text x="160" y="450" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#4299e1">Publishing Methods</text>
|
|
98
|
+
<text x="60" y="470" font-family="monospace" font-size="10" fill="#e0e0e0"># Immediate</text>
|
|
99
|
+
<text x="60" y="485" font-family="monospace" font-size="10" fill="#e0e0e0">message.publish('process')</text>
|
|
100
|
+
<text x="60" y="505" font-family="monospace" font-size="10" fill="#e0e0e0"># Delayed</text>
|
|
101
|
+
<text x="60" y="520" font-family="monospace" font-size="10" fill="#e0e0e0">message.publish_in(5.minutes)</text>
|
|
102
|
+
<text x="60" y="540" font-family="monospace" font-size="10" fill="#e0e0e0"># Scheduled</text>
|
|
103
|
+
<text x="60" y="555" font-family="monospace" font-size="10" fill="#e0e0e0">message.schedule('0 9 * * 1')</text>
|
|
104
|
+
|
|
105
|
+
<!-- Validation Example -->
|
|
106
|
+
<rect x="290" y="430" width="220" height="120" rx="6" fill="#2d3748" stroke="#68d391" stroke-width="1"/>
|
|
107
|
+
<text x="400" y="450" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#68d391">Validation Methods</text>
|
|
108
|
+
<text x="300" y="470" font-family="monospace" font-size="10" fill="#e0e0e0">if message.valid?</text>
|
|
109
|
+
<text x="310" y="485" font-family="monospace" font-size="10" fill="#e0e0e0">message.publish('process')</text>
|
|
110
|
+
<text x="300" y="500" font-family="monospace" font-size="10" fill="#e0e0e0">else</text>
|
|
111
|
+
<text x="310" y="515" font-family="monospace" font-size="10" fill="#e0e0e0">puts message.errors</text>
|
|
112
|
+
<text x="310" y="530" font-family="monospace" font-size="10" fill="#e0e0e0">handle_validation_error</text>
|
|
113
|
+
<text x="300" y="545" font-family="monospace" font-size="10" fill="#e0e0e0">end</text>
|
|
114
|
+
|
|
115
|
+
<!-- Serialization Example -->
|
|
116
|
+
<rect x="530" y="430" width="220" height="120" rx="6" fill="#2d3748" stroke="#9f7aea" stroke-width="1"/>
|
|
117
|
+
<text x="640" y="450" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#9f7aea">Serialization Methods</text>
|
|
118
|
+
<text x="540" y="470" font-family="monospace" font-size="10" fill="#e0e0e0"># To Hash</text>
|
|
119
|
+
<text x="540" y="485" font-family="monospace" font-size="10" fill="#e0e0e0">hash_data = msg.to_h</text>
|
|
120
|
+
<text x="540" y="505" font-family="monospace" font-size="10" fill="#e0e0e0"># To JSON</text>
|
|
121
|
+
<text x="540" y="520" font-family="monospace" font-size="10" fill="#e0e0e0">json_data = msg.to_json</text>
|
|
122
|
+
<text x="540" y="540" font-family="monospace" font-size="10" fill="#e0e0e0"># Inspect</text>
|
|
123
|
+
<text x="540" y="555" font-family="monospace" font-size="10" fill="#e0e0e0">puts msg.inspect</text>
|
|
124
|
+
</g>
|
|
125
|
+
|
|
126
|
+
<!-- Flow arrows -->
|
|
127
|
+
<defs>
|
|
128
|
+
<marker id="arrow-instance" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
|
|
129
|
+
<polygon points="0 0, 8 3, 0 6" fill="#ff9800"/>
|
|
130
|
+
</marker>
|
|
131
|
+
</defs>
|
|
132
|
+
|
|
133
|
+
<line x1="170" y1="330" x2="190" y2="330" stroke="#ff9800" stroke-width="2" marker-end="url(#arrow-instance)"/>
|
|
134
|
+
<line x1="310" y1="330" x2="330" y2="330" stroke="#ff9800" stroke-width="2" marker-end="url(#arrow-instance)"/>
|
|
135
|
+
<line x1="450" y1="330" x2="470" y2="330" stroke="#ff9800" stroke-width="2" marker-end="url(#arrow-instance)"/>
|
|
136
|
+
<line x1="590" y1="330" x2="610" y2="330" stroke="#ff9800" stroke-width="2" marker-end="url(#arrow-instance)"/>
|
|
137
|
+
</svg>
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
<svg width="1000" height="700" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="1000" height="700" 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
|
+
Integration Patterns and External System Connectivity
|
|
7
|
+
</text>
|
|
8
|
+
|
|
9
|
+
<!-- Rails Integration -->
|
|
10
|
+
<g>
|
|
11
|
+
<text x="200" y="70" text-anchor="middle" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="#e53e3e">
|
|
12
|
+
Rails/ActiveJob Integration
|
|
13
|
+
</text>
|
|
14
|
+
|
|
15
|
+
<rect x="50" y="90" width="300" height="140" rx="8" fill="#2d3748" stroke="#e53e3e" stroke-width="2"/>
|
|
16
|
+
|
|
17
|
+
<text x="200" y="115" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#e53e3e">Rails Application</text>
|
|
18
|
+
|
|
19
|
+
<!-- ActiveJob Adapter -->
|
|
20
|
+
<rect x="70" y="130" width="120" height="30" rx="4" fill="#1a202c" stroke="#4299e1" stroke-width="1"/>
|
|
21
|
+
<text x="130" y="150" text-anchor="middle" font-family="Arial, sans-serif" font-size="10" fill="#4299e1">ActiveJob Adapter</text>
|
|
22
|
+
|
|
23
|
+
<!-- BunnyFarm Integration -->
|
|
24
|
+
<rect x="210" y="130" width="120" height="30" rx="4" fill="#1a202c" stroke="#68d391" stroke-width="1"/>
|
|
25
|
+
<text x="270" y="150" text-anchor="middle" font-family="Arial, sans-serif" font-size="10" fill="#68d391">BunnyFarm Messages</text>
|
|
26
|
+
|
|
27
|
+
<!-- Code Example -->
|
|
28
|
+
<text x="70" y="185" font-family="monospace" font-size="9" fill="#9ca3af"># Job definition</text>
|
|
29
|
+
<text x="70" y="200" font-family="monospace" font-size="9" fill="#e0e0e0">class EmailJob < ApplicationJob</text>
|
|
30
|
+
<text x="80" y="215" font-family="monospace" font-size="9" fill="#e0e0e0">queue_as :emails</text>
|
|
31
|
+
<text x="70" y="230" font-family="monospace" font-size="9" fill="#e0e0e0">end</text>
|
|
32
|
+
</g>
|
|
33
|
+
|
|
34
|
+
<!-- Sidekiq Integration -->
|
|
35
|
+
<g>
|
|
36
|
+
<text x="500" y="70" text-anchor="middle" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="#f6e05e">
|
|
37
|
+
Sidekiq Integration
|
|
38
|
+
</text>
|
|
39
|
+
|
|
40
|
+
<rect x="380" y="90" width="240" height="140" rx="8" fill="#2d3748" stroke="#f6e05e" stroke-width="2"/>
|
|
41
|
+
|
|
42
|
+
<text x="500" y="115" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#f6e05e">Hybrid Architecture</text>
|
|
43
|
+
|
|
44
|
+
<!-- Redis -->
|
|
45
|
+
<rect x="400" y="130" width="70" height="25" rx="3" fill="#1a202c" stroke="#e53e3e" stroke-width="1"/>
|
|
46
|
+
<text x="435" y="147" text-anchor="middle" font-family="Arial, sans-serif" font-size="9" fill="#e53e3e">Redis</text>
|
|
47
|
+
|
|
48
|
+
<!-- Sidekiq -->
|
|
49
|
+
<rect x="480" y="130" width="70" height="25" rx="3" fill="#1a202c" stroke="#9f7aea" stroke-width="1"/>
|
|
50
|
+
<text x="515" y="147" text-anchor="middle" font-family="Arial, sans-serif" font-size="9" fill="#9f7aea">Sidekiq</text>
|
|
51
|
+
|
|
52
|
+
<!-- BunnyFarm -->
|
|
53
|
+
<rect x="560" y="130" width="70" height="25" rx="3" fill="#1a202c" stroke="#68d391" stroke-width="1"/>
|
|
54
|
+
<text x="595" y="147" text-anchor="middle" font-family="Arial, sans-serif" font-size="9" fill="#68d391">BunnyFarm</text>
|
|
55
|
+
|
|
56
|
+
<!-- Use Cases -->
|
|
57
|
+
<text x="400" y="180" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Sidekiq: Fast, simple jobs</text>
|
|
58
|
+
<text x="400" y="195" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• BunnyFarm: Complex workflows</text>
|
|
59
|
+
<text x="400" y="210" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Inter-service messaging</text>
|
|
60
|
+
<text x="400" y="225" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• External system integration</text>
|
|
61
|
+
</g>
|
|
62
|
+
|
|
63
|
+
<!-- External Systems -->
|
|
64
|
+
<g>
|
|
65
|
+
<text x="800" y="70" text-anchor="middle" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="#4299e1">
|
|
66
|
+
External System Integration
|
|
67
|
+
</text>
|
|
68
|
+
|
|
69
|
+
<rect x="680" y="90" width="240" height="140" rx="8" fill="#2d3748" stroke="#4299e1" stroke-width="2"/>
|
|
70
|
+
|
|
71
|
+
<!-- API Gateway -->
|
|
72
|
+
<rect x="700" y="110" width="80" height="20" rx="3" fill="#1a202c" stroke="#68d391" stroke-width="1"/>
|
|
73
|
+
<text x="740" y="125" text-anchor="middle" font-family="Arial, sans-serif" font-size="9" fill="#68d391">API Gateway</text>
|
|
74
|
+
|
|
75
|
+
<!-- Webhooks -->
|
|
76
|
+
<rect x="790" y="110" width="80" height="20" rx="3" fill="#1a202c" stroke="#f6e05e" stroke-width="1"/>
|
|
77
|
+
<text x="830" y="125" text-anchor="middle" font-family="Arial, sans-serif" font-size="9" fill="#f6e05e">Webhooks</text>
|
|
78
|
+
|
|
79
|
+
<!-- Third-party APIs -->
|
|
80
|
+
<rect x="700" y="140" width="80" height="20" rx="3" fill="#1a202c" stroke="#9f7aea" stroke-width="1"/>
|
|
81
|
+
<text x="740" y="155" text-anchor="middle" font-family="Arial, sans-serif" font-size="9" fill="#9f7aea">Payment APIs</text>
|
|
82
|
+
|
|
83
|
+
<rect x="790" y="140" width="80" height="20" rx="3" fill="#1a202c" stroke="#e53e3e" stroke-width="1"/>
|
|
84
|
+
<text x="830" y="155" text-anchor="middle" font-family="Arial, sans-serif" font-size="9" fill="#e53e3e">Email Services</text>
|
|
85
|
+
|
|
86
|
+
<!-- Message Bridge -->
|
|
87
|
+
<rect x="700" y="170" width="170" height="25" rx="3" fill="#1a202c" stroke="#ff9800" stroke-width="2"/>
|
|
88
|
+
<text x="785" y="187" text-anchor="middle" font-family="Arial, sans-serif" font-size="10" font-weight="bold" fill="#ff9800">BunnyFarm Message Bridge</text>
|
|
89
|
+
|
|
90
|
+
<!-- Integration Points -->
|
|
91
|
+
<text x="700" y="215" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• HTTP → Message conversion</text>
|
|
92
|
+
<text x="700" y="230" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Async → Sync response mapping</text>
|
|
93
|
+
</g>
|
|
94
|
+
|
|
95
|
+
<!-- Message Transformation Patterns -->
|
|
96
|
+
<g>
|
|
97
|
+
<text x="500" y="290" text-anchor="middle" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#e0e0e0">
|
|
98
|
+
Message Transformation Patterns
|
|
99
|
+
</text>
|
|
100
|
+
|
|
101
|
+
<!-- Content-Based Router -->
|
|
102
|
+
<rect x="50" y="320" width="200" height="120" rx="6" fill="#2d3748" stroke="#68d391" stroke-width="1"/>
|
|
103
|
+
<text x="150" y="345" text-anchor="middle" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#68d391">Content-Based Router</text>
|
|
104
|
+
|
|
105
|
+
<text x="70" y="365" font-family="monospace" font-size="9" fill="#e0e0e0">def route_message(msg)</text>
|
|
106
|
+
<text x="80" y="380" font-family="monospace" font-size="9" fill="#e0e0e0">case msg.type</text>
|
|
107
|
+
<text x="80" y="395" font-family="monospace" font-size="9" fill="#e0e0e0">when :urgent</text>
|
|
108
|
+
<text x="90" y="410" font-family="monospace" font-size="9" fill="#e0e0e0">publish('urgent.queue')</text>
|
|
109
|
+
<text x="80" y="425" font-family="monospace" font-size="9" fill="#e0e0e0">else</text>
|
|
110
|
+
<text x="90" y="440" font-family="monospace" font-size="9" fill="#e0e0e0">publish('standard.queue')</text>
|
|
111
|
+
<text x="70" y="455" font-family="monospace" font-size="9" fill="#e0e0e0">end</text>
|
|
112
|
+
|
|
113
|
+
<!-- Message Translator -->
|
|
114
|
+
<rect x="270" y="320" width="200" height="120" rx="6" fill="#2d3748" stroke="#4299e1" stroke-width="1"/>
|
|
115
|
+
<text x="370" y="345" text-anchor="middle" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#4299e1">Message Translator</text>
|
|
116
|
+
|
|
117
|
+
<text x="290" y="365" font-family="monospace" font-size="9" fill="#e0e0e0">class OrderTranslator</text>
|
|
118
|
+
<text x="300" y="380" font-family="monospace" font-size="9" fill="#e0e0e0">def to_external_format</text>
|
|
119
|
+
<text x="310" y="395" font-family="monospace" font-size="9" fill="#e0e0e0">external_order = {</text>
|
|
120
|
+
<text x="320" y="410" font-family="monospace" font-size="9" fill="#e0e0e0">orderId: order_id,</text>
|
|
121
|
+
<text x="320" y="425" font-family="monospace" font-size="9" fill="#e0e0e0">customerId: customer_id</text>
|
|
122
|
+
<text x="310" y="440" font-family="monospace" font-size="9" fill="#e0e0e0">}</text>
|
|
123
|
+
<text x="290" y="455" font-family="monospace" font-size="9" fill="#e0e0e0">end</text>
|
|
124
|
+
|
|
125
|
+
<!-- Message Enricher -->
|
|
126
|
+
<rect x="490" y="320" width="200" height="120" rx="6" fill="#2d3748" stroke="#9f7aea" stroke-width="1"/>
|
|
127
|
+
<text x="590" y="345" text-anchor="middle" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#9f7aea">Message Enricher</text>
|
|
128
|
+
|
|
129
|
+
<text x="510" y="365" font-family="monospace" font-size="9" fill="#e0e0e0">def enrich_order(msg)</text>
|
|
130
|
+
<text x="520" y="380" font-family="monospace" font-size="9" fill="#e0e0e0"># Add customer details</text>
|
|
131
|
+
<text x="520" y="395" font-family="monospace" font-size="9" fill="#e0e0e0">customer = Customer.find(</text>
|
|
132
|
+
<text x="530" y="410" font-family="monospace" font-size="9" fill="#e0e0e0">msg.customer_id)</text>
|
|
133
|
+
<text x="520" y="425" font-family="monospace" font-size="9" fill="#e0e0e0">msg.customer_data =</text>
|
|
134
|
+
<text x="530" y="440" font-family="monospace" font-size="9" fill="#e0e0e0">customer.to_h</text>
|
|
135
|
+
<text x="510" y="455" font-family="monospace" font-size="9" fill="#e0e0e0">end</text>
|
|
136
|
+
|
|
137
|
+
<!-- Splitter Pattern -->
|
|
138
|
+
<rect x="710" y="320" width="200" height="120" rx="6" fill="#2d3748" stroke="#f6e05e" stroke-width="1"/>
|
|
139
|
+
<text x="810" y="345" text-anchor="middle" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#f6e05e">Message Splitter</text>
|
|
140
|
+
|
|
141
|
+
<text x="730" y="365" font-family="monospace" font-size="9" fill="#e0e0e0">def split_order(msg)</text>
|
|
142
|
+
<text x="740" y="380" font-family="monospace" font-size="9" fill="#e0e0e0">msg.items.each do |item|</text>
|
|
143
|
+
<text x="750" y="395" font-family="monospace" font-size="9" fill="#e0e0e0">item_msg = ItemMessage</text>
|
|
144
|
+
<text x="760" y="410" font-family="monospace" font-size="9" fill="#e0e0e0">.new(item)</text>
|
|
145
|
+
<text x="750" y="425" font-family="monospace" font-size="9" fill="#e0e0e0">item_msg.publish(</text>
|
|
146
|
+
<text x="760" y="440" font-family="monospace" font-size="9" fill="#e0e0e0">'process')</text>
|
|
147
|
+
<text x="730" y="455" font-family="monospace" font-size="9" fill="#e0e0e0">end</text>
|
|
148
|
+
</g>
|
|
149
|
+
|
|
150
|
+
<!-- Protocol Adapters -->
|
|
151
|
+
<g>
|
|
152
|
+
<text x="500" y="510" text-anchor="middle" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#e0e0e0">
|
|
153
|
+
Protocol Adapters and Bridges
|
|
154
|
+
</text>
|
|
155
|
+
|
|
156
|
+
<!-- HTTP Bridge -->
|
|
157
|
+
<rect x="80" y="540" width="160" height="100" rx="6" fill="#1a202c" stroke="#68d391" stroke-width="1"/>
|
|
158
|
+
<text x="160" y="560" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#68d391">HTTP Bridge</text>
|
|
159
|
+
<text x="90" y="580" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• REST API endpoints</text>
|
|
160
|
+
<text x="90" y="595" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Webhook receivers</text>
|
|
161
|
+
<text x="90" y="610" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• GraphQL subscriptions</text>
|
|
162
|
+
<text x="90" y="625" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Server-sent events</text>
|
|
163
|
+
|
|
164
|
+
<!-- Database Bridge -->
|
|
165
|
+
<rect x="260" y="540" width="160" height="100" rx="6" fill="#1a202c" stroke="#4299e1" stroke-width="1"/>
|
|
166
|
+
<text x="340" y="560" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#4299e1">Database Bridge</text>
|
|
167
|
+
<text x="270" y="580" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Change data capture</text>
|
|
168
|
+
<text x="270" y="595" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Trigger-based events</text>
|
|
169
|
+
<text x="270" y="610" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Polling mechanisms</text>
|
|
170
|
+
<text x="270" y="625" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Transaction log mining</text>
|
|
171
|
+
|
|
172
|
+
<!-- File Bridge -->
|
|
173
|
+
<rect x="440" y="540" width="160" height="100" rx="6" fill="#1a202c" stroke="#9f7aea" stroke-width="1"/>
|
|
174
|
+
<text x="520" y="560" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#9f7aea">File System Bridge</text>
|
|
175
|
+
<text x="450" y="580" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• File watchers</text>
|
|
176
|
+
<text x="450" y="595" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• CSV/JSON imports</text>
|
|
177
|
+
<text x="450" y="610" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• FTP/SFTP monitoring</text>
|
|
178
|
+
<text x="450" y="625" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Cloud storage events</text>
|
|
179
|
+
|
|
180
|
+
<!-- Message Bridge -->
|
|
181
|
+
<rect x="620" y="540" width="160" height="100" rx="6" fill="#1a202c" stroke="#f6e05e" stroke-width="1"/>
|
|
182
|
+
<text x="700" y="560" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#f6e05e">Message Bridge</text>
|
|
183
|
+
<text x="630" y="580" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Kafka integration</text>
|
|
184
|
+
<text x="630" y="595" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Apache Pulsar</text>
|
|
185
|
+
<text x="630" y="610" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• AWS SQS/SNS</text>
|
|
186
|
+
<text x="630" y="625" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Azure Service Bus</text>
|
|
187
|
+
|
|
188
|
+
<!-- Email Bridge -->
|
|
189
|
+
<rect x="800" y="540" width="160" height="100" rx="6" fill="#1a202c" stroke="#e53e3e" stroke-width="1"/>
|
|
190
|
+
<text x="880" y="560" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#e53e3e">Email Bridge</text>
|
|
191
|
+
<text x="810" y="580" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• IMAP monitoring</text>
|
|
192
|
+
<text x="810" y="595" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Email parsing</text>
|
|
193
|
+
<text x="810" y="610" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Attachment processing</text>
|
|
194
|
+
<text x="810" y="625" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">• Auto-reply systems</text>
|
|
195
|
+
</g>
|
|
196
|
+
|
|
197
|
+
<!-- Connection arrows -->
|
|
198
|
+
<defs>
|
|
199
|
+
<marker id="arrow-integrate" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
|
|
200
|
+
<polygon points="0 0, 8 3, 0 6" fill="#ff9800"/>
|
|
201
|
+
</marker>
|
|
202
|
+
</defs>
|
|
203
|
+
|
|
204
|
+
<!-- Integration flow arrows -->
|
|
205
|
+
<line x1="350" y1="160" x2="380" y2="160" stroke="#ff9800" stroke-width="2" marker-end="url(#arrow-integrate)"/>
|
|
206
|
+
<line x1="620" y1="160" x2="680" y2="160" stroke="#ff9800" stroke-width="2" marker-end="url(#arrow-integrate)"/>
|
|
207
|
+
</svg>
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
<svg width="1000" height="600" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="1000" height="600" fill="transparent"/>
|
|
3
|
+
|
|
4
|
+
<!-- Title -->
|
|
5
|
+
<text x="500" y="30" text-anchor="middle" font-family="Arial, sans-serif" font-size="20" font-weight="bold" fill="#e0e0e0">
|
|
6
|
+
JSON Serialization: Human-Readable, Language-Agnostic Messages
|
|
7
|
+
</text>
|
|
8
|
+
|
|
9
|
+
<!-- Ruby Object -->
|
|
10
|
+
<g>
|
|
11
|
+
<text x="150" y="80" text-anchor="middle" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#68d391">
|
|
12
|
+
Ruby Message Object
|
|
13
|
+
</text>
|
|
14
|
+
|
|
15
|
+
<rect x="50" y="100" width="200" height="180" rx="8" fill="#2d3748" stroke="#68d391" stroke-width="2"/>
|
|
16
|
+
<text x="150" y="125" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#68d391">OrderMessage Instance</text>
|
|
17
|
+
|
|
18
|
+
<text x="60" y="145" font-family="monospace" font-size="10" fill="#e0e0e0">message[:order_id] = 12345</text>
|
|
19
|
+
<text x="60" y="160" font-family="monospace" font-size="10" fill="#e0e0e0">message[:total] = 99.99</text>
|
|
20
|
+
<text x="60" y="175" font-family="monospace" font-size="10" fill="#e0e0e0">message[:customer] = {</text>
|
|
21
|
+
<text x="70" y="190" font-family="monospace" font-size="10" fill="#e0e0e0">name: "John Doe",</text>
|
|
22
|
+
<text x="70" y="205" font-family="monospace" font-size="10" fill="#e0e0e0">email: "john@example.com"</text>
|
|
23
|
+
<text x="60" y="220" font-family="monospace" font-size="10" fill="#e0e0e0">}</text>
|
|
24
|
+
<text x="60" y="235" font-family="monospace" font-size="10" fill="#e0e0e0">message[:items] = [</text>
|
|
25
|
+
<text x="70" y="250" font-family="monospace" font-size="10" fill="#e0e0e0">{id: 1, qty: 2, price: 29.99}</text>
|
|
26
|
+
<text x="60" y="265" font-family="monospace" font-size="10" fill="#e0e0e0">]</text>
|
|
27
|
+
</g>
|
|
28
|
+
|
|
29
|
+
<!-- Serialization Arrow -->
|
|
30
|
+
<defs>
|
|
31
|
+
<marker id="arrow-serialize" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
|
|
32
|
+
<polygon points="0 0, 10 3.5, 0 7" fill="#ff9800"/>
|
|
33
|
+
</marker>
|
|
34
|
+
</defs>
|
|
35
|
+
|
|
36
|
+
<line x1="260" y1="190" x2="340" y2="190" stroke="#ff9800" stroke-width="3" marker-end="url(#arrow-serialize)"/>
|
|
37
|
+
<text x="300" y="185" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" fill="#ff9800">serialize</text>
|
|
38
|
+
<text x="300" y="210" text-anchor="middle" font-family="Arial, sans-serif" font-size="10" fill="#ff9800">to_json</text>
|
|
39
|
+
|
|
40
|
+
<!-- JSON Message -->
|
|
41
|
+
<g>
|
|
42
|
+
<text x="500" y="80" text-anchor="middle" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#4299e1">
|
|
43
|
+
JSON Message
|
|
44
|
+
</text>
|
|
45
|
+
|
|
46
|
+
<rect x="350" y="100" width="300" height="180" rx="8" fill="#2d3748" stroke="#4299e1" stroke-width="2"/>
|
|
47
|
+
<text x="500" y="125" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#4299e1">Human-Readable Format</text>
|
|
48
|
+
|
|
49
|
+
<text x="360" y="145" font-family="monospace" font-size="10" fill="#e0e0e0">{</text>
|
|
50
|
+
<text x="370" y="160" font-family="monospace" font-size="10" fill="#e0e0e0">"order_id": 12345,</text>
|
|
51
|
+
<text x="370" y="175" font-family="monospace" font-size="10" fill="#e0e0e0">"total": 99.99,</text>
|
|
52
|
+
<text x="370" y="190" font-family="monospace" font-size="10" fill="#e0e0e0">"customer": {</text>
|
|
53
|
+
<text x="380" y="205" font-family="monospace" font-size="10" fill="#e0e0e0">"name": "John Doe",</text>
|
|
54
|
+
<text x="380" y="220" font-family="monospace" font-size="10" fill="#e0e0e0">"email": "john@example.com"</text>
|
|
55
|
+
<text x="370" y="235" font-family="monospace" font-size="10" fill="#e0e0e0">},</text>
|
|
56
|
+
<text x="370" y="250" font-family="monospace" font-size="10" fill="#e0e0e0">"items": [</text>
|
|
57
|
+
<text x="380" y="265" font-family="monospace" font-size="10" fill="#e0e0e0">{"id": 1, "qty": 2, "price": 29.99}</text>
|
|
58
|
+
<text x="370" y="280" font-family="monospace" font-size="10" fill="#e0e0e0">]</text>
|
|
59
|
+
<text x="360" y="295" font-family="monospace" font-size="10" fill="#e0e0e0">}</text>
|
|
60
|
+
</g>
|
|
61
|
+
|
|
62
|
+
<!-- Deserialization Arrow -->
|
|
63
|
+
<line x1="660" y1="190" x2="740" y2="190" stroke="#ff9800" stroke-width="3" marker-end="url(#arrow-serialize)"/>
|
|
64
|
+
<text x="700" y="185" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" fill="#ff9800">deserialize</text>
|
|
65
|
+
<text x="700" y="210" text-anchor="middle" font-family="Arial, sans-serif" font-size="10" fill="#ff9800">JSON.parse</text>
|
|
66
|
+
|
|
67
|
+
<!-- Ruby Object (Consumer) -->
|
|
68
|
+
<g>
|
|
69
|
+
<text x="850" y="80" text-anchor="middle" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#68d391">
|
|
70
|
+
Ruby Message Object
|
|
71
|
+
</text>
|
|
72
|
+
|
|
73
|
+
<rect x="750" y="100" width="200" height="180" rx="8" fill="#2d3748" stroke="#68d391" stroke-width="2"/>
|
|
74
|
+
<text x="850" y="125" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#68d391">Consumer Instance</text>
|
|
75
|
+
|
|
76
|
+
<text x="760" y="145" font-family="monospace" font-size="10" fill="#e0e0e0">def process</text>
|
|
77
|
+
<text x="770" y="160" font-family="monospace" font-size="10" fill="#e0e0e0">order_id = @items[:order_id]</text>
|
|
78
|
+
<text x="770" y="175" font-family="monospace" font-size="10" fill="#e0e0e0">total = @items[:total]</text>
|
|
79
|
+
<text x="770" y="190" font-family="monospace" font-size="10" fill="#e0e0e0">customer = @items[:customer]</text>
|
|
80
|
+
<text x="770" y="205" font-family="monospace" font-size="10" fill="#e0e0e0">puts customer[:name]</text>
|
|
81
|
+
<text x="770" y="220" font-family="monospace" font-size="10" fill="#e0e0e0">puts customer[:email]</text>
|
|
82
|
+
<text x="770" y="235" font-family="monospace" font-size="10" fill="#e0e0e0">validate_order</text>
|
|
83
|
+
<text x="770" y="250" font-family="monospace" font-size="10" fill="#e0e0e0">process_payment</text>
|
|
84
|
+
<text x="770" y="265" font-family="monospace" font-size="10" fill="#e0e0e0">success!</text>
|
|
85
|
+
<text x="760" y="280" font-family="monospace" font-size="10" fill="#e0e0e0">end</text>
|
|
86
|
+
</g>
|
|
87
|
+
|
|
88
|
+
<!-- Benefits Section -->
|
|
89
|
+
<g>
|
|
90
|
+
<text x="500" y="340" text-anchor="middle" font-family="Arial, sans-serif" font-size="18" font-weight="bold" fill="#e0e0e0">
|
|
91
|
+
Why JSON? Benefits and Use Cases
|
|
92
|
+
</text>
|
|
93
|
+
|
|
94
|
+
<!-- Human Readable -->
|
|
95
|
+
<rect x="50" y="360" width="180" height="160" rx="8" fill="#2d3748" stroke="#68d391" stroke-width="2"/>
|
|
96
|
+
<text x="140" y="385" text-anchor="middle" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="#68d391">Human Readable</text>
|
|
97
|
+
<text x="60" y="405" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">✅ Easy to debug</text>
|
|
98
|
+
<text x="60" y="420" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">✅ Monitor in RabbitMQ UI</text>
|
|
99
|
+
<text x="60" y="435" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">✅ Log messages clearly</text>
|
|
100
|
+
<text x="60" y="450" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">✅ Inspect with tools</text>
|
|
101
|
+
<text x="60" y="465" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">✅ Copy/paste for testing</text>
|
|
102
|
+
<text x="60" y="480" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">✅ Understanding data flow</text>
|
|
103
|
+
<text x="60" y="495" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">✅ Documentation</text>
|
|
104
|
+
<text x="60" y="510" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">✅ Team collaboration</text>
|
|
105
|
+
|
|
106
|
+
<!-- Language Agnostic -->
|
|
107
|
+
<rect x="250" y="360" width="180" height="160" rx="8" fill="#2d3748" stroke="#4299e1" stroke-width="2"/>
|
|
108
|
+
<text x="340" y="385" text-anchor="middle" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="#4299e1">Language Agnostic</text>
|
|
109
|
+
<text x="260" y="405" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">🐍 Python consumers</text>
|
|
110
|
+
<text x="260" y="420" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">🟨 Node.js producers</text>
|
|
111
|
+
<text x="260" y="435" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">☕ Java integrations</text>
|
|
112
|
+
<text x="260" y="450" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">🦀 Rust processors</text>
|
|
113
|
+
<text x="260" y="465" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">🌐 Web APIs</text>
|
|
114
|
+
<text x="260" y="480" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">📱 Mobile apps</text>
|
|
115
|
+
<text x="260" y="495" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">🤖 External systems</text>
|
|
116
|
+
<text x="260" y="510" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">⚡ Microservices</text>
|
|
117
|
+
|
|
118
|
+
<!-- Tooling Support -->
|
|
119
|
+
<rect x="450" y="360" width="180" height="160" rx="8" fill="#2d3748" stroke="#9f7aea" stroke-width="2"/>
|
|
120
|
+
<text x="540" y="385" text-anchor="middle" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="#9f7aea">Rich Tooling</text>
|
|
121
|
+
<text x="460" y="405" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">🔍 jq for processing</text>
|
|
122
|
+
<text x="460" y="420" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">🎨 Pretty printing</text>
|
|
123
|
+
<text x="460" y="435" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">✔️ Schema validation</text>
|
|
124
|
+
<text x="460" y="450" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">📊 Analytics tools</text>
|
|
125
|
+
<text x="460" y="465" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">🔧 REST API tools</text>
|
|
126
|
+
<text x="460" y="480" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">📝 Editor support</text>
|
|
127
|
+
<text x="460" y="495" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">🐛 Debugging tools</text>
|
|
128
|
+
<text x="460" y="510" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">📈 Monitoring</text>
|
|
129
|
+
|
|
130
|
+
<!-- Simplicity -->
|
|
131
|
+
<rect x="650" y="360" width="180" height="160" rx="8" fill="#2d3748" stroke="#f6e05e" stroke-width="2"/>
|
|
132
|
+
<text x="740" y="385" text-anchor="middle" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="#f6e05e">Simplicity First</text>
|
|
133
|
+
<text x="660" y="405" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">⚡ No complex protocols</text>
|
|
134
|
+
<text x="660" y="420" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">🔄 Easy serialization</text>
|
|
135
|
+
<text x="660" y="435" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">📦 No binary overhead</text>
|
|
136
|
+
<text x="660" y="450" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">🎯 Focus on logic</text>
|
|
137
|
+
<text x="660" y="465" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">🔧 Standard library</text>
|
|
138
|
+
<text x="660" y="480" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">📚 Well documented</text>
|
|
139
|
+
<text x="660" y="495" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">🎓 Easy to learn</text>
|
|
140
|
+
<text x="660" y="510" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">🏃 Quick setup</text>
|
|
141
|
+
|
|
142
|
+
<!-- K.I.S.S. Philosophy -->
|
|
143
|
+
<rect x="850" y="360" width="120" height="160" rx="8" fill="#2d3748" stroke="#e53e3e" stroke-width="2"/>
|
|
144
|
+
<text x="910" y="385" text-anchor="middle" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="#e53e3e">K.I.S.S.</text>
|
|
145
|
+
<text x="910" y="405" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">Keep It</text>
|
|
146
|
+
<text x="910" y="420" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">Simple,</text>
|
|
147
|
+
<text x="910" y="435" text-anchor="middle" font-family="Arial, sans-serif" font-size="11" fill="#e0e0e0">Stupid</text>
|
|
148
|
+
<text x="860" y="460" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">Simple solutions</text>
|
|
149
|
+
<text x="860" y="475" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">over complex ones</text>
|
|
150
|
+
<text x="860" y="490" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">Readable over</text>
|
|
151
|
+
<text x="860" y="505" font-family="Arial, sans-serif" font-size="10" fill="#e0e0e0">optimized</text>
|
|
152
|
+
</g>
|
|
153
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<circle cx="32" cy="32" r="30" fill="#ff9800" stroke="#f57c00" stroke-width="2"/>
|
|
3
|
+
<text x="32" y="40" text-anchor="middle" font-family="Arial, sans-serif" font-size="24" font-weight="bold" fill="white">🐰</text>
|
|
4
|
+
</svg>
|