You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by Sebastian Wiendl <SW...@bhs-corrugated.de> on 2019/11/25 16:25:38 UTC
Automatic reconnect; Reusing Objects; Thread safety
Hey,
sorry for the bombardment with questions lately and thanks for all the
help so far! :-)
1) Is there a way to automatically reconnect on connection loss? Right now
i only get a channel closed exception and everything hangs... What is the
preferred approach for this scenario? Would a pooled PLCConnection help
here?
2) Can some objects be reused, e.g. the ReadRequest in a recurring read
operation?
3) Which objects are safe to use in multiple threads? Scenario here: I
will have two groups of fields on one PLC that i want to collect with
different sampling rates.
4) Is there a best practice value for max fields per read request? Should
large requests be split into multiple smaller, serial requests?
All questions in the context of the S7 driver.
Mit freundlichen Grüßen
Kind regards
Sebastian Wiendl
DSE / Digital Solutions Software Engineer
Phone: +49 9605 919 - 9341
E-Mail: SWiendl@bhs-world.com
Internet: www.bhs-world.com
Shop: www.icorr.shop
BHS Corrugated Maschinen- und Anlagenbau GmbH
Paul-Engel-Straße 1
92729 WEIHERHAMMER
GERMANY
Management: Christian Engel, Lars Engel
Registered at Amtsgericht Weiden, HR B 1320
Re: Antwort: AW: Automatic reconnect; Reusing Objects; Thread safety
Posted by Julian Feinauer <j....@pragmaticminds.de>.
Hi Sebastian,
thank you very much fort he update to the list!
And I totally agree with your decision and wish you best of luck with the scraper : )
And if there are questions, always feel free to ask.
Julian
Von: Sebastian Wiendl <SW...@bhs-corrugated.de>
Antworten an: "dev@plc4x.apache.org" <de...@plc4x.apache.org>
Datum: Freitag, 29. November 2019 um 09:01
An: "dev@plc4x.apache.org" <de...@plc4x.apache.org>
Betreff: Antwort: AW: Automatic reconnect; Reusing Objects; Thread safety
Hi everyone,
short feedback from my side: after a short, but very informative call with Julian i chose to try the scraper supplied with the project - with great success. For me, the scraper is the way to go, as i can simply plug it into the rest of our architecture. It already solves many of the challenges stated in my original question.
Mit freundlichen Grüßen
Kind regards
Sebastian Wiendl
DSE / Digital Solutions Software Engineer
Phone: +49 9605 919 - 9341
E-Mail: SWiendl@bhs-world.com
Internet: www.bhs-world.com<https://www.bhs-world.com>
Shop: www.icorr.shop
________________________________
[cid:_1_175789AC175785B0002C1879C12584C1]
BHS Corrugated Maschinen- und Anlagenbau GmbH
Paul-Engel-Straße 1
92729 WEIHERHAMMER
GERMANY
Management: Christian Engel, Lars Engel
Registered at Amtsgericht Weiden, HR B 1320
________________________________
[cid:_2_1757A4881757A0A4002C1879C12584C1]
[cid:_2_1757AA741757A690002C1879C12584C1]
[cid:_2_1757B0601757AC7C002C1879C12584C1]
[cid:_1_1757B4FC1757ADCC002C1879C12584C1]
Von: "Julian Feinauer" <j....@pragmaticminds.de>
An: "dev@plc4x.apache.org" <de...@plc4x.apache.org>
Datum: 25.11.2019 17:56
Betreff: AW: Automatic reconnect; Reusing Objects; Thread safety
________________________________
Hi Sebastian,
Excellent questions, I see, you are really using plc4x :)
We developed several tools for the scenario described by you like the pool or the OPM module which handle these things transparently in the background.
We also have the scraper, a tool that does periodic data fetching also with handling all internals.
All of the above can be found in the utils module
Regarding the request size... That's tricky and depends on many external parameters.
Perhaps we should really do an online hangout or something.
Julian
Von meinem Mobiltelefon gesendet
-------- Ursprüngliche Nachricht --------
Betreff: Automatic reconnect; Reusing Objects; Thread safety
Von: Sebastian Wiendl
An: dev@plc4x.apache.org
Cc:
Hey,
sorry for the bombardment with questions lately and thanks for all the help so far! :-)
1) Is there a way to automatically reconnect on connection loss? Right now i only get a channel closed exception and everything hangs... What is the preferred approach for this scenario? Would a pooled PLCConnection help here?
2) Can some objects be reused, e.g. the ReadRequest in a recurring read operation?
3) Which objects are safe to use in multiple threads? Scenario here: I will have two groups of fields on one PLC that i want to collect with different sampling rates.
4) Is there a best practice value for max fields per read request? Should large requests be split into multiple smaller, serial requests?
All questions in the context of the S7 driver.
Mit freundlichen Grüßen
Kind regards
Sebastian Wiendl
DSE / Digital Solutions Software Engineer
Phone: +49 9605 919 - 9341
<http://www.bhs-world.com<http://www.bhs-world.com/>>E-Mail: SWiendl@bhs-world.com
Internet: www.bhs-world.com<https://www.bhs-world.com<https://www.bhs-world.com/>>
Shop: www.icorr.shop
________________________________
[cid:_1_12019A181201961C005A5275C12584BD]
BHS Corrugated Maschinen- und Anlagenbau GmbH
Paul-Engel-Straße 1
92729 WEIHERHAMMER
GERMANY
Management: Christian Engel, Lars Engel
Registered at Amtsgericht Weiden, HR B 1320
________________________________
[cid:_2_1201B4F41201B110005A5275C12584BD]
[cid:_2_1201BAE01201B6FC005A5275C12584BD]
[cid:_2_1201C0CC1201BCE8005A5275C12584BD]
[cid:_1_1201C5681201BE38005A5275C12584BD]
Antwort: AW: Automatic reconnect; Reusing Objects; Thread safety
Posted by Sebastian Wiendl <SW...@bhs-corrugated.de>.
Hi everyone,
short feedback from my side: after a short, but very informative call with
Julian i chose to try the scraper supplied with the project - with great
success. For me, the scraper is the way to go, as i can simply plug it
into the rest of our architecture. It already solves many of the
challenges stated in my original question.
Mit freundlichen Grüßen
Kind regards
Sebastian Wiendl
DSE / Digital Solutions Software Engineer
Phone: +49 9605 919 - 9341
E-Mail: SWiendl@bhs-world.com
Internet: www.bhs-world.com
Shop: www.icorr.shop
BHS Corrugated Maschinen- und Anlagenbau GmbH
Paul-Engel-Straße 1
92729 WEIHERHAMMER
GERMANY
Management: Christian Engel, Lars Engel
Registered at Amtsgericht Weiden, HR B 1320
Von: "Julian Feinauer" <j....@pragmaticminds.de>
An: "dev@plc4x.apache.org" <de...@plc4x.apache.org>
Datum: 25.11.2019 17:56
Betreff: AW: Automatic reconnect; Reusing Objects; Thread safety
Hi Sebastian,
Excellent questions, I see, you are really using plc4x :)
We developed several tools for the scenario described by you like the pool
or the OPM module which handle these things transparently in the
background.
We also have the scraper, a tool that does periodic data fetching also
with handling all internals.
All of the above can be found in the utils module
Regarding the request size... That's tricky and depends on many external
parameters.
Perhaps we should really do an online hangout or something.
Julian
Von meinem Mobiltelefon gesendet
-------- Ursprüngliche Nachricht --------
Betreff: Automatic reconnect; Reusing Objects; Thread safety
Von: Sebastian Wiendl
An: dev@plc4x.apache.org
Cc:
Hey,
sorry for the bombardment with questions lately and thanks for all the
help so far! :-)
1) Is there a way to automatically reconnect on connection loss? Right now
i only get a channel closed exception and everything hangs... What is the
preferred approach for this scenario? Would a pooled PLCConnection help
here?
2) Can some objects be reused, e.g. the ReadRequest in a recurring read
operation?
3) Which objects are safe to use in multiple threads? Scenario here: I
will have two groups of fields on one PLC that i want to collect with
different sampling rates.
4) Is there a best practice value for max fields per read request? Should
large requests be split into multiple smaller, serial requests?
All questions in the context of the S7 driver.
Mit freundlichen Grüßen
Kind regards
Sebastian Wiendl
DSE / Digital Solutions Software Engineer
Phone: +49 9605 919 - 9341
<http://www.bhs-world.com>E-Mail: SWiendl@bhs-world.com
Internet: www.bhs-world.com<https://www.bhs-world.com>
Shop: www.icorr.shop
________________________________
[cid:_1_12019A181201961C005A5275C12584BD]
BHS Corrugated Maschinen- und Anlagenbau GmbH
Paul-Engel-Straße 1
92729 WEIHERHAMMER
GERMANY
Management: Christian Engel, Lars Engel
Registered at Amtsgericht Weiden, HR B 1320
________________________________
[cid:_2_1201B4F41201B110005A5275C12584BD]
[cid:_2_1201BAE01201B6FC005A5275C12584BD]
[cid:_2_1201C0CC1201BCE8005A5275C12584BD]
[cid:_1_1201C5681201BE38005A5275C12584BD]
AW: Automatic reconnect; Reusing Objects; Thread safety
Posted by Julian Feinauer <j....@pragmaticminds.de>.
Hi Sebastian,
Excellent questions, I see, you are really using plc4x :)
We developed several tools for the scenario described by you like the pool or the OPM module which handle these things transparently in the background.
We also have the scraper, a tool that does periodic data fetching also with handling all internals.
All of the above can be found in the utils module
Regarding the request size... That's tricky and depends on many external parameters.
Perhaps we should really do an online hangout or something.
Julian
Von meinem Mobiltelefon gesendet
-------- Ursprüngliche Nachricht --------
Betreff: Automatic reconnect; Reusing Objects; Thread safety
Von: Sebastian Wiendl
An: dev@plc4x.apache.org
Cc:
Hey,
sorry for the bombardment with questions lately and thanks for all the help so far! :-)
1) Is there a way to automatically reconnect on connection loss? Right now i only get a channel closed exception and everything hangs... What is the preferred approach for this scenario? Would a pooled PLCConnection help here?
2) Can some objects be reused, e.g. the ReadRequest in a recurring read operation?
3) Which objects are safe to use in multiple threads? Scenario here: I will have two groups of fields on one PLC that i want to collect with different sampling rates.
4) Is there a best practice value for max fields per read request? Should large requests be split into multiple smaller, serial requests?
All questions in the context of the S7 driver.
Mit freundlichen Grüßen
Kind regards
Sebastian Wiendl
DSE / Digital Solutions Software Engineer
Phone: +49 9605 919 - 9341
<http://www.bhs-world.com>E-Mail: SWiendl@bhs-world.com
Internet: www.bhs-world.com<https://www.bhs-world.com>
Shop: www.icorr.shop
________________________________
[cid:_1_12019A181201961C005A5275C12584BD]
BHS Corrugated Maschinen- und Anlagenbau GmbH
Paul-Engel-Straße 1
92729 WEIHERHAMMER
GERMANY
Management: Christian Engel, Lars Engel
Registered at Amtsgericht Weiden, HR B 1320
________________________________
[cid:_2_1201B4F41201B110005A5275C12584BD]
[cid:_2_1201BAE01201B6FC005A5275C12584BD]
[cid:_2_1201C0CC1201BCE8005A5275C12584BD]
[cid:_1_1201C5681201BE38005A5275C12584BD]