Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Internet Communications Engine (Ice)

Similar presentations


Presentation on theme: "The Internet Communications Engine (Ice)"— Presentation transcript:

1 The Internet Communications Engine (Ice)
ZeroC’s object-oriented distributed middleware platform Presented by Michael Borosh UChicago MPCS QuickTalk

2 The Internet Communications Engine (Ice)
Core product of ZeroC (small private company based in Jupiter, FL; founded in 2002; partial client list above) Available under GPL and commercial license

3 Context: CORBA Common Object Request Broker Architecture (CORBA)—middleware that enables communication between software components (which can be written in multiple computer languages and running on multiple computers). Broker design pattern (distributed system with decoupled components interacting by remote service invocations). Standard, defined by the Object Management Group (OMG, also associated with UML) Provides RPC invocation through a middle layer called the ORB Interface Definition Language (IDL)—mapping to Ada, C, C++, C++11, Lisp, Ruby, Smalltalk, Java, COBOL, PL/I, Java Michi Henning Essay: The Rise and Fall of Corba (

4 How Ice Differs From CORBA
No “Design By Committee” Specification Language for Ice (SLICE) vs IDL Language Mappings: C++, Java, Python, Ruby, PHP, .NET Working with databases: SLICE can describe the state of persistent Ice objects Working with C++: C++ Mapping Based on STL No “Any” Type (something extensively used in CORBA) Asynchronous Message Invocation (supported by few CORBA products) Partial list. Source:

5 Ice Advantages Disadvantages
Performance ( Ease of use Forums/Support Documentation Disadvantages Lack of standardization Price

6 Ice Features IceStorm—service to efficiently distribute messages that have one source but many destinations (pub-sub); event subscriptions can be made persistent and there are tools for managing dysfunctional clients IceFIX—integrates the FIX protocol into Ice (

7 Installation—Ice 3.5.1 Download at: http://zeroc.com/download.html
Working with AWS ec2, I installed on Ubuntu and with minimal success before trying Red Hat Enterprise Linux 6, which I can recommend Note: uses Third-Party Frameworks including Qt that have to be compatibly installed and configured. Also, I had to separately install php-zeroc-ice package. Nice ZeroC supplied Demo—Chat Application (

8 Chat Demo: Requirements
Client/Server architecture (clients are active entities that send requests while servers are passive entities that respond to requests) Minimal or no server administration Traffic between client/server must be secure Must work with firewalls Clients may be implemented in various languages Minimal network traffic as clients may have bandwidth constraints Source:

9 Chat Demo: Push Model Push Model: Reversal of normal roles. Clients provide an Ice object with an operation that the chat server invokes (asynchronously) to deliver messages to clients. // Slice module Chat { interface ChatRoomCallback // Implemented by clients void init(Ice::StringSeq users); //server invokes init when client first connects to the chat room, users informs clients of currently connected users void join(long timestamp, string name); void leave(long timestamp, string name); void send(long timestamp, string name, string message); //server invokes send when a client sends a message }; Source:

10 Chat Demo: Glacier2 Router
Bidirectional connections—allows requests to flow in both directions, without regard to which side opened the connection. Server can invoke methods without having to open up a new connection from server to client. Source:

11 Glacier2::SessionPrx ChatSessionManagerI::create( const string& name, const Glacier2::SessionControlPrx& sessionControl, const Ice::Current& c) { string vname; try { vname = validateName(name); _chatRoom->reserve(vname); } … Glacier2::SessionPrx proxy; ChatSessionIPtr session = new ChatSessionI(_chatRoom, vname, _trace, _logger); proxy = Glacier2::SessionPrx::uncheckedCast( c.adapter -> addWithUUID(session)); Ice::IdentitySeq ids; ids.push_back(proxy->ice_getIdentity()); sessionControl->identities()->add(ids); if(_trace) { ostringstream os; os<< "Push session created for user '" << vname << "'."; _logger->trace("info", os.str()); } return proxy; } Session example

12 Code Sample Ice::Long Send Example
ChatRoom::send(const string& name, const string& message) { IceUtil::Mutex::Lock sync(_mutex); IceUtil::Int64 timestamp = IceUtil::Time::now().toMilliSeconds(); PollingChat::MessageEventPtr e = new PollingChat::MessageEvent(timestamp, name, message); for(ChatRoomCallbackMap::iterator q = _members.begin(); q != _members.end(); ++q) q->second->send(e); } if(_trace) ostringstream os; os << "User '" << name << "' sent a message to the chat room."; _logger->trace("info", os.str()); return timestamp; Send Example Code Sample Source::

13 Overall Architecture

14 Training / Resources Documentation
Manual [3000+ Pages] ( Training ( C++ Deck [300+ Slides] ( C++ Student Workbook [400+ Slides] ( Chat Demo Source ( Technical Articles (

15 Questions?


Download ppt "The Internet Communications Engine (Ice)"

Similar presentations


Ads by Google