由于每个代理可以直接对数据进行操作,因此可以节省在序列化和数据传输方面的所有开销,从而使您可以从计算并行化中受益。
Because an agent can work directly on the data, this removes all of the cost of serialization and data transfer, and enables you to benefit from parallelising the computation.
序列化允许将代理放在流中。
有时候,代理还需要追踪其他对象引用并手动序列化它们,例如Person的spouse。
The Proxy will also sometimes need to track down other object references and serialize them manually, such as Person's spouse.
应用推荐