2

I am writing a proxy in java/spring where requests are accepted. Inside the proxy , the request is taken and a new request is made out of it. This request is sent to another server and results are obtained. And the result is sent back to the original person who requested it. So basically instead of X <-> Z The following is happening. X <-> Y <-> Z Here it is essential that Y should be able to filter out some results.

But then this approach is eating up a large amount of time

How can i optimize this ?

4

1 回答 1

0

从性能的角度来看,您的方法不是很合理。如果您想以编程方式过滤响应,让客户端请求实际资源并使用映射到请求 URL 模式的 servlet 过滤器过滤掉结果。

如果我推测您出于安全原因这样做,我建议您重新考虑您的设计并在它所属的数据库中执行您的数据安全性。

于 2012-07-30T04:14:23.390 回答