Results 1 to 9 of 9

Thread: Ice-E with circular class references and lists of classes unsupported?

  1. #1
    ModEric is offline Registered User
    Name: Eric Gibbs
    Organization: Mod Systems, Inc.
    Project: linux kiosk talks to win server for media + data
    Join Date
    Oct 2008
    Posts
    5

    Exclamation Ice-E with circular class references and lists of classes unsupported?

    Hello,

    I'm very excited at the prospect of using Ice-E to replace some gsoap usage on a fairly large project. Unfortunately, I have an existing class set which has two characteristics which together, I'm afraid, make it impossible to model in Ice-E.

    First, it has sequences of objects. Ice-E doesn't support sequences of classes (b/c that would imply passing classes by value, in some subtle way), so I have to model everything as structs. That's too bad, since there is a lot of inheritance that now has to be modeled through has-a relationships instead of is-a relationships. That is, a sub-class will just contain an instance of its base class with some special naming convention to indicate it's really the base class.

    Second, I also have many circular class references. Since Slice doesn't allow declaring structs before implementation, this is not supported, and I'm out of luck.

    Is my only option to prune the class hierarchy (we're talking over 400 classes) to avoid circular references? Would it be terribly non-trivial to hack forward declarations into the mix, given that classes already support them (and the two cases seem awfully similar)? Am I missing something?

    Thanks very much,
    Eric

  2. #2
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Hi Eric,

    Why do you want to use Ice-E and not Ice for this project?

    Best regards,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  3. #3
    ModEric is offline Registered User
    Name: Eric Gibbs
    Organization: Mod Systems, Inc.
    Project: linux kiosk talks to win server for media + data
    Join Date
    Oct 2008
    Posts
    5
    I want Ice-E because the client is embedded on a smallish device. I do video playback, music playback, animations, etc, with limited RAM. If I can save a couple of MB by using Ice-E, then I really want to do that.

    Is the size difference between the embedded version and full-Ice insignificant?

    Thanks,
    Eric

  4. #4
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Hi Eric,

    Ice is very small, just not as small as Ice-E. Ice-E also offers various build-time configuration option to reduce its size.

    How much RAM do you have on these devices? If it's 128MB or more (like on an iPhone), I would start with Ice: I doubt it will use too much RAM.

    Best regards,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  5. #5
    ModEric is offline Registered User
    Name: Eric Gibbs
    Organization: Mod Systems, Inc.
    Project: linux kiosk talks to win server for media + data
    Join Date
    Oct 2008
    Posts
    5
    Bernard,

    Ok, I guess that's easier than trying to solve it with Ice-E, so it's worth a try. We do have something like 128MB, but then we try to do a few too many things with it, like push triple the pixels as an iPhone. I suppose if Ice is as fast as it is supposed to be, I can cache less to make up for code-size issues.

    Thanks for your help!
    Eric

  6. #6
    ModEric is offline Registered User
    Name: Eric Gibbs
    Organization: Mod Systems, Inc.
    Project: linux kiosk talks to win server for media + data
    Join Date
    Oct 2008
    Posts
    5

    Could one disable the "no sequences of classes" constraint of Ice-E?

    Hello Bernard,

    I've been trying to get full-Ice to build for my embedded platform, but the additional requirements (third party libraries especially) are somewhat onerous. I'll likely have to port some of the libraries, which is not my ideal scenario.

    All I really need to add to Ice-E is the ability to pass sequences of classes down to the client. I don't really understand why that relates to "passing classes by value" which was the reason for the limitation I saw posted elsewhere. Is there no way to pass lists of classes, other that sequences? Workarounds? All I can think is to model linked lists in Slice, but there's nothing like generic templates to work with, so that would be pretty ugly.

    My quandry is essentially:
    -a track is a media file (so we have inheritance, so it's a class)
    -there are more than one track in an album (so we pass a sequence of classes)
    ... and I'm sunk.

    I'll keep at trying to port full-Ice, but I'd really appreciate your input on this.

    Thanks again!
    Eric

  7. #7
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    Quote Originally Posted by ModEric View Post
    Hello Bernard,

    I've been trying to get full-Ice to build for my embedded platform, but the additional requirements (third party libraries especially) are somewhat onerous. I'll likely have to port some of the libraries, which is not my ideal scenario.
    ...
    What third party library? For plain jane Ice itself, especially if you cross compile, you don't need any third party library, other than bzip2. If you don't port bzip2, then you'll need to edit the Ice source to remove support for protocol compression. Additional features (which you probably do not need), such as SSL & Freeze requires porting additional libraries.

    My quandry is essentially:
    -a track is a media file (so we have inheritance, so it's a class)
    -there are more than one track in an album (so we pass a sequence of classes)
    ... and I'm sunk.
    What you send over the wire does not necessarily need to mirror your application classes. For example, you could model internally your data in terms of classes, but instead send structs over the wire (containing the application class data).

    Alternatively, if you want a version of Ice-E with additional features, you could sponsor these. Please contact us at sales@zeroc.com if you are interested.
    Last edited by matthew; 10-23-2008 at 09:24 AM.

  8. #8
    ModEric is offline Registered User
    Name: Eric Gibbs
    Organization: Mod Systems, Inc.
    Project: linux kiosk talks to win server for media + data
    Join Date
    Oct 2008
    Posts
    5
    Hi Matthew, thanks for the reply.

    "For plain jane Ice itself, especially if you cross compile, you don't need any third party library, other than bzip2."

    Are there any resources I can refer to in trying to cross compile a minimal build? I don't see any obvious config options, and my build system mastery is unfortunately incomplete.

    "...you could model internally your data in terms of classes, but instead send structs over the wire"

    I tried to massage the class hierarchy into a struct based system, but was ultimately stymied by circular struct references. Since I can't forward-declare structs (unlike classes), there is no ordering of the definitions that will prevent usage-before-definition. The only way forward there is to prune out cyclical references, but there are ~430 classes, many of which take part in circular reference relationships, so I am hesitant to dive in to that process.

    Perhaps that pruning is the best course, but I wanted to make sure I wasn't doing it for nothing.

    Thanks,
    Eric

  9. #9
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    Quote Originally Posted by ModEric View Post
    Hi Matthew, thanks for the reply.

    "For plain jane Ice itself, especially if you cross compile, you don't need any third party library, other than bzip2."

    Are there any resources I can refer to in trying to cross compile a minimal build? I don't see any obvious config options, and my build system mastery is unfortunately incomplete.
    Sorry, no there are no resources that I'm aware of. If you need assistance of a commercial nature you can contact us at sales@zeroc.com.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 10-16-2009, 06:51 PM
  2. Circular Includes
    By slypete in forum Help Center
    Replies: 3
    Last Post: 02-24-2009, 02:05 PM
  3. Replies: 4
    Last Post: 07-07-2008, 03:09 PM
  4. Circular #include possible?
    By mefoster in forum Help Center
    Replies: 1
    Last Post: 09-26-2006, 06:54 AM
  5. Base Class For Ref-Counted Classes?
    By acbell in forum Help Center
    Replies: 2
    Last Post: 03-06-2006, 05:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •