SOA:A note on RPC
原文地址:http://www.rabbitmq.com/tutorials/tutorial-six-dotnet.html。
?
Although RPC is a pretty common pattern in computing, it's often criticised. The problems arise when a programmer is not aware whether a function call is local or if it's a slow RPC. Confusions like that result in an unpredictable system and adds unnecessary complexity to debugging. Instead of simplifying software, misused RPC can result in unmaintainable spaghetti code.
Bearing that in mind, consider the following advice:
- Make sure it's obvious which function call is local and which is remote.
- Document your system. Make the dependencies between components clear.
- Handle error cases. How should the client react when the RPC server is down for a long time?
When in doubt avoid RPC. If you can, you should use an asynchronous pipeline - instead of RPC-like blocking, results are asynchronously pushed to a next computation stage.
總結
以上是生活随笔為你收集整理的SOA:A note on RPC的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Linux01-bash脚本编程之六使用
- 下一篇: glob