2. Introduction
Ice is an object-oriented middleware platform.
Fundamentally, this means that Ice provides tools, APIs,
and library support for building object-oriented client–
server applications. Ice applications are suitable for use
in heterogeneous environments: client and server can
be written in different programming languages, can
run on different operating systems and machine
architectures, and can communicate using a variety of
networking technologies. The source code for these
applications is portable regardless of the deployment
environment.
3. Terminology
• Clients and Servers
• Ice Objects
– An Ice object is an entity in the local or a remote address space
that can respond to client requests.
– If an object has multiple simultaneous instantiations, it is still a
single Ice object.
– Each Ice object has one or more interfaces. Clients issue
requests by invoking operations.
– Each Ice object has a unique object identity(ID/UUID).
4. Terminology
• Proxies
– 1. Locates the Ice object
– 2. Activates the Ice object’s server if it is not running
– 3. Activates the Ice object within the server
– 4. Transmits any in-parameters to the Ice object
– 5. Waits for the operation to complete
– 6. Returns any out-parameters and the return value
to the client (or throws an exception in case of an
error)
5. Terminology
• Proxy: Direct ,Indirect ,Fixed Proxies
• Servants
– In practice, a servant is simply an instance of a class
that is written by the server developer and that is
registered with the server-side run time as the
servant for one or more Ice objects.
• At-Most-Once Semantics
– retries are attempted only if it is known that a
previous attempt definitely failed. This semantics
guarantee that operations that are not idempotent
can be used safely
6. • Synchronous Method Invocation
• Asynchronous Method Invocation
• (Batched)Oneway Method Invocation
– Thread-Per-Message
– TCP/IP or SSL
• (Batched)Datagram Invocations
– A datagram invocation uses UDP to invoke the
operation.
9. Ice Protocol
• Ice provides an RPC protocol that can use
either TCP/IP or UDP as transport. In addition,
Ice also allows you to use SSL as a transport.
– message types
– protocol state machine
– encoding rules that determine how each type of data is
represented on the wire
– header for each message type
15. • AMI
– At client
• AMD
– At Server(same as AMI)
16. User AMI and AMD
["ami"] interface I {
bool isValid();
float computeRate();
};
interface J {
["amd"] void startProcess();
["ami", "amd"] int endProcess();
};
18. ICE protocol
• Sequences:[size,{a,b,c…}]
• Dictionaries:[size,{struct, struct, struct…}]
• Enumerators
– [1 – 127]byte.
– [128 - 32767]short
– [>32767]int
– The value is the ordinal value of the orresponding
enumerator, with the first enumerator value
encoded as zero.
• Structures
19. ICE protocol
Exceptions
exception Base {
int baseInt;
string baseString;
};
exception Derived extends Base {
bool derivedBool;
string derivedString;
double derivedDouble;
};
21. ICE Protocol
• Data Encoding
– Sizes
– Encapsulations
– Slice:
• To allow the receiver of an exception or class to ignore
those parts of a value that it does not understand,
exception and class values are marshaled as a sequence of
slices
– Types
22. ICE Protocol
• Protocol Messages Types
– Request (from client to server)
– Batch request (from client to server)
– Reply (from server to client)
– Validate connection (from server to client)
– Close connection (client to server or server to client)
26. ICE Protocol
• Validate Connection Message
A server sends a validate connection message
when it receives a new connection The message
indicates that the server is ready to receive
requests; the client must not send any
messages on the connection until it has
received the validate connection message from
the server.
• Close Connection Message
27. ICE Protocol
• Compression
– Compression may not be supported on all platforms
or in all language mappings.
– Compression can be used in a request or batch
request only if the endpoint advertises the ability to
accept compressed messages
– For efficiency reasons, the Ice protocol engine does
not compress messages smaller than 100 bytes.
32. IceGrid-
Registry Replication
1. The slave replica contacts the master replica at startup and synchronizes
its databases. Any subsequent modifications to the deployed applications
are made via the master replica, which distributes them to all active
slaves.
2. The nodes contact the master replica at startup to notify it about their
avail-ability.
3. The master replica provides a list of slave replicas to the nodes so that the
nodes can also notify the slaves.
4. The client’s configuration determines which replica it contacts initially.
5. In the case of a failure, the client automatically fails over to the slave. If
the master registry’s host has failed, then Node1 and any servers that
were active on this host also become unavailable. The use of object
adapter replication (see Section 38.9) allows the client to transparently
reestablish communication with a server on Node2.