TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

ECAL – Enhanced Communication Abstraction Layer / Pub-Sub Middleware

7 pointsby nateb20225 months ago

1 comment

theamk5 months ago
I don&#x27;t know about other topics, but do avoid this as a top-level framework for robotics applications. The reason is that the framework is designed to only run at real-time speed. You can see that in examples - yes, &quot;while (Ok()) { Publish(&quot;message&quot;); std::this_thread::sleep_for(50 ms); }&quot; looks nice and simple.. but this can&#x27;t go faster or slower depending on CPU load.<p>Why is this a problem? Imagine wanting to write an integration test for a module that replays messages and verifies the replies - you&#x27;d always be limited to real-time speed, even if your module only consumes 1% of the CPU and could theoretically run 100x faster. On the other hand, if during the test, your system gets a short hick-up (such as random daemon activity), your test might miss messages and will generate false positive failures. This is quite a problem if you are running those tests in automated fashion.<p>This is normally not an issue in academic circles (my experience shows that they don&#x27;t really care about robust automated testing), but is quite a deal-breaker in real apps.<p>What&#x27;s the fix? The modules&#x27; should support two modes: &quot;real-time&quot; and &quot;replay&quot;, and in replay mode, the message delivery should be controlled by consumers only - replay message, wait until all consumers acknowledged processing of it, immediately send next one. This means any sort of system &quot;sleep()&quot; is forbidden (will break replay), only the wrapper should be used. Same with any functions which query current time - only call via special wrapper. The threads could be problematic, too - don&#x27;t want to signal &quot;ready for next message&quot; if the thread is working in the background, so those will need wrappers as well. Unfortunately, I don&#x27;t see anything like this in the API docs.<p>(note you can implement that framework yourself and use ECAL only as communication layer... but this will mean giving up on many of its tools, so it&#x27;s not clear how much value will you get out of it)
评论 #42514782 未加载