Predictable Async Code

1 view
Skip to first unread message

William la Forge

unread,
Jul 26, 2015, 9:55:56 PM7/26/15
to AgileWikiDevelopers
Debugging the agent2 code that routes exceptions to the right actor was, er, interesting. :D

Still, it went fast enough. Once again my (much maligned) technique of inserting print statements seemed to serve me well. This works especially well with actor/agent code, as there are no race conditions. Of course, knowing where to put the print statement is key. :D

Now I am thinking of removing the code that buffers messages. This will add clarity, which right now is really important.

I also need to do some cleanup and add some error checks for improved robustness.

Clarity is important because I want to introduce the concept of predictable async code, where a response is guaranteed for every request. (And a chicken foot in every cup of chicken foot soup!) Too much buggy error handling code is part and parcel for async programming when you need to do timeouts on everything and you never know if a request was processed or not when you do not get a response.

--b

William la Forge

unread,
Jul 26, 2015, 10:21:52 PM7/26/15
to AgileWikiDevelopers
Reply all
Reply to author
Forward
0 new messages