使用moxi客户端的Spring Data

编程入门 行业动态 更新时间:2024-10-24 19:25:55
使用moxi客户端的Spring Data-Couchbase客户端配置可能吗?(Spring Data-Couchbase Client Configuration with moxi Client Possible?)

我们在与Tomcat服务器相同的机器上运行客户端MOXI,目前MOXI正在与3台不同机器上的membase服务器集群进行通信。 java客户端使用通过数据端口11211与MOXI通信的spymemcached与MOXI通信。

我们现在将迁移到Couchbase,从开发的角度来看,我们希望将spring数据与couchbase一起使用,但我们的基础架构团队希望将MOXI保留在客户端计算机上,并且只通过端口11211进行通信。似乎在配置时Couchbase客户端,这不起作用,因为MOXI不代理CouchbaseClient类用于发现Couchbase集群的端口8901(管理端口)。 这是否意味着如果我们保留当前的基础架构Spring Data不在桌面上?

我是新手,已经完成了Couchbase文档,看起来我想做的事情是不可能的,但我想确认一下。 目前,要配置spring-data我正在使用它:

<couchbase:couchbase bucket="appsbucket" password="" host="localhost"/> <couchbase:repositories base-package="com.pathto.myrepositories"/>

Localhost是MOXI运行的地方,但是couchbase bean(CouchbaseClient配置)做出的假设是,在我的端口8901上可以使用couchbase管理端口。当然,如果不是localhost,我将它指向托管Couchbase的服务器之一,除了我们的基础架构团队对此配置不满意之外,我没有其他问题。

We are running client-side MOXI on the same machine as our Tomcat servers, with MOXI currently talking to a cluster of membase servers on 3 different machines. The java clients talk to MOXI using spymemcached communicating to MOXI through data port 11211.

We are going to migrate to Couchbase now and from a development perspective, we'd like to use spring-data with couchbase but our infrastructure team want to keep MOXI on the client machines and only communicate via port 11211. It seems that when configuring the Couchbase client, this won't work as MOXI doesn't proxy the port 8901 (admin port) that the CouchbaseClient class uses to discover the Couchbase cluster. Does this mean that if we keep our current infrastructure that Spring Data is off the table?

I am new to this and have went through the Couchbase documentation, and it seems like what I want to do isn't possible, but would like to confirm this. Currently, to configure spring-data I am using this:

<couchbase:couchbase bucket="appsbucket" password="" host="localhost"/> <couchbase:repositories base-package="com.pathto.myrepositories"/>

Localhost is where MOXI is running, but the assumption made by the the couchbase bean (the CouchbaseClient configuration) is that the couchbase admin port is available at port 8901. Of course, if instead of localhost I point it toward one of the servers hosting Couchbase, I don't have an issue other than our infrastructure team takes umbrage with this configuration.

最满意答案

一旦您使用智能客户端迁移到Couchbase,moxi就没有太多价值; 事实上,你将引入一个额外的网络跃点(客户端 - > moxi; moxi - > cluster)。

您可以将智能客户端视为具有嵌入式moxi的概念 - 因为智能客户端了解群集拓扑并知道要与哪个节点通信以访问给定文档。

我建议你看看Couchbase管理指南中的部署策略部分,它更详细地解释了所有这些。

Once you move to Couchbase with a smart client there isn't really much value in moxi; and in fact you'll be introducing an additional network hop (client -> moxi; moxi -> cluster).

You can think of the smart clients as conceptually having an embedded moxi - as the smart clients are aware of the cluster topology and know which node to communicate with to access a given document.

I suggest you take a look a the Deployment strategies section in the Couchbase admin guide which explains all this in more detail.

更多推荐

Couchbase,MOXI,couchbase,配置,电脑培训,计算机培训,IT培训"/> <meta name="d

本文发布于:2023-07-31 00:42:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1340457.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:客户端   moxi   Data   Spring

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!