Coder Social home page Coder Social logo

fsharp.messagedb's Introduction

FSharp.MessageDb

A simple F# wrapper around message-db

Current status: alpha, WIP, possibly broken, definitely not in production.

Due to family life this will most likely not change. Feel free to PR or fork it!

Parts of it are loosely based on https://thinkbeforecoding.com/post/2021/12/17/functional-event-sourcing-decider

Contents

  • SqlLib: low-level wrapper in Npgsql.FSharp around the message-db functions/stored procedures that will allow you to bring your own connection, transaction and async implementation in whatever way you like
  • SqlClient: mid-level wrapper that wraps the above in .NET Tasks, you can still bring your own connection
  • StatelessClient/StatefulClient: FauxO wrappers that will either create new connections (Stateless) on each call or reuse a provided connection (Stateful) (disposal must be handled outside the client)
  • EventSourcingProducer: a producer that follows the ES decider pattern with optimistic concurrency control
  • ConsumerLib: good to have consumer functions
  • Stateless/Stateful Category Consumer: a consumer that allows either an exclusive or competing consumer pattern using PGSQL advisory locks on a category. The stateful consumer will save state in the message-db (currently fixed at every 20 messages), whereas the stateless consumer leaves this up to the handler function to manage. Both batch read 20 messages (currently fixed) at a time.

fsharp.messagedb's People

Contributors

stoft avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.