Giter VIP home page Giter VIP logo

edomata's Introduction

edomata's People

Contributors

github-actions[bot] avatar hnaderi avatar jonasackermann avatar khajavi avatar rawtoast avatar scala-steward avatar vladkopanev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

edomata's Issues

skunk backend outbox error on marking several items

This somehow managed to escape from tests! fix and write more exhaustive tests.

skunk.exception.PostgresErrorException: 
๐Ÿ”ฅ  
๐Ÿ”ฅ  Postgres ERROR 42601 raised in scanner_yyerror (scan.l:1180)
๐Ÿ”ฅ  
๐Ÿ”ฅ    Problem: Syntax error at or near ",".
๐Ÿ”ฅ  
๐Ÿ”ฅ  The statement under consideration was defined
๐Ÿ”ฅ    at /home/runner/work/edomata/edomata/modules/skunk/src/main/scala/Queries.scala:121
๐Ÿ”ฅ  
๐Ÿ”ฅ    update "account".outbox
๐Ÿ”ฅ    set published = $1
๐Ÿ”ฅ    where seqnr in ($2), ($3)
๐Ÿ”ฅ                       โ””โ”€โ”€โ”€ Syntax error at or near ",".
๐Ÿ”ฅ  
๐Ÿ”ฅ  If this is an error you wish to trap and handle in your application, you can do
๐Ÿ”ฅ  so with a SqlState extractor. For example:
๐Ÿ”ฅ  
๐Ÿ”ฅ    doSomething.recoverWith { case SqlState.SyntaxError(ex) =>  ...}
๐Ÿ”ฅ  

Discussion over integrating with XTDB

          Hi @hnaderi,

Thank you for your support! I think about integrating Edomata Event Sourcing model with a Bi-temporal Database like "XTDB". What do you think about it? There is no open-source FSM library that support bi-temporal sourcing and queries. Edomata could be best option to do this. Please help us with examples to develop Edomata with XTDB queries!!

Originally posted by @BNationsDEV in #108 (comment)

Support For Scala 2

Current modules are compiled for scala 3. Scala 2 cross-compilation is necessary for Edomata.

Reorganize storage modules

After #57 , we can split sql-backend module into 2 modules:

  • backend which contains all common implementations and interfaces
  • postgres which contains common postgres driver related implementations

This will allow to reuse backend implementations easily and implement new drivers more easily.

How does event listening work?

I'm using two ZIO scope blocks in my codebase one of them is for creating commands and the other for listening if an event published. When the command and the listener are in the same code block and run sequentially, there is no problem, but when they are run in different time intervals, the listening side does not receive information. How can I solve this?

There is a pub/sub mechanism or it's reading from the database?

Command code block like this example; https://github.com/hnaderi/edomata-example/blob/05609b7f54388dae89b9a925eea21b794db9fd39/core/src/main/scala/dev/hnaderi/example/Main.scala#L47

Listening code block

def mySink(app: Application[Task]) = ZSink.foreach((item: OutboxItem[Notification]) =>
  for {
    _ <- printLine("mySink: " + item)
    _ <- app.accounts.storage.outbox.markAsSent(item)
  } yield ()
)

def printOutbox(app: Application[Task]) = app.accounts.storage.outbox.read.toZStream().run(mySink(app))

ZIO.scoped {
 for {
   app <- Application[Task]().toScopedZIO
   _ <- printOutbox(app)
  } yield ()
 }..fork

Separate storage from backend

Storage handling should be separate from backend
This will simplify implementing different storage drivers and backends and introduces right level of abstraction for raw data manipulation or migration like operations

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.