ICE Manual(Documentation for Ice 3.5)---The Ice Protocol(Overview)

来源:互联网 发布:软件著作权代办 广东 编辑:程序博客网 时间:2024/05/19 22:47

Ice provides an RPC protocol that can use either TCP/IP or UDP as an underlying transport. In addition, Ice also allows you to use SSL as a transport, so all communication between client and server is encrypted.

The Ice protocol defines:

  • a number of message types, such as request and reply message types,
  • a protocol state machine that determines in what sequence different message types are exchanged by client and server, together with the associated connection establishment and tear-down semantics for TCP/IP,
  • encoding rules that determine how each type of data is represented on the wire,
  • a header for each message type that contains details such as the message type, the message size, and the protocol and encoding version in use.

Ice also supports compression on the wire: by setting a configuration parameter, you can arrange for all network traffic to be compressed to conserve bandwidth. This is useful if your application exchanges large amounts of data between client and server.

The Ice protocol is suitable for building highly-efficient event forwarding mechanisms because it permits forwarding of a message without knowledge of the details of the information inside a message. This means that messaging switches need not do any unmarshaling and remarshaling of messages — they can forward a message by simply treating it as an opaque buffer of bytes.

The Ice protocol also supports bidirectional operation: if a server wants to send a message to a callback object provided by the client, the callback can be made over the connection that was originally created by the client. This feature is especially important when the client is behind a firewall that permits outgoing connections, but not incoming connections.


The Ice protocol definition consists of three major parts:

  • a set of data encoding rules that determine how the various data types are serialized(一组数据编码规则,确定各种数据类型的序列化方式)
  • a number of message types that are interchanged between client and server, together with rules as to what message is to be sent under what circumstances(一些消息类型,在客户和服务器之间进行交换;还有一些规则,确定在何种情况下要发送何种消息)
  • a set of rules that determine how client and server agree on a particular protocol and encoding version。(一组规则,确定客户与服务器怎样就特定的协议和编码版本达成一致)
原创粉丝点击