Python 7.0pl5 Manuale Utente Pagina 76

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 124
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 75
Message Exchange
76
When an application is distributed across multiple machines, it is often the case that even if one ma-
chine were to be shutdown, the processes on a different machine might be able to quite happily keep
operating so long as they could still communicate. To support this, a means of setting up a distributed
version of the message exchange server is provided.
In this arrangement, each machine has its own message exchange server, with each message exchange
server connected to all others. If a machine is now shutdown or connections to one machine lost, other
machines will still be able to communicate with processes on any machines which are still accessible.
That is, loss of the message exchange server on one machine will only directly impact that machine.
To setup a distributed exchange server, the message exchange server endpoint is created as before. The
difference is that as well as listening on a port for new connections, client like connections are created
to the other message exchange servers. The aim here is to effectively create a star connected network
between the message exchange servers. That is, each message exchange server has a connection to all
other message exchange servers.
port = 11111
exchange = Exchange(netsvc.EXCHANGE_SERVER)
exchange.listen(port)
delay = 5
for host in hosts:
exchange.connect(host,port,delay)
Note that since connections are bidirectional, it is not necessary for each message exchange server to
mutually connect to each other. That is, if you have two message exchange servers, it is only necessary
for one to connect to the other. In other words, the list of remote hosts in one would be empty, where
as the list of the remote hosts in the other would be the reciprocal host. If two message exchange serv-
ers do connect to each other, this will be detected and one connection will be ignored, however it
should be avoided.
Multiple Exchange Groups
When creating a service agent, the default service audience is "*", indicating that knowledge of the
service should be distributed as widely as possible. One alternative is to set the service audience to the
empty string, which will always result in the service only being visible within its own process. What
occurs for other values of the service audience property depends on the exchange group assigned to a
message exchange endpoint.
By default, the exchange group of a message exchange endpoint is empty, but may be set by an option-
al argument when initialising the class. A message exchange endpoint is only able to be connected to
a complimentary message exchange endpoint which is a member of the same group. That is, a message
exchange client endpoint can only connect to a message exchange server endpoint with the same ex-
change group.
Vedere la pagina 75
1 2 ... 71 72 73 74 75 76 77 78 79 80 81 ... 123 124

Commenti su questo manuale

Nessun commento

Cables Direct B6LZ-603K manuals

Owner’s manuals and user’s guides for Networking cables Cables Direct B6LZ-603K.
We providing 1 pdf manuals Cables Direct B6LZ-603K for download free by document types: Datasheet


Table of contents





More products and manuals for Networking cables Cables Direct

Models Document Type
XXURT-602 Datasheet   Cables Direct XXURT-602 networking cable, 1 pages
URT-603R Datasheet   Cables Direct URT-603R networking cable, 1 pages
B6LZ-603Y Datasheet   Cables Direct B6LZ-603Y networking cable, 1 pages
EUT-720 Datasheet   Cables Direct EUT-720 networking cable, 1 pages
B6-503R Datasheet   Cables Direct B6-503R networking cable, 1 pages
B6LZ-605 Datasheet   Cables Direct B6LZ-605 networking cable, 1 pages
B5-110W Datasheet   Cables Direct B5-110W networking cable, 1 pages
B6-510B Datasheet   Cables Direct B6-510B networking cable, 1 pages
URT-601.5R Datasheet   Cables Direct URT-601.5R networking cable, 1 pages
B6ST-710B Datasheet   Cables Direct B6ST-710B networking cable, 1 pages
XXURT-615R Datasheet   Cables Direct XXURT-615R networking cable, 1 pages
B6ST-701B Datasheet   Cables Direct B6ST-701B networking cable, 1 pages
URT-620K Datasheet   Cables Direct URT-620K networking cable, 1 pages
URT-601.5K Datasheet   Cables Direct URT-601.5K networking cable, 1 pages
B6LZ-603B Datasheet   Cables Direct B6LZ-603B networking cable, 1 pages
ERT-601-5G Datasheet   Cables Direct ERT-601-5G networking cable, 1 pages
RJEXT-03 Datasheet   Cables Direct RJEXT-03 networking cable, 1 pages
B6LZ-602B Datasheet   Cables Direct B6LZ-602B networking cable, 1 pages
B5-102B Datasheet   Cables Direct B5-102, 1 pages
URT-601V Datasheet   Cables Direct URT-601V networking cable, 1 pages