Predictable Async Code

已查看 1 次
跳至第一个未读帖子

William la Forge

未读,
2015年7月26日 21:55:562015/7/26
收件人 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

未读,
2015年7月26日 22:21:522015/7/26
收件人 AgileWikiDevelopers
回复全部
回复作者
转发
0 个新帖子