@@ -120,38 +120,38 @@ responses = await policy.generate.route(prompt=prompt)
120120
121121** API Summary:**
122122- ` .route() ` - Send request to any healthy replica in a service (load balanced)
123- - ` .call_one() ` - Send request to a single actor instance
123+ - ` .call_one() ` - Send request to a single actor instance
124124- ` .fanout() ` - Send request to ALL replicas in a service
125125
126126``` mermaid
127127graph LR
128128 subgraph Request["Your Request"]
129129 Code["await service.method.ADVERB()"]
130130 end
131-
131+
132132 subgraph Patterns["Communication Patterns"]
133133 Route[".route()<br/>→ One healthy replica"]
134134 CallOne[".call_one()<br/>→ Single actor"]
135135 Fanout[".fanout()<br/>→ ALL replicas"]
136136 end
137-
137+
138138 subgraph Replicas["Replicas/Actors"]
139139 R1["Replica 1"]
140140 R2["Replica 2"]
141141 R3["Replica 3"]
142142 A1["Actor"]
143143 end
144-
144+
145145 Code --> Route
146146 Code --> CallOne
147147 Code --> Fanout
148-
148+
149149 Route --> R2
150150 CallOne --> A1
151151 Fanout --> R1
152152 Fanout --> R2
153153 Fanout --> R3
154-
154+
155155 style Route fill:#4CAF50
156156 style CallOne fill:#FF9800
157157 style Fanout fill:#9C27B0
@@ -266,7 +266,7 @@ counter_service = await ForgeCounter.options(
266266
267267# WITHOUT SESSIONS: Each .route() call goes to a different replica
268268await counter_service.increment.route() # Might go to replica 2
269- await counter_service.increment.route() # Might go to replica 1
269+ await counter_service.increment.route() # Might go to replica 1
270270await counter_service.increment.route() # Might go to replica 3
271271
272272results = await counter_service.increment.fanout() # Get from all replicas
@@ -282,7 +282,7 @@ print("\nUsing sticky sessions:")
282282async with counter_service.session(): # Creates a session that picks one replica
283283 await counter_service.reset.route() # Uses .route() within session
284284 print (await counter_service.increment.route()) # 1
285- print (await counter_service.increment.route()) # 2
285+ print (await counter_service.increment.route()) # 2
286286 print (await counter_service.increment.route()) # 3
287287
288288 final_value = await counter_service.get_value.route()
0 commit comments