D
Don Y
Guest
On 8/25/2023 9:58 AM, Dimiter_Popoff wrote:
If I put a NIC on a PCB and have it talk to another NIC
on the same PCB, would you expect it to be unreliable? :>
You don\'t even have to address data corruption.
If you have determined the media to be unreliable, then
all bets are off.
[What do you do when your memory starts throwing errors?]
Each request is serialized. Replies bear the id of the
request that initiated them. So, it\'s a simple matter for the
correct receiving stub to located and the return value(s)
propagated back to the caller.
Even if requests come in to a server out-of-order,
the replies will eventually meet their correct intiators.
Stateful objects inherently have race issues so you
have to address that explicitly -- either with semaphores
or some other synchronization primitive.
If you can get \"safe\" without the added costs of protocol
changes, then it\'s \"free\".
Remember, all of the legacy protocols were designed when networking
was far more of a crap shoot.
On 8/25/2023 19:31, Don Y wrote:
...
If I put a UART on a PCB and have it talk to another UART
on the same PCB, would you expect it to be unreliable?
I.e., context determines the risks you have to address.
While I would do that with no second thoughts in plenty of
cases it is not as safe as \"tcp\" is, i.e. two-way safe like
in syn-ack-synack etc.
If I put a NIC on a PCB and have it talk to another NIC
on the same PCB, would you expect it to be unreliable? :>
Imagine sqrt() was implemented in a TCP session created JUST
for that invocation. Create the connection. Send \"sqrt, value\".
await reply. Teardown connection. Repeat for next (remote)
function invocation. The overhead quickly discourages the
use of RPCs. Which means processes become more bloated as
they try to reinvent services that already exist elsewhere.
Well this is clearly a one way safe operation, if you need it
safe at all. Assuming you want is as safe as a \"mul\" opcode
on the core you run at you will be fine, say just two crc-s
or sort of (for both the request and reply). You won\'t need
more than a single rtt.
You don\'t even have to address data corruption.
If you have determined the media to be unreliable, then
all bets are off.
[What do you do when your memory starts throwing errors?]
E.g., a TCP connection per RPC/RMI would dramatically impact the
cost of each operation!
Not that much I think.
It\'s actually a fair amount -- in time and bandwidth overhead.
Try to open (and then close) TCP connections as fast as possible
to get an idea for how much they cost. And, remember, the
target plays a role in that calculation as well. If it is
slow to complete it\'s end of the handshake, then the
\"caller\" has to pause.
As long as you don\'t need it two-way safe you can obviously
go faster. However you cannot guard against trivial stuff like
races etc. without doing extra work (say you issue two \"mul\"
requests and the replies come out of order; to wrestle that
you will have to do some of the work tcp necessitates you
to do).
Each request is serialized. Replies bear the id of the
request that initiated them. So, it\'s a simple matter for the
correct receiving stub to located and the return value(s)
propagated back to the caller.
Even if requests come in to a server out-of-order,
the replies will eventually meet their correct intiators.
Stateful objects inherently have race issues so you
have to address that explicitly -- either with semaphores
or some other synchronization primitive.
But I can get those reassurances from other mechanisms that are in place
without burdening each transaction with the cost of setting up a TCP
connection. Esp if dropped packets are the exception and not the
rule!
Allowing for an exception in a networking context - even if the
exception from the rule - changes the game altogether. If you don\'t
need a safe delivery mechanism then you don\'t need it of course.
If you can get \"safe\" without the added costs of protocol
changes, then it\'s \"free\".
Remember, all of the legacy protocols were designed when networking
was far more of a crap shoot.