[Project] Distribuited Objects: i am starting...

Tansel Ersavas tansel at rase.com
Tue Feb 15 09:56:47 UTC 2000


Hello Piero,

I am working on a simple RMI almost about to finish which is along the lines you are talking about. At this moment marshalling and demarshalling is done by storeOn: etc. but this can be changed trivially to a better mechanism such as image segments. storeOn: has its limitations so it has to be bettered some time. What I am working on is not exactly complete yet but I can send you whatever I have done to get some feedback if it would be of any use.

At this moment I am using TCP just because to my knowledge UDP is still not available on the Mac.

BTW with FFI direct link to things like sockets libraries is possible but should we spend some time in giving some more flexibility to network support? For instance I wanted to use TinyTP built on top of the IrDA but this requires a VM change. This would be cute as we could have games developed for multiple PDAs interacting via their IrDA ports. And, yes I know about the serial port access to IrDA but this is much more flexible. (ref : http://www.microsoft.com/hwdev/infrared/IrDAapps.htm or http://www,irda.org). 
Squeak could be an excellent tool to write some low level network stuff as well (such as traceroute, even a visual one) if one could assemble and send raw sockets a.k.a. traceroute. If these things are not a priority for other people I'll experiment with the new FFI stuff. 

Piero Campanelli wrote:
> 
> Hi squeakers.
> 
> I am working on my Master Thesis in Comp. Sci. using Squeak. I am
> implementing a framework where there are some objects distribuited who need
> to comunicate. In this project, life is easy because interfaces of objects
> are fixed, so i can insert the code doing communication in TCP/UDP by hand.
> 
> However I'd like to extend this project making a sort of Remote Method
> Invocation for Squeak (a la RMI for Java).
> 
> These are my incomplete (and just starting thoughts):
> 
> * Objects are passed by value (in RMI they are passed instead by ref). I
> think i can marshall it using: Object>>storeOn: and Object class>>readFrom:

Yup, that's almost how I handle it at the moment
 
> * I am unsure if for communication is better UDP or TCP. Probably
> parametrizing it is better....but I think UDP with retries is much better.

See above, I use TCP, although it has an overhead.
 
> * I think this pattern:
> 
>         suppose a client object has a reference to the remote object.
>         Every time it invokes a method, a connection with the remote
>         object is done, arguments are passed and client wait until return.
>         Is this costly (i mean the fact that at every invocation a communication
>         is setup).
> 
> * What kind of facilities could i use to create stub and skeletons. I need
> to create classes and fills methods using code. What part of the system i
> need to study to do this ?

I am using a publish: mechanism for objects that need to be accessed from outside of the image and proxies for the stubs. That's just my preference though. I am not looking to make it compatible with Java RMI stuff even in terminology. 
 
Proxies can easily be done by using the ProtoObjects, but debugging them is a bit of a pain. 

> Any reply is appreciated...
> Bye

Cheers

Tansel





More information about the Squeak-dev mailing list