What is best design pattern for handling rpc requests?

I'm now developing a json-rpc project in C++. I've not decided yet how I handle rpc's requests. From the client side, server receives jsons like below.

{"method":"App1hoge", ...}
{"method":"App1fuga", ...}
{"method":"App2foo", ...}

The server side handles some applications, App1, App2, etc. So I think I should design ApplicationRule class for each class. In this case, App1Rule and App2Rule classes are needed. And I should also design ApplicationRuleManager for handle each rule. But I'm not sure how I design ApplicationRuleManager.

In general, how should I design the relationship between ApplicationRuleManager and each ApplicationRule? Strategy pattern is familiar with this case?

Any help would be appreciated.

链接地址: http://www.djcxy.com/p/61224.html

上一篇: MassTransit RPC(RabbitMQ)与多个客户端超时

下一篇: 处理rpc请求的最佳设计模式是什么?