Hi,accumulate thousands of instances that are not used but are not eliminated because they are referenced by those attributes. Eventually, at some point the apps go down. I am doing something wrong? I would appreciate if you can tell me if I should change
I have 2 applications written in Dolphin SmallTalk 7.1.14 communicated by socket.
To send data I use the following object:
(STBOutFiler on: socket writeStream) that stays alive during all communication.
To receive data I use the following object:
((STBValidatingInFiler on: socket readStream)
validationBlock: [: className | true];
yourself)
which also stays alive throughout the connection.
The problem is that applications can be connected for hours and objects are being sent all the time. The STBFiler objects have writeMap and readMap attributes respectively, which record all the objects that are received or sent, which causes them to
Greetings and thank you very much.
Hi Pablo,maintaining the identity of the object and thus the consistency of the overall object graph.
STB uses the writeMap and readMap to remember objects that have already been written/read. This ensures each object is only sent once, and that repeated writes of the same object on the sending side result in the exact same object on the receiving end,
It sounds as if you're more interested in sending individual packets of objects than an overall graph of objects that persists for the lifetime of your application. If this is the case I'd suggest creating a new STBOutFiler and STBInFiler for eachwrite and read - something like this:
"Write"accumulate thousands of instances that are not used but are not eliminated because they are referenced by those attributes. Eventually, at some point the apps go down. I am doing something wrong? I would appreciate if you can tell me if I should change
(STBOutFiler on: socket writeStream) nextPut: objectToSend
"Read"
((STBValidatingInFiler on: socket readStream)
validationBlock: [: className | true];
yourself) next
Hope this helps.
John
On Thursday, November 5, 2020 at 3:31:28 AM UTC, Pablo Javier Mur wrote:
Hi,
I have 2 applications written in Dolphin SmallTalk 7.1.14 communicated by socket.
To send data I use the following object:
(STBOutFiler on: socket writeStream) that stays alive during all communication.
To receive data I use the following object:
((STBValidatingInFiler on: socket readStream)
validationBlock: [: className | true];
yourself)
which also stays alive throughout the connection.
The problem is that applications can be connected for hours and objects are being sent all the time. The STBFiler objects have writeMap and readMap attributes respectively, which record all the objects that are received or sent, which causes them to
Greetings and thank you very much.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 78:30:53 |
Calls: | 6,658 |
Calls today: | 4 |
Files: | 12,203 |
Messages: | 5,332,975 |
Posted today: | 1 |