• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

Couchbase SDK和Moxi客户端

用户头像
it1352
帮助1

问题说明

我是Couchbase的新手,试图理解为什么如果使用Couchbase PHP SDK,我们需要像Moxi这样的客户端代理.

I am new to Couchbase and trying to understand why we need a Client side proxy like Moxi if using a Couchbase PHP SDK.

据我了解,客户端请求到正确服务器的代理是由客户端SDK完成的,该客户端SDK维护所有密钥的vBucket映射.

As per my understanding the proxying of client requests to right server is done by the Client SDK which maintains the vBucket map of all keys.

为什么在使用PHP SDK和Couchbase的Web应用程序中,我们需要额外的Moxi客户端?

Why in case of a web application using PHP SDK and Couchbase, we need an additional Moxi client?

正确答案

#1

它们用于两种不同的事物.

They are for two different things.

  1. Moxi适用于要使用标准memcached库的情况,因为MOXI会将代理的memcached调用代理到Couchbase群集并使用Couchbase存储桶.您的代码将不知道它正在与后台持久数据库通信.将Moxi与Couchbase存储桶一起使用将为您带来Couchbase的一些好处,例如Couchbase以高可用性,易扩展性和性能而著称,但是您可以使用任何现成的现存Memcached库.只是知道,由于坚持使用memcached,因此从应用程序的角度来看,moxi仅限于该功能.
    我认为,应该使用moxi来弥合内存缓存上的人与使用完整的SDK之间的鸿沟,尽管有一些人已经使用了多年,但这并不意味着它是最终的目的地.

  1. Moxi is for when you want to use a standard memcached library as MOXI will proxy memcached calls to the Couchbase cluster and use Couchbase buckets. Your code will not know it is talking to a persistent database in the background. Using moxi with Couchbase buckets will give you some of the benefits of Couchbase, like High Availability, easy scalability and performance Couchbase is known for, but you can use any old off the shelf memcached library. Just know that because of adhering to memcached, moxi is limited to that functionality from an application perspective.
    In my opinion, moxi should be used to bridge the gap between people on memcached and using the full SDKs and is not meant to be a final destination, though some people have been on it for years.

另一方面,使用Couchbase PHP SDK可为您提供Couchbase可以提供的完整套件功能,而您根本不需要MOXI.

Using the Couchbase PHP SDK on the other hand gives you the full suite functionality that Couchbase can offer and you do not need MOXI at all.

总而言之,如果您可以使用Couchbase SDK,请执行此操作.您将从中获得更多功能,性能等.Moxi适用于已经具有Memcached,但希望升级到群集的高性能缓存,而不更改其代码的用户.

In summary, if you are in a spot to use the Couchbase SDK, do that. You will get more functionality, performance, etc. from it. Moxi is for those that are already have memcached, but want to step up to a clustered high performance cache and not change their code.

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tanhccjhcj
系列文章
更多 icon
同类精品
更多 icon
继续加载