简体   繁体   English

我们可以使用Cassandra来管理持久实体而使用MySQL来进行读边吗

[英]Can we use Cassandra for managing persistent entity and MySQL for readside

我可以使用Cassandra来存储持久性实体,而使用MySQL来作为读取侧数据库。

Yes, the read side is completely independent from persistent entities. 是的,读取端完全独立于持久性实体。 Feel free to implemement your read side processors using whatever you like. 随意使用您喜欢的任何东西来实现您的读取侧处理器。

That said, is you're planning to include both lagom-javadsl-persistence-cassandra and lagom-javadsl-persistence-jdbc in your project, you might have a problem. 就是说,如果您打算在项目中同时包含lagom-javadsl-persistence-cassandralagom-javadsl-persistence-jdbc ,则可能会有问题。 Both include bindings for PersistentEntityRegistry and OffsetStore . 两者都包含PersistentEntityRegistryOffsetStore绑定。 I'm not sure how Guice would resolve this conflict, and you might have to override these bindings in your own application module. 我不确定Guice如何解决此冲突,您可能必须在自己的应用程序模块中覆盖这些绑定。

  • Bind PersistentEntityRegistry to CassandraPersistentEntityRegistry PersistentEntityRegistry绑定到CassandraPersistentEntityRegistry
  • Bind OffsetStore to SlickOffsetStore . 绑定OffsetStoreSlickOffsetStore

It would be nice if Lagom split the bindings of these two implementations to separate modules that we could then enable or disable as required. 如果Lagom将这两个实现的绑定拆分为单独的模块,然后我们可以根据需要启用或禁用这些模块,那就太好了。 That's not the case in the current version, alas. version,在当前版本中情况并非如此。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM