BOSS without writing to files 
Author Message
 BOSS without writing to files

Has anyone used BOSS (VisualWorks 2.0) without writing to files.
I'm interested in shipping object structures through sockets but
I don't want to be required to use a file to do so.  Memory is
much faster!!

Many Thanks

- --J



Mon, 14 Jul 1997 09:23:36 GMT  
 BOSS without writing to files

Quote:

>   Path: madiran!julienas!news2.EUnet.fr!EU.net!howland.reston.ans.net!ix.netcom.com!netcom.com!jjustus

>   Newsgroups: comp.lang.Smalltalk
>   Date: 26 Jan 95 01:23:36 GMT

>   Organization: NETCOM On-line Communication Services (408 261-4700 guest)
>   Lines: 8

>   Has anyone used BOSS (VisualWorks 2.0) without writing to files.
>   I'm interested in shipping object structures through sockets but
>   I don't want to be required to use a file to do so.  Memory is
>   much faster!!

>   Many Thanks

>   - --J

I have used BOSS to send objects through the network with RPC (Remote Procedure Call) which uses sockets :
if 'socket' is your socket you may build a stream from a connection of the socket :
|connection stream |

        connection :ExternalReadAppendStreamExternalReadAppendStream= ExternalConnection new.
        connection input: socket; output: socket.
        stream := ExternalReadAppendStream on: connection

then you can use the stream with BOSS :
if 'o' is your BOSSable object :

        (BinaryObjectStorage onNew: stream) nextPut: o; close

Of course there has to be an object at the other side of the socket,
listening and ready to rebuild the object with BOSS.

Francis Wolinski
Informatique CDC
Bagneux - France
33-1 46 63 94 03



Mon, 14 Jul 1997 17:27:21 GMT  
 BOSS without writing to files

Quote:
>Has anyone used BOSS (VisualWorks 2.0) without writing to files.
>I'm interested in shipping object structures through sockets but
>I don't want to be required to use a file to do so.  Memory is
>much faster!!

I did this with ST80 4.x and VW 1.0.  I'd expect it to work with VW 2.0, too.

Just open a BOSS stream on the socket stream.  Don't expect BOSS to be much
faster on sockets, though.

-dms



Tue, 15 Jul 1997 12:12:04 GMT  
 BOSS without writing to files

Quote:

> Has anyone used BOSS (VisualWorks 2.0) without writing to files.
> I'm interested in shipping object structures through sockets but
> I don't want to be required to use a file to do so.  Memory is
> much faster!!

Try this in for instance a workspace:

| boss o  bytes  bossIn object  |
        "Construct an arbitrary object"
        o := OrderedCollection new.
        100 timesRepeat: [o add: Random new next].

        "create a fresh local boss object"
        boss := BinaryObjectStorage onNew: (bytes := ByteArray new: 1000) writeStream.

        "put the object on this byte array"
        boss nextPut: o.
        boss close.

        "create a boss object  on the byte stream"
        bossIn := BinaryObjectStorage onOldNoScan: bytes readStream.

        "read object"
        object := bossIn next.
        bossIn close.

        "inspect the result"
        object inspect

------------------
If you use a socket then you perhaps also want to add some
info about the length of the bytes that constitutes the
byte array of the bossed package.
But that is trivial!

Regards,

Bjorn Eiderback

---

   THE ROYAL INSTITUTE OF TECHNOLOGY     voice: +46 (8) 790 6277
   Department of Numerical Analysis      fax: +46 (8) 102477, 7900930
   and Computing Science
   Osquars backe 2
   S-100 44 Stockholm
   Sweden



Wed, 16 Jul 1997 01:14:16 GMT  
 BOSS without writing to files

Quote:

>>   Path: madiran!julienas!news2.EUnet.fr!EU.net!howland.reston.ans.net!ix.netcom.com!netcom.com!jjustus

>>   Newsgroups: comp.lang.smalltalk
>>   Date: 26 Jan 95 01:23:36 GMT

>>   Organization: NETCOM On-line Communication Services (408 261-4700 guest)
>>   Lines: 8

>>   Has anyone used BOSS (VisualWorks 2.0) without writing to files.
>>   I'm interested in shipping object structures through sockets but
>>   I don't want to be required to use a file to do so.  Memory is
>>   much faster!!

>>   Many Thanks

>>   - --J

There was a very complete article in the nov-dec 94 issue of "The Smalltalk
Report" which describes just this.

mike.

*********************************************
Mike Christiansen

*********************************************



Thu, 17 Jul 1997 18:24:06 GMT  
 BOSS without writing to files

Quote:


writes:

>>Has anyone used BOSS (VisualWorks 2.0) without writing to files.
>>I'm interested in shipping object structures through sockets but
>>I don't want to be required to use a file to do so.  Memory is
>>much faster!!

The October 1994 Smalltalk Report talked a lot about BOSS and had a good
implementation of using BOSS and sockets. It was for VW1.0, but the only
change required was to replace UnixSocketAccessor with the VW 2.0
SocketAccessor.

I have used this as the basis for broadcasting changed objects to client
workstations. This, however, is really an interim solution. We are
looking at CORBA to solve the distributed object problem.

Sherman



Sat, 19 Jul 1997 05:21:47 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. VW: BOSS read/write XWD files?

2. Write to 2 file from pipe without using temp file

3. Writing two equal files without creating two files in dct

4. Writing binary data to a file without carriage returns every 512 bytes

5. help with writing to a sequential file without suppress all my spaces

6. Writing seq files without crlf

7. Error reading BOSS files.

8. load a 1.0 version Boss file in an image 2.0

9. Substitution of BOSS file in VW5i.3

10. Encoding or Encrypting BOSS Files

11. Encoding or Encrypting BOSS Files

12. BOSS Files - Help Needed

 

 
Powered by phpBB® Forum Software