Table of Contents Chapter 1 Introduction 1.1 The Internet Communications Engine (Ice) 1.2 Organization 1.3 Typographical Conventions 1.4 Source Code Examples 1.5 Contacting the Authors 1.6 Ice Support Chapter 2 Ice Overview 2.1 Chapter Overview 2.2 The Ice Architecture 2.3 Ice Services 2.4 Architectural Benefits of Ice Chapter 3 A Hello World Application 3.1 Chapter Overview 3.2 Writing a Slice Definition 3.3 Writing an Ice Application with C++ 3.4 Writing an Ice Application with Java 3.5 Writing an Ice Application with C# 3.6 Writing an Ice Application with Visual Basic 3.7 Writing an Ice Application with Objective‑C 3.8 Writing an Ice Application with Python 3.9 Writing an Ice Application with Ruby 3.10 Writing an Ice Application with PHP 3.11 Summary Chapter 4 The Slice Language 4.1 Chapter Overview 4.2 Introduction 4.3 Compilation 4.4 Source Files 4.5 Lexical Rules 4.6 Modules 4.7 The Ice Module 4.8 Basic Slice Types 4.9 User-Defined Types 4.10 Interfaces, Operations, and Exceptions 4.11 Classes 4.12 Forward Declarations 4.13 Type IDs 4.14 Operations on Object 4.15 Local Types 4.16 Names and Scoping 4.17 Metadata 4.18 Serializable Objects 4.19 Deprecating Slice Definitions 4.20 Using the Slice Compilers 4.21 Slice Checksums 4.22 Generating Slice Documentation 4.23 Summary Chapter 5 Slice for a Simple File System 5.1 Chapter Overview 5.2 The File System Application 5.3 Slice Definitions for the File System 5.4 The Complete Definition Chapter 6 Client-Side Slice-to-C++ Mapping 6.1 Chapter Overview 6.2 Introduction 6.3 Mapping for Identifiers 6.4 Mapping for Modules 6.5 The Ice Namespace 6.6 Mapping for Simple Built-In Types 6.7 Mapping for User-Defined Types 6.8 Mapping for Constants 6.9 Mapping for Exceptions 6.10 Mapping for Run-Time Exceptions 6.11 Mapping for Interfaces 6.12 Mapping for Operations 6.13 Exception Handling 6.14 Mapping for Classes 6.15 Asynchronous Method Invocation (AMI) 6.16 slice2cpp Command-Line Options 6.17 Using Slice Checksums Chapter 7 Developing a File System Client in C++ 7.1 Chapter Overview 7.2 The C++ Client 7.3 Summary Chapter 8 Server-Side Slice-to-C++ Mapping 8.1 Chapter Overview 8.2 Introduction 8.3 The Server-Side main Function 8.4 Mapping for Interfaces 8.5 Parameter Passing 8.6 Raising Exceptions 8.7 Object Incarnation 8.8 Asynchronous Method Dispatch (AMD) 8.9 Summary Chapter 9 Developing a File System Server in C++ 9.1 Chapter Overview 9.2 Implementing a File System Server 9.3 Summary Chapter 10 Client-Side Slice-to-Java Mapping 10.1 Chapter Overview 10.2 Introduction 10.3 Mapping for Identifiers 10.4 Mapping for Modules 10.5 The Ice Package 10.6 Mapping for Simple Built-in Types 10.7 Mapping for User-Defined Types 10.8 Mapping for Constants 10.9 Mapping for Exceptions 10.10 Mapping for Run-Time Exceptions 10.11 Mapping for Interfaces 10.12 Mapping for Operations 10.13 Exception Handling 10.14 Mapping for Classes 10.15 Serializable Objects 10.16 Customizing the Java Mapping 10.17 Asynchronous Method Invocation (AMI) 10.18 Slice Compiler 10.19 Using Slice Checksums Chapter 11 Developing a File System Client in Java 11.1 Chapter Overview 11.2 The Java Client 11.3 Summary Chapter 12 Server-Side Slice-to-Java Mapping 12.1 Chapter Overview 12.2 Introduction 12.3 The Server-Side main Method 12.4 Mapping for Interfaces 12.5 Parameter Passing 12.6 Raising Exceptions 12.7 Tie Classes 12.8 Object Incarnation 12.9 Asynchronous Method Dispatch (AMD) 12.10 Summary Chapter 13 Developing a File System Server in Java 13.1 Chapter Overview 13.2 Implementing a File System Server 13.3 Summary Chapter 14 Client-Side Slice-to-C# Mapping 14.1 Chapter Overview 14.2 Introduction 14.3 Mapping for Identifiers 14.4 Mapping for Modules 14.5 The Ice Namespace 14.6 Mapping for Simple Built-in Types 14.7 Mapping for User-Defined Types 14.8 Mapping for Constants 14.9 Mapping for Exceptions 14.10 Mapping for Interfaces 14.11 Mapping for Operations 14.12 Exception Handling 14.13 Mapping for Classes 14.14 Serializable Objects 14.15 C#-Specific Metadata Directives 14.16 Asynchronous Method Invocation (AMI) 14.17 slice2cs Command-Line Options 14.18 Using Slice Checksums Chapter 15 Developing a File System Client in C# 15.1 Chapter Overview 15.2 The C# Client 15.3 Summary Chapter 16 Server-Side Slice-to-C# Mapping 16.1 Chapter Overview 16.2 Introduction 16.3 The Server-Side Main Method 16.4 Mapping for Interfaces 16.5 Parameter Passing 16.6 Raising Exceptions 16.7 Tie Classes 16.8 Object Incarnation 16.9 Asynchronous Method Dispatch (AMD) 16.10 Summary Chapter 17 Developing a File System Server in C# 17.1 Chapter Overview 17.2 Implementing a File System Server 17.3 Summary Chapter 18 Client-Side Slice-to-Objective-C Mapping 18.1 Chapter Overview 18.2 Introduction 18.3 Mapping for Modules 18.4 The ICE Prefix 18.5 Mapping for Identifiers 18.6 Internal Identifiers 18.7 Mapping for Built-In Types 18.8 Mapping for User-Defined Types 18.9 Mapping for Constants 18.10 Mapping for Exceptions 18.11 Mapping for Interfaces 18.12 Mapping for Operations 18.13 Exception Handling 18.14 Mapping for Local Interfaces 18.15 Mapping for Classes 18.16 Interfaces by Value 18.17 Asynchronous Method Invocation (AMI) 18.18 slice2objc Command-Line Options Chapter 19 Developing a File System Client in Objective‑C 19.1 Chapter Overview 19.2 The Objective‑C Client 19.3 Summary Chapter 20 Server-Side Slice-to-Objective‑C Mapping 20.1 Chapter Overview 20.2 Introduction 20.3 The Server-Side main Function 20.4 Mapping for Interfaces 20.5 Parameter Passing 20.6 Raising Exceptions 20.7 Object Incarnation 20.8 Summary Chapter 21 Developing a File System Server in Objective‑C 21.1 Chapter Overview 21.2 Implementing a File System Server 21.3 Summary Chapter 22 Client-Side Slice-to-Python Mapping 22.1 Chapter Overview 22.2 Introduction 22.3 Mapping for Identifiers 22.4 Mapping for Modules 22.5 The Ice Module 22.6 Mapping for Simple Built‑In Types 22.7 Mapping for User-Defined Types 22.8 Mapping for Constants 22.9 Mapping for Exceptions 22.10 Mapping for Run-Time Exceptions 22.11 Mapping for Interfaces 22.12 Mapping for Operations 22.13 Exception Handling 22.14 Mapping for Classes 22.15 Asynchronous Method Invocation (AMI) 22.16 Code Generation 22.17 Using Slice Checksums Chapter 23 Developing a File System Client in Python 23.1 Chapter Overview 23.2 The Python Client 23.3 Summary Chapter 24 Server-Side Slice-to-Python Mapping 24.1 Chapter Overview 24.2 Introduction 24.3 The Server-Side Main Program 24.4 Mapping for Interfaces 24.5 Parameter Passing 24.6 Raising Exceptions 24.7 Object Incarnation 24.8 Asynchronous Method Dispatch (AMD) 24.9 Summary Chapter 25 Developing a File System Server in Python 25.1 Chapter Overview 25.2 Implementing a File System Server 25.3 Thread Safety 25.4 Summary Chapter 26 Client-Side Slice-to-Ruby Mapping 26.1 Chapter Overview 26.2 Introduction 26.3 Mapping for Identifiers 26.4 Mapping for Modules 26.5 The Ice Module 26.6 Mapping for Simple Built‑In Types 26.7 Mapping for User-Defined Types 26.8 Mapping for Constants 26.9 Mapping for Exceptions 26.10 Mapping for Run-Time Exceptions 26.11 Mapping for Interfaces 26.12 Mapping for Operations 26.13 Exception Handling 26.14 Mapping for Classes 26.15 Code Generation 26.16 The main Program 26.17 Using Slice Checksums Chapter 27 Developing a File System Client in Ruby 27.1 Chapter Overview 27.2 The Ruby Client 27.3 Summary Chapter 28 Client-Side Slice-to-PHP Mapping 28.1 Chapter Overview 28.2 Introduction 28.3 Mapping for Identifiers 28.4 Mapping for Modules 28.5 The Ice Module 28.6 Mapping for Simple Built‑In Types 28.7 Mapping for User-Defined Types 28.8 Mapping for Constants 28.9 Mapping for Exceptions 28.10 Mapping for Run-Time Exceptions 28.11 Mapping for Interfaces 28.12 Mapping for Operations 28.13 Exception Handling 28.14 Mapping for Classes 28.15 slice2php Command-Line Options 28.16 Application Notes 28.17 Using Slice Checksums Chapter 29 Developing a File System Client in PHP 29.1 Chapter Overview 29.2 The PHP Client 29.3 Summary Chapter 30 Ice Properties and Configuration 30.1 Chapter Overview 30.2 Properties 30.3 Configuration Files 30.4 Setting Properties on the Command Line 30.5 Using Configuration Files 30.6 Alternate Property Stores 30.7 Command-Line Parsing and Initialization 30.8 The Ice.ProgramName property 30.9 Using Properties Programmatically 30.10 Unused Properties 30.11 Summary Chapter 31 Threads and Concurrency with C++ 31.1 Chapter Overview 31.2 Introduction 31.3 Library Overview 31.4 Mutexes 31.5 Recursive Mutexes 31.6 Monitors 31.7 Condition Variables 31.8 Threads 31.9 Priority Inversion 31.10 Portable Signal Handling 31.11 Summary Chapter 32 The Ice Run Time in Detail 32.1 Introduction 32.2 Communicators 32.3 Communicator Initialization 32.4 Object Adapters 32.5 Object Identity 32.6 The Ice::Current Object 32.7 Servant Locators 32.8 Default Servants 32.9 Server Implementation Techniques 32.10 The Ice Threading Model 32.11 Proxies 32.12 The Ice::Context Parameter 32.13 Connection Timeouts 32.14 Oneway Invocations 32.15 Datagram Invocations 32.16 Batched Invocations 32.17 Location Services 32.18 Administrative Facility 32.19 The Ice::Logger Interface 32.20 The Ice::Stats Interface 32.21 Location Transparency 32.22 Automatic Retries 32.23 Dispatch Interceptors 32.24 String Conversion 32.25 Developing a Plug‑In 32.26 Custom Class Loaders 32.27 Summary Chapter 33 Facets and Versioning 33.1 Introduction 33.2 Concept and APIs 33.3 The Versioning Problem 33.4 Versioning with Facets 33.5 Facet Selection 33.6 Behavioral Versioning 33.7 Design Considerations 33.8 Summary Chapter 34 Object Life Cycle 34.1 Chapter Overview 34.2 Introduction 34.3 Object Existence and Non-Existence 34.4 Life Cycle of Proxies, Servants, and Ice Objects 34.5 Object Creation 34.6 Object Destruction 34.7 Removing Cyclic Dependencies 34.8 Object Identity and Uniqueness 34.9 Object Life Cycle for the File System Application 34.10 Avoiding Server-Side Garbage 34.11 Summary Chapter 35 Dynamic Ice 35.1 Chapter Overview 35.2 Streaming Interface 35.3 Dynamic Invocation and Dispatch 35.4 Asynchronous Dynamic Invocation and Dispatch 35.5 Summary Chapter 36 Connection Management 36.1 Chapter Overview 36.2 Introduction 36.3 Connection Establishment 36.4 Active Connection Management 36.5 Obtaining a Connection 36.6 Connection Closure 36.7 Bidirectional Connections 36.8 Summary Chapter 37 The Ice Protocol 37.1 Chapter Overview 37.2 Data Encoding 37.3 Protocol Messages 37.4 Compression 37.5 Protocol and Encoding Versions Chapter 38 IceGrid 38.1 Chapter Overview 38.2 Introduction 38.3 IceGrid Architecture 38.4 Getting Started 38.5 Using Deployment 38.6 Well-known Objects 38.7 Templates 38.8 IceBox Integration 38.9 Object Adapter Replication 38.10 Load Balancing 38.11 Sessions 38.12 Registry Replication 38.13 Application Distribution 38.14 Administrative Sessions 38.15 Glacier2 Integration 38.16 Using an SQL Database 38.17 XML Reference 38.18 Variable and Parameter Semantics 38.19 Property Set Semantics 38.20 XML Features 38.21 Server Reference 38.22 Administrative Facility Integration 38.23 Securing IceGrid 38.24 Administrative Utilities 38.25 Server Activation 38.26 Solving Problems 38.27 Summary Chapter 39 Freeze 39.1 Chapter Overview 39.2 Introduction 39.3 Freeze Evictors 39.4 Using the Freeze Evictor in a File System Server 39.5 The Freeze Map 39.6 Using a Freeze Map in the File System Server 39.7 The Freeze Catalog 39.8 Backups 39.9 Summary Chapter 40 FreezeScript 40.1 Chapter Overview 40.2 Introduction 40.3 Database Migration 40.4 Transformation Descriptors 40.5 Using transformdb 40.6 Database Inspection 40.7 Using dumpdb 40.8 Descriptor Expression Language 40.9 Summary Chapter 41 IceSSL 41.1 Chapter Overview 41.2 Introduction 41.3 Using IceSSL 41.4 Configuring IceSSL 41.5 Programming with IceSSL 41.6 Advanced Topics 41.7 Setting up a Certificate Authority 41.8 Summary Chapter 42 Glacier2 42.1 Chapter Overview 42.2 Introduction 42.3 Using Glacier2 42.4 Callbacks 42.5 Helper Classes 42.6 Router Security 42.7 Session Management 42.8 Dynamic Filtering 42.9 Request Buffering 42.10 Request Contexts 42.11 Firewalls 42.12 Advanced Client Configurations 42.13 IceGrid Integration 42.14 Summary Chapter 43 IceBox 43.1 Chapter Overview 43.2 Introduction 43.3 Developing a Service 43.4 Starting IceBox 43.5 IceBox Administration 43.6 Summary Chapter 44 IceStorm 44.1 Chapter Overview 44.2 Introduction 44.3 Concepts 44.4 IceStorm Interface Overview 44.5 Using IceStorm 44.6 Publishing to a Specific Subscriber 44.7 Highly Available IceStorm 44.8 IceStorm Administration 44.9 Topic Federation 44.10 Quality of Service 44.11 Delivery Mode 44.12 Configuring IceStorm 44.13 Summary Chapter 45 IcePatch2 45.1 Chapter Overview 45.2 Introduction 45.3 Using icepatch2calc 45.4 Running the Server 45.5 Running the Client 45.6 Object Identities 45.7 The IcePatch2 Client Utility Library 45.8 Summary Appendix A Slice Keywords Appendix B Slice Metadata Directives B.1 General Metadata Directives B.2 Metadata Directives for C++ B.3 Metadata Directives for Java B.4 Metadata Directives for C# B.5 Metadata Directives for .NET and Mono B.6 Metadata Directives for Objective‑C B.7 Metadata Directives for Python B.8 Metadata Directives for Freeze Appendix C Slice API Reference Appendix D Properties D.1 Ice Configuration Property D.2 Ice Trace Properties D.3 Ice Warning Properties D.4 Ice Object Adapter Properties D.5 Ice Administrative Properties D.6 Ice Plug‑In Properties D.7 Ice Thread Pool Properties D.8 Ice Default and Override Properties D.9 Ice Proxy Properties D.10 Ice Transport Properties D.11 Ice Miscellaneous Properties D.12 IceSSL Properties D.13 IceBox Properties D.14 IceBoxAdmin Properties D.15 IceGrid Properties D.16 IceGrid Administrative Client Properties D.17 IceStorm Properties D.18 Glacier2 Properties D.19 Freeze Properties D.20 IcePatch2 Properties Appendix E Proxies and Endpoints E.1 Proxies E.2 Endpoints Appendix F The C++ Utility Library F.1 Introduction F.2 AbstractMutex F.3 Cache F.4 CtrlCHandler F.5 Exception F.6 generateUUID F.7 Handle Template F.8 Handle Template Adaptors F.9 ScopedArray F.10 Shared and SimpleShared F.11 Threads and Synchronization Primitives F.12 Time F.13 Timer and TimerTask F.14 Unicode and UTF‑8 Conversion Functions F.15 Version Information Appendix G The Java Utility Library G.1 Introduction G.2 The IceUtil Package G.3 The Ice.Util Class Appendix H Windows Services H.1 Introduction H.2 Installing a Windows Service H.3 The Ice Service Installer H.4 Manual Installation H.5 Troubleshooting Appendix I The .NET Utility Library I.1 Introduction I.2 Communicator Initialization Methods I.3 Identity Conversion I.4 Property Creation Methods I.5 Proxy Comparison Methods I.6 Stream Creation I.7 UUID Generation I.8 Version Information Appendix J Binary Distributions J.1 Introduction J.2 Developer Kits J.3 Guidelines Appendix K Deprecated AMI Mapping K.1 Chapter Overview K.2 Introduction K.3 Using AMI K.4 Language Mappings K.5 Summary Bibliography