• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

BardurArantsson/cqrs: CQRS Implementation for Haskell

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

BardurArantsson/cqrs

开源软件地址(OpenSource Url):

https://github.com/BardurArantsson/cqrs

开源编程语言(OpenSource Language):

Haskell 89.2%

开源软件介绍(OpenSource Introduction):

CQRS for Haskell

Introduction

This is a Haskell implementation of the CQRS+ES architectural pattern. It combines two patterns which are each powerful in their own right, but whose combination is exponentially more powerful yet.

The first pattern is Command Query Responsibility Segregation (CQRS) which is about separating the portion of your application that does writes or updates from the portion of your application that performs queries against data. Martin Fowler has a lovely introduction to CQRS which I recommend reading if you're new to CQRS.

The second pattern is Event Sourcing (ES) which is about representing all state change in your application as a sequence of semantic immutable events rather than modifying data in-place. A simple analogy is to think of an accounting ledger: Every single monetary transaction is recorded as a new line in the ledger rather than by going in and changing any existing lines. When you want to know the current balance you sum up all entries. Martin Fowler also has an introduction to Event Sourcing which I recommend reading if you're not already familiar with ES.

Example Application

A simple example application is provided in the cqrs-example directory. It's a basic TODO-list webapp which uses the cqrs framework and scotty on the backend and uses React on the frontend. The code should hopefully mostly be self-explanatory.

API Stability and Planned/Missing Features

At least the following changes are currently planned:

  • Migrations will probably be reworked and possibly moved to an external library. They are currently not flexible enough to handle using an arbitrary SCHEMA, or e.g. using a different database for snapshots.
  • There's currently no built-in support for persistent query views based on the event streams. Such support is planned.



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap