Archived

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

Implementing ICE on a different lay of transport, possible?

Hi all,
I have the following question. I would like to know which are the steps I should take to implement Ice on a different lay of transport, such serial connection or a CAN bus (similar to serial link). My aim is to stablish Ice connection between two machines, connected by serial link. I suppose I should take the same functions Ice uses to implement its connection. In some way, Ice, in its sources must specify when it connects a tcpendpoint how and where it connects, but I haven't found that functions in the src.
Any suggestion will be appreciate.

Thanks in advance!
and my congratulations for Ice implementers, for such a great tool!

Comments

  • marc
    marc Florida
    You could write a new transport plug-in, similar to the SSL plug-in. Unfortunately, we do not have any documentation for this. But you could study the source code of the SSL plug-in as an example, as well as the built-in TCP or UDP transports (which are much simpler than the SSL plug-in, and therefore easier to understand).
  • You could write a new transport plug-in, similar to the SSL plug-in.

    hehe, I hava try to build a project to support serial link. It's use the plugin mechanism.

    but when I found that the ThreadPool use 'select' function to process incoming sockets. I'am in anxious.

    I have studied all the Ice source code ,It's a impossible way to implement a trasport protocol without socket. isn't it? :confused:
  • marc
    marc Florida
    If you use the thread pool model, then you must have a select-able protocol. Under Linux or Unix, it doesn't have to be sockets. All reads and writes on file descriptors are select-able. Under Windows, I'm afraid you indeed can only use sockets.

    There is an alternative. You can use the thread-per-connection model, in which case the transport does not have to be select-able. You can use this model with Ice.ThreadPerConnection=1. For example, Glacier2 uses this model, to make sure that no malicious client can take away threads from other connected clients.
  • Unknown property
    If you use the thread pool model, then you must have a select-able protocol. Under Linux or Unix, it doesn't have to be sockets. All reads and writes on file descriptors are select-able. Under Windows, I'm afraid you indeed can only use sockets.

    Thanks,I'm working under Windows. :D
    You can use this model with Ice.ThreadPerConnection=1

    when I add the property in config file, run my client demo, a warning occur,

    warning: unknown property: Ice.ThreadPerConnection why?

    by the way,my Ice version is 1.5.1
  • marc
    marc Florida
    Thread per connection has been introduced with Ice 2.1.
  • Thank you!

    Thanks a lot! I will try to build my project with 2.1 .