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