ttybus icon indicating copy to clipboard operation
ttybus copied to clipboard

Documentation: Explain "non-reliable" in README.md

Open Gdsimms opened this issue 1 year ago • 6 comments

The README.md file currently states "a shared, non-reliable bus" and this is scaring off some of my coworkers from adopting this as a solution to a current problem we have. Could you explain somewhere in the documentation what the meaning of "non-reliable" is in this context? Is it just that it can't prevent corruption when multiple devices send simultaneously? If that's all it is, then my other current issue #13 would make the bus reliable by locking out writing on all but one fake_tty.

Gdsimms avatar May 25 '23 18:05 Gdsimms

I was reading the README yesterday and this word also made me uncomfortable. What is the meaning of non-reliable here @Gdsimms ? Can you give us a hint on what you thought?

leoheck avatar Nov 08 '23 11:11 leoheck

I have no answer. I have switched to using a few 'socat' commands to perform the serial sharing in my application.

Gdsimms avatar Nov 08 '23 16:11 Gdsimms

Ah, sorry I wanted to ask @danielinux , this MS GitHub is getting annoying.

@Gdsimms this is interesting, I was using socat since it is more spread. But a coworker asked me to change to use this instead. I will give a socat another try to compare it with ttybus

leoheck avatar Nov 08 '23 17:11 leoheck

non-reliable simply means that there is no guarantee that all the bytes are transferred to the destination, because the output is non-blocking.

Imagine a tty transmitting to two devices attached. If one of the two is not 'ready to receive' (i.e. poll with POLLWR returns 0) only the other one will receive the payload.

Perhaps instead of 'non-reliable' it would have been more correct to use 'best-effort'.

danielinux avatar Nov 10 '23 10:11 danielinux

I see, thanks for your feedback @danielinux

What about the data being transferred while both clients are connected and working. Can we say that both clients will always receive the same amount of data without losing any bytes?

I am splitting data from a gnss board connected to the USB into 2 instances of a server. It looks it works fine, but after a couple of hours or after a day something changes on one of the servers. I am not saying if ttybus is the issue, I just don't know where to look to find or debug this specific issue.

leoheck avatar Nov 10 '23 13:11 leoheck

I have no answer. I have switched to using a few 'socat' commands to perform the serial sharing in my application.

Could you please describe how you used socat to multiplex the access to the ttyUSBx device?

OevreFlataeker avatar Sep 14 '24 10:09 OevreFlataeker