岩浆、货物、GLORP 还是其他什么?

发布于 2024-07-27 03:06:43 字数 299 浏览 8 评论 0原文

我已经使用 Smalltalk 大约 6 个月了(Squeak 和 Pharo),主要是做数据分析,我即将启动我的第一个 Seaside 应用程序。 所以我向所有 Smalltalkers 提出的问题是,你们最喜欢的持久性解决方案是什么? 我一直在关注 Magma、GOODS 和 GLORP。 我是一名长期的 python 黑客,所以我使用 ORM,但似乎 Magma 或 GOODS 会是更好的解决方案,因为它们看起来是面向对象的。

快速说明:我想跨多个虚拟机扩展我的应用程序,因此仅将数据保存到映像中并不能真正起作用。

谢谢!

So I've been using Smalltalk for about 6 months now (Squeak and Pharo), mostly doing data analytics, and I'm about to start my first Seaside app. So my question to all you Smalltalkers out there is, what is your favorite persistence solution? I've been looking at Magma, GOODS, and GLORP. I'm a long-time python hacker, so I get ORM, but it seems like Magma or GOODS would be a better solution, since they seem object-oriented.

A quick note: I want to scale my app across multiple VM's, so just saving data to the image wont really work.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

羁〃客ぐ 2024-08-03 03:06:43

如果您想跨多个虚拟机进行扩展,您可能需要查看 GemStone/S

但请注意,GemStone 是专有的商业产品。 因此,您必须为此付费。 然而,定价模型通常是这样设计的:如果您需要更大的版本,那么您通常也会让用户为该版本付费。 4 GiByte 磁盘/1 GiByte RAM/1 CPU 版本的起价为 0 美元。

另一件需要注意的事情是 GemStone Smalltalk 是它自己的方言,因此您的 Squeak 代码可能无法在未经修改的情况下运行,但应该相当容易移植。 (例如,GemStone 工程师创建了一个适配器,允许您将 Monticello(Squeak 的版本控制系统)包加载到 GemStone/S 中,并且他们通常确保 Seaside 运行。)

那么,什么是 GemStone? 基本上,它是一个具有自动对象持久性的分布式虚拟机。 与普通的 Smalltalk VM 相比,它最容易解释。 如果您有两个并行运行的 Smalltalk VM,则每个 VM 都有自己的对象内存(即垃圾收集器管理的东西)。 该对象内存位于 RAM 中。 在 GemStone 中,集群中的所有虚拟机共享相同对象内存并且它位于磁盘上,而不是 RAM 中。 因此,您不需要数据库,甚至不需要面向对象的数据库,因为您的对象“就在那里”,随时随地。

(这只是一个非常简单的描述。例如,堆并不是真正在虚拟机之间共享的。这是没有意义的,您不会希望复制通过网络创建的每个临时对象。相反,您有一个全局存储库对象(基本上是一个字典),就像垃圾收集器将从某个众所周知的根对象开始,然后保留从那里可访问的所有对象,并删除那些不可访问的对象,GemStone 将从全局存储库对象开始,并仅持久/复制可从那里访问的对象。)

GemStone 还具有类似数据库的功能,因此对全局存储库的访问包含在 ACID 事务中,并且是一种受 SQL 启发但 Smalltalkish 的查询语言。

GemStone 有一个很好的设备,他们称之为“GLASS”(适用于 GemStone、Linux、Apache、Seaside 和 Smalltalk)类似于众所周知的“LAMP”(Linux、Apache、MySQL 和 PHP)。 GLASS 包括预装 Seaside 的 GemStone 免费版本,以及在 Xubuntu 之上运行 Apache 的所有设置,所有内容都整齐地打包到 VMWare 磁盘映像中。

If you want to scale across multiple VMs, you might want to to take a look at GemStone/S.

Be aware, however, that GemStone is a proprietary, commercial product. So, you will have to pay for it. However, the pricing model is generally designed in such a way, that if you need a bigger edition then you will generally also have the users to pay for that edition. The prices start out at 0 $ for the 4 GiByte disk / 1 GiByte RAM / 1 CPU version.

Another thing to note is that GemStone Smalltalk is its own dialect, so your Squeak code will probably not run unmodified, but should be fairly easy to port. (For example, the GemStone engineers have created an adapter that allows you to load Monticello (Squeak's version control system) packages into GemStone/S, also they generally make sure that Seaside runs.)

So, what is GemStone? Basically, it's a distributed VM with automatic object persistence. It's easiest to explain compared to a normal Smalltalk VM. If you have two Smalltalk VMs running side-by-side, each of them has its own Object Memory (i.e. the thing the garbage collector manages). And that Object Memory is in RAM. In GemStone, all VMs in a cluster share the same Object Memory and it lives on disk, not in RAM. So, you don't need a database, not even an object-oriented one, because your objects are "just there", everywhere, all the time.

(That's only a very simplistic description. For example, the heap is not really shared across VMs. That wouldn't make sense, you wouldn't want to replicate every temporary object you create across the network. Instead, you have a global repository object (basically, a dictionary) and just like the garbage collector will start at some well-known root object and then keep all objects that are reachable from there, and delete those that aren't, GemStone will start at the global repository object, and persist/replicate only the objects that are reachable from there.)

GemStone also has database-ish features, so access to the global repository is wrapped in ACID transactions, and there is a SQL-inspired but Smalltalkish query language.

GemStone has a nice appliance that they call "GLASS" (for GemStone, Linux, Apache, Seaside and Smalltalk) analogous to the well-known "LAMP" (Linux, Apache, MySQL and PHP). GLASS includes the gratis edition of GemStone with Seaside preinstalled and everything setup with Apache running on top of Xubuntu, everything neatly packaged into a VMWare disk image.

睡美人的小仙女 2024-08-03 03:06:43

GLASS 本身并不能真正帮助您概览数据。 SandstoneDB 可以。 您可以将 SandstoneDB 与 GOODS 和 GLASS 一起使用(甚至单独使用),具体取决于您希望花多少钱(Sandstone 在所有意义上都是免费的,GLASS 是商业的,但免费,就像小型安装的免费啤酒一样)。

请查看sandstoneDB 页面。 这是GOODS 适配器。 要在 GLASS 中使用 SandstoneDB,只需将存储切换到 SDMemoryStore,请参阅 SandstoneDB 中关于 SDMemoryStore 的类注释。

GLASS alone doesn't really help to give you an overview over your data. SandstoneDB does. You can use SandstoneDB with both GOODS and GLASS, (or even alone), depending on how much money you wish to spend (Sandstone is free in all senses, GLASS is commercial, but free as in free beer for small installations).

Check out the sandstoneDB page. And here's the adaptor for GOODS. To use SandstoneDB with GLASS, just switch the store to SDMemoryStore, see the class comments on SDMemoryStore in SandstoneDB.

疯狂的代价 2024-08-03 03:06:43

如果可以选择的话,我也会选择GLASS或Magma(这取决于项目有多大)。

考虑到 Squeak 中的 GLorp 仅适用于 PostgreSQL。 我们开发了 SqueakDBX,它是一个与大多数数据库通信的数据库驱动程序。 我们现在正在修改 Glorp,以便您可以将其与所有这些工具一起使用(不仅仅是 PostgreSQL)。 但这要到今年年底才能实现。

If you can choose, I would also choose GLASS or Magma (it depends of how big is the project).

Take into account that GLorp in Squeak only works with PostgreSQL. We developed SqueakDBX which is a database driver to communicate with most databases. We are now modifying Glorp so that you can use it with all of them (not only PostgreSQL). But this won't be until end of this year.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文