作者:伸手以后 | 来源:互联网 | 2023-05-18 08:38
IamhopingtofireoffseveralGetrequeststoCouchbasestoreinashorttimespan,sayinahalf
I am hoping to fire off several Get requests to Couchbase store in a short time span, say in a half a millisecond.
我希望在很短的时间内(比如半毫秒)发送几个Get请求到Couchbase商店。
I can't use a multiGet because I don't have all the keys at the same time.
我不能使用multiGet,因为我没有同时拥有所有的键。
However, if I fire off several separate get requests shortly after one another, I believe they will processed one at a time as indicated in here http://docs.couchbase.com/couchbase-devguide-2.5/index.html#retrieving-multiple-keys.
但是,如果我在一个接一个地触发几个单独的get请求,我相信它们将在一个时间内处理一个,如http://docs.couchbase.com/couchbase-devguide-2.5/index.html#retrieving- multikeys。
One thing I could perhaps do is use a separate Connection object created at startup time for each Get request, but I haven't seen this recommended anywhere as a best practice.
我可以做的一件事是为每个Get请求在启动时创建一个单独的连接对象,但是我还没有见过任何地方推荐的最佳实践。
Would that work i.e. allow me to quickly do Get's in parallel and is that the recommended thing to do?
这能行吗,让我快速地同时做Get,这是推荐的做法吗?
1 个解决方案