Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

OK, enough hype. -- Larry Wall in the perl man page


programming / comp.lang.smalltalk.dolphin / Socket communication problem

SubjectAuthor
* Socket communication problemPablo Javier Mur
`* Re: Socket communication problemjohn.a...@gmail.com
 `- Re: Socket communication problemPablo Javier Mur

1
Subject: Socket communication problem
From: Pablo Javier Mur
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 5 Nov 2020 03:31 UTC
X-Received: by 2002:ac8:5191:: with SMTP id c17mr380309qtn.116.1604547087721;
Wed, 04 Nov 2020 19:31:27 -0800 (PST)
X-Received: by 2002:aca:5383:: with SMTP id h125mr353253oib.179.1604547087576;
Wed, 04 Nov 2020 19:31:27 -0800 (PST)
Path: i2pn2.org!rocksolid2!news.neodome.net!2.eu.feeder.erje.net!feeder.erje.net!ecngs!feeder2.ecngs.de!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!feeder1.cambriumusenet.nl!feed.tweak.nl!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Wed, 4 Nov 2020 19:31:27 -0800 (PST)
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=2800:810:505:8671:1d7a:ee59:1cff:3a05;
posting-account=emXZQgoAAADeQ6UQqgivjZ-qCMb6D0G9
NNTP-Posting-Host: 2800:810:505:8671:1d7a:ee59:1cff:3a05
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b79c917e-a994-47f2-9554-19ea23f22208n@googlegroups.com>
Subject: Socket communication problem
From: pjavie...@gmail.com (Pablo Javier Mur)
Injection-Date: Thu, 05 Nov 2020 03:31:27 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
View all headers
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 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 something so as not to accumulate items that should be disposed of.
Greetings and thank you very much.


Subject: Re: Socket communication problem
From: john.a...@gmail.com
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 5 Nov 2020 09:23 UTC
References: 1
X-Received: by 2002:a37:4043:: with SMTP id n64mr1208225qka.373.1604568183033;
Thu, 05 Nov 2020 01:23:03 -0800 (PST)
X-Received: by 2002:a9d:7cc6:: with SMTP id r6mr1048812otn.341.1604568182775;
Thu, 05 Nov 2020 01:23:02 -0800 (PST)
Path: i2pn2.org!i2pn.org!aioe.org!peer02.ams4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 5 Nov 2020 01:23:02 -0800 (PST)
In-Reply-To: <b79c917e-a994-47f2-9554-19ea23f22208n@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=85.203.70.180; posting-account=OQ6sIwoAAAC1iWrFEUhdmRsgEkeDOgOm
NNTP-Posting-Host: 85.203.70.180
References: <b79c917e-a994-47f2-9554-19ea23f22208n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a7b01931-6f5b-4f62-b5f5-0b1f846583c3n@googlegroups.com>
Subject: Re: Socket communication problem
From: john.asp...@gmail.com (john.a...@gmail.com)
Injection-Date: Thu, 05 Nov 2020 09:23:03 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3319
X-Received-Body-CRC: 2930684210
View all headers
Hi Pablo,

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, maintaining the identity of the object and thus the consistency of the overall object graph.

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 each write and read - something like this:

"Write"
(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 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 something so as not to accumulate items that should be disposed of.
Greetings and thank you very much.


Subject: Re: Socket communication problem
From: Pablo Javier Mur
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 5 Nov 2020 19:28 UTC
References: 1 2
X-Received: by 2002:ad4:5562:: with SMTP id w2mr3874414qvy.1.1604604501142;
Thu, 05 Nov 2020 11:28:21 -0800 (PST)
X-Received: by 2002:a05:6830:12c2:: with SMTP id a2mr2788835otq.162.1604604500362;
Thu, 05 Nov 2020 11:28:20 -0800 (PST)
Path: i2pn2.org!i2pn.org!aioe.org!peer03.ams4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 5 Nov 2020 11:28:19 -0800 (PST)
In-Reply-To: <a7b01931-6f5b-4f62-b5f5-0b1f846583c3n@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=2800:810:505:8671:1d7a:ee59:1cff:3a05;
posting-account=emXZQgoAAADeQ6UQqgivjZ-qCMb6D0G9
NNTP-Posting-Host: 2800:810:505:8671:1d7a:ee59:1cff:3a05
References: <b79c917e-a994-47f2-9554-19ea23f22208n@googlegroups.com> <a7b01931-6f5b-4f62-b5f5-0b1f846583c3n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <47fbc858-443e-4c20-ae1b-fa31d07c15edn@googlegroups.com>
Subject: Re: Socket communication problem
From: pjavie...@gmail.com (Pablo Javier Mur)
Injection-Date: Thu, 05 Nov 2020 19:28:21 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3783
X-Received-Body-CRC: 4016048671
View all headers
Hi John,

Thank you very much for your answer, I will try creating a STBOutFiler and STBValidatingInFiler for each sending and receiving of messages.

Bye

El jueves, 5 de noviembre de 2020 a la(s) 06:23:03 UTC-3, john.a...@gmail.com escribió:
Hi Pablo,

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, maintaining the identity of the object and thus the consistency of the overall object graph.

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 each write and read - something like this:

"Write"
(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 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 something so as not to accumulate items that should be disposed of.
Greetings and thank you very much.


1
rocksolid light 0.7.2
clearneti2ptor