| |
| Posted by julianaubourg | PermalinkReply |
|
julianaubourg
| Hi all,
I'm pretty new to D and I admit I'm quite impressed by the way it's designed so far.
I'm thinking about developping a network oriented app and I'd like to go for a
java-like Remote interface system. Interestingly enough, with the in/out
parameter specifiers and the interface system, there is no need for a
third-party interface language like IDL in D. If you limit this system to
interfaces where only basic types are used as parameters or returned values,
there's no need for serialization (it's limited, but is still usable... exactly
like IDL is AFAIK).
If we don't go for a naming service right from the beginning, we could come up
with a pretty simple package:
template (InterfaceClass) {
void put(InterfaceClass * remoteObject, char [] address);
InterfaceClass * get(char [] address);
}
However, this raises some problems:
1) I dunno what the RTTI in D is capable of. Any doc?
2) "get" would need to:
a) check if the remote object at "address" defines all the methods defined by
"InterfaceClass"
b) create a local implementation of "InterfaceClass" that contains all the
network stuff. One could think of something like a method call overloading
system.
I guess most of the problems could be solved within the compiler (why not allow
for cast on Remote objects that would control if the destination object
implements all the methods needed and get rid of the pointers?). This would
prevent from using an IDL-like compiler (or rmic or alike) which given the D
syntax would be redundant.
Maybe D could come with an integrated ORB (like TAO for instance) and provide
naming services and all sort of fancy stuff.
I'm in a prospective process right now, so this post is for discussion purpose
and to know what the D team has in mind when it comes to distributed object
frameworks.
Another network related question is also about a strong url support so that
streams could be opened remotely without having to dig into the socket API.
Thanks for reading this and thanks for your work on D,
-- Julian
|