2

我正在研究 Cassandra 是否可以作为我们服务器软件的分布式数据库存储的一个选项。

服务器软件是用 Delphi 编写的,但我很难找到有关如何从 Delphi 访问 Cassandra 数据库的描述。

4

5 回答 5

2

SO 其他地方的一个建议是为 Thrift 框架编写自己的 Delphi 生成器。

于 2010-03-17T01:47:39.063 回答
1

我看到两个选项,要么编写自己的本机 Delphi 驱动程序,要么以某种方式使用可用的驱动程序。

一种解决方案可能是使用Python4Delphi在 Delphi 应用程序中托管 Python,并使用 Python 代码连接 Cassandra。有点笨拙,性能可能不是最好的。


编辑: 选项#3:使用支持的语言编写代理服务器,为您的 Delphi 应用程序提供接口。

于 2010-03-17T07:12:46.033 回答
0

Another update: Just working on PasCassa, an Cassandra client for Delphi, based on the Thrift interface mentioned here.

于 2011-12-28T15:12:38.320 回答
0

Cassandra 是用 Java 编写的,通常部署在 Linux 系统上(术语 LAMP,指的是通常的嫌疑人堆栈;linux-apache-mysql-php)。在这种情况下,Cassandra 将成为 MySql 之类的 No-SQL bigtable 替代品,并且将由以 java 为中心的开发人员使用,因此没有 PhP。但是您仍然在谈论 Unix/Linux 世界,而 Delphi 存在于 Windows 世界中。

那么,随着 Cassandra 在 Linux(网络服务器)机器上运行,如何从运行 Windows 机器的 Delphi 应用程序访问它?这些 API 是 facebook“Thrift”API 的一部分。您可以使用 Python-Delphi 集成模块来加载 Python thrift API。或者您可以编写自己的本地 pascal Thrift 集成。我发现这两种方法都有问题。一方面,无论哪种方式,您都将独自一人。

Looks like Cassandra can run on Windows (it is written in Java, so it better!), and a bat file is included to start it up on Windows, but the file layout is "more designed for Unix use", and it is used in deployment almost exclusively on Linux or Unix systems.

于 2010-03-17T13:07:40.457 回答
0

只是为了更新这个问题,因为这是谷歌在这个主题上为数不多的回报之一,现在apache.org上有一个 Thrift 的 Delphi 实现。

于 2011-11-01T16:42:46.487 回答