What is it?

Ice2Rest is an addon to the ZeroC Ice middleware ver. 3.4.2 that implement an http gateway to expose ice servants to Web clients throught a RESTful web API. It's composed by a slice compiler, plugins compilation environment, a webserver and a fastcgi adapter.

The Slice compiler

The Slice Compiler produces source files and CMake Makefiles to be compiled producing Ice2Rest plugins.

The Plugins compilation environment

Plugins compilation need an environment composed by few header files provided by the Ice2Rest package that contains also the WebServer and the FastCgi adapter.

The Web Server

The webserver dynamically load Ice2Rest plugins exposing all the interfaces, data types and exception defined in the slice file from which plugins were generated, using json format. A FastCgi adapter is also provided to let Ice2Rest plugins to be used with common web servers like Lighttpd and Apache Web Server.

The Rest API

In the diagram above, a web client send a request for the Demo::Service::echo Ice method to be called on the Wellknow Ice object "theObject". The method Demo::Service::echo requires a string parameter named "s" that is passed by the web client as json content. The Proxy indicating the Ice Object to be contacted can be any kind of stringified Proxy (direct, indirect,...) and must be urlencoded before to be sent in the query string.