… | |
… | |
276 | seeds without any issues. You could even specify all nodes as seeds for |
276 | seeds without any issues. You could even specify all nodes as seeds for |
277 | all nodes, for total redundancy. But the common case is to have some more |
277 | all nodes, for total redundancy. But the common case is to have some more |
278 | or less central, stable servers running seed services for other nodes. |
278 | or less central, stable servers running seed services for other nodes. |
279 | |
279 | |
280 | All you need to do to ensure that an AnyEvent::MP network connects |
280 | All you need to do to ensure that an AnyEvent::MP network connects |
281 | together is to make sure that all connections from nodes to their seed |
281 | together is to make sure that all seed nodes are connected together via |
282 | nodes I<somehow> span the whole network. The simplest way to do that would |
282 | their seed connections, i.e., all connections from seed nodes to I<their> |
283 | be for all nodes to specify a single node as seed node, and you would get |
283 | seed nodes form a connected graph. It's not necessary (but common) for a |
284 | a star topology. If you specify all nodes as seed nodes, you get a fully |
284 | seed node to list all other seed nodes as seeds. The rest of the nodes in |
285 | meshed network (that's what previous releases of AnyEvent::MP actually |
285 | the network simply specify one or more of the seed nodes in their seed |
286 | did). |
286 | list. |
|
|
287 | |
|
|
288 | The simplest way to do that would be for all nodes to specify a single |
|
|
289 | node as seed node, and you would get a star topology. If you specify all |
|
|
290 | nodes as seed nodes, you get a fully meshed network (that's what previous |
|
|
291 | releases of AnyEvent::MP actually did). |
287 | |
292 | |
288 | A node tries to keep connections open to all of it's seed nodes at all |
293 | A node tries to keep connections open to all of it's seed nodes at all |
289 | times, while other connections are made on demand only. |
294 | times, while other connections are made on demand only. |
290 | |
295 | |
291 | All of this ensures that the network stays one network - even if all the |
296 | All of this ensures that the network stays one network - even if all the |
292 | nodes in one half of the net are separated from the nodes in the other |
297 | nodes in one half of the net are separated from the nodes in the other |
293 | half by some network problem, once that is over, they will eventually |
298 | half by some network problem, once that is over, they will eventually |
294 | become a single network again. |
299 | become a single network again. |
295 | |
300 | |
296 | In addition to creating the network, a node also expects the seed nodes to |
301 | In addition to creating the network, a node also expects the seed nodes to |
297 | run the shared database service - if need be, by automatically starting it, |
302 | run the shared database service - if need be, by automatically starting |
298 | so you don't normally need to configure this explicitly. |
303 | it, so you don't normally need to configure this explicitly. |
299 | |
304 | |
300 | #TODO# later?#d# |
|
|
301 | The process of joining a network takes time, during which the node |
305 | The process of joining a network takes time, during which the node |
302 | is already running. This means it takes time until the node is |
306 | is already running. This means it takes time until the node is |
303 | fully connected, and information about services in the network are |
307 | fully connected, and information about services in the network are |
304 | available. This is why most AnyEvent::MP programs start by waiting a while |
308 | available. This is why most AnyEvent::MP programs either just register |
305 | until the information they need is available. |
309 | themselves in the database and wait to be "found" by others, or they start |
|
|
310 | to monitor the database until some nodes of the required type show up. |
306 | |
311 | |
307 | We will see how this is done later, in the sender program. |
312 | We will see how this is done later, in the sender program. |
308 | |
313 | |
309 | =head3 Registering the Receiver |
314 | =head3 Registering the Receiver |
310 | |
315 | |