Archived

This forum has been archived. Please start a new discussion on GitHub.

Facets

Hi,

In our project we are planning to use the facet concept. In the readme file you mentioned a major redisign of facets in an upcoming version of Ice.
We want to estimate the risk for our project concerning that redesign.
Will the redesign reflect only on the internal implementation or will also the interface or facet concept be changed?
For now we follow the rules stated in the readme file. Can you give an indication of the effort we must make to adapt the new facet implementation?

regards,
Emko van Dam

Comments

  • marc
    marc Florida
    The interface to facets will be changed.

    First, facets will be flat, not hierarchical, so the facet path will be replaced with a simple facet name. This will be reflected in all interfaces that use the facet path.

    Plain objects (i.e., instances of a class or interface, as opposed to "Ice objects") will not have facets anymore, i.e., there will be no active facet map anymore in Ice::Object. Only the abstract concept of Ice objects will have facets, i.e., you can register a servant for a facet of an Ice object with the object adapter's active servant map, or you can use a servant locator.

    The reason for why we are doing these changes are:
    1. Simplicity: Currently facets are too complicated.
    2. No Aggregation: Some projects (most notably the large-scale project "Wish") used facets as a built-in aggregation mechanism. At first glance, this seemed like a convenient way to atomically save a collection of objects with Freeze. But at closer look this meant a huge additional burden with respect to performance.
    The original intent of facets is to offer multiple interfaces with interface aggregation, to extend a type dynamically. With the current system with the active facet map residing in Ice::Object, this is unfortunately often misused for aggregation of otherwise unrelated types.