Single server with multiple clients

181 views
Skip to first unread message

Arwinder Jaspal

unread,
Jul 14, 2021, 12:59:04 AM7/14/21
to pymodbus
Hi All,

I am new to python and modbus in general.

I am currently designing a modbus interface that has a single server and multiple clients. 

I am wondering what architecture should i use (sync or async)?

Sorry if the question is too dumb but I would appreciate the advice.

Thank you

Alex Railean

unread,
Jul 14, 2021, 9:43:00 AM7/14/21
to pymodbus
Hi,

I am wondering what architecture should i use (sync or async)?
I would choose based on several criteria:

[experience]
If you are not familiar with asyncio, tornado or Twisted, and you're supposed to build a production-ready system that should have been ready yesterday, then don't do it async. Also, if the async paradigm itself is new to you (not necessarily in Python, but with other languages too), then I wouldn't use async either.
 
[ecosystem]
If what you're creating will be used as a library and incorporated in other code - then do it in a way that makes it easier for that other code to leverage your new logic. For example, if this is supposed to "click into" a thing that uses one thread per connection, then follow the same ideology.

[performance]
Async servers will probably deal better with N clients, but this might only become relevant when N is a very large number. Think about your performance expectations.



Alex

Gaurav Uttarkar

unread,
Nov 23, 2021, 2:29:32 AM11/23/21
to pymodbus
Hi Arwind,

Could you please send me your code of how you setup multiple clients with a single server using sync client? Thanks.
Reply all
Reply to author
Forward
0 new messages