Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Dan Di Spaltro
    @dispalt
    @notxcain I only rolling upgrade as well, it's basically impossible to do otherwise
    Denis Mikhaylov
    @notxcain
    @/all I've just released 0.19.0-M1 (https://github.com/notxcain/aecor/releases/tag/v0.19.0-M1). Thanks for all contributions.
    Jisoo Park
    @guersam
    :tada:
    Thanks! Could you take a look at this one as well? evotor/aecor-postgres-journal#17
    Jisoo Park
    @guersam
    When something related to akka goes wrong, I get unhelpful stack traces such as java.util.concurrent.RejectedExecutionException. (I'm using ZIO) I guess it's because the failed scala Future messes up with thread pools due to the cats-effect bug in IO.fromFuture which is fixed in 2.0.0-M4. typelevel/cats-effect#546
    Jisoo Park
    @guersam
    This causes some source breaks in aecor as there are many fromFuture in aecor, which requires an implicit ContextShift[IO] now. Although we can simply add the same constraint to aecor.util.effect.AecorListIOOps#fromFuture to be prepared, I'd suggest following more polymorphic direction as being discussed in typelevel/cats-effect#563 .
    Oops, just realized that you've already fixed it in 0.19.0-M1 with the global EC
    Denis Mikhaylov
    @notxcain
    evotor/aecor-postgres-journal#17 gonna be fixed and released today, working on it
    Jisoo Park
    @guersam
    Thanks!
    Gunnar Lilleaasen
    @heksesang
    Is aecor-postgres-journal gonna get a 2.13 release too now? It doesn’t seem to depend on anything that isn’t available for 2.13?
    Gunnar Lilleaasen
    @heksesang
    If I have an event that references another entity, how would I make sure that other entity exists before appending the event?
    Jisoo Park
    @guersam
    @notxcain Is aecor distributed processing module good for the integration between non-eventsourcing service as well? Could you let me know a bit about your experience?
    Jisoo Park
    @guersam
    For more context, I want to deploy several modules on an akka cluster. Some of them use aecor and some don't, and I'm considering using domain events for inter-service integration. The published events should be persistent for a reasonal amount of time for failover. Kinesis is the most viable option for me because I can't afford MSK and don't want to manage a Kafka cluster manually.
    Jisoo Park
    @guersam
    I wonder if aecor distributed processing will be a good choice for this as well, or just a Kinesis client on an akka cluster singleton per module is enough.
    Jisoo Park
    @guersam

    @notxcain Hi! I spent three more months with aecor and now I got more understanding about it. It was a lot of fun :)

    Today's question: How long does it take usually for you to deploy a new processs for DistributedProcessing? We're deploying a 5-node akka cluster on Fargate, and unfortunately it takes almost 20 minutes to finish the rolling update despite of its small size. It goes like this:

    1. New node submits the newly added process to the ShardCoordinator
    2. The ShardCoordinator attempts to register the process with one of the existing nodes but fails
    3. The whole node goes down
    4. Repeat 1~3 until enough new nodes join to the cluster

    Could you give me some advice on redeploying an aecor cluster?

    Przemek Sokół
    @falconepl
    I haven't gone through multi-node Aecor deployment yet, but that one sounds interesting. Do you have some detailed logs for ShardCoordinator failures?
    Jisoo Park
    @guersam
    @falconepl There are many entries like this from akka.cluster.sharding.ShardRegion:
    FeeInquiryExpirationProcess: Trying to register to coordinator at [ActorSelection[Anchor(akka://diamond@10.40.20.22:2552/), Path(/system/sharding/FeeInquiryExpirationProcessCoordinator/singleton/coordinator)]], but no acknowledgement. Total [108] buffered messages. [Coordinator [Member(address = akka://diamond@10.40.20.22:2552, status = Up)] is reachable.]
    Przemek Sokół
    @falconepl
    Maybe it's Akka Cluster Bootstrap or seed nodes not configured properly?
    I'm not an expert, but what's your current sharding configuration?
    Mark Kegel
    @littlenag
    trying out aecor, based on https://github.com/vpavkin/ticket-booking-aecor, and for some reason i'm not seeing anything being written to the db
    tables are created
    can curl a new entry and I get an appropriate response
    but i see nothing written to the db
    no errors in the logs either, unless i deliberately send malformed json
    Przemek Sokół
    @falconepl
    Do you use DataGrip, by any chance? I've hit a bug in it once that listed all my tables as empty, although they were populated. They were all using default public scheme, as usual
    Mark Kegel
    @littlenag
    @falconepl i do, but i'm also connecting via psql
    both show the tables as empty
    Przemek Sokół
    @falconepl
    I will check with a fresh setup of the ticket booking demo. Hopefully I will be able to reproduce that, but if it's really the case - that would be a nasty bug. DB not being written to, without any errors... Cannot think of anything worse in the case of that demo
    Mark Kegel
    @littlenag
    @falconepl yeah the issue is with my codebase but its based on the ticket booking demo and really only involves so far some minor renaming. when i get a chance i'm going to re-test with the ticket booking codebase itself. i thought that maybe i had messed up the protobuf serialization but a unit test showed that it was working as intended. my guess is that something i did is generating an exception that is being swallowed.
    Przemek Sokół
    @falconepl
    Sure, let us now when you discover something. I couldn't reproduce that myself - events & view were written to my DB as expected. As you've said that might be something related to your codebase & some minor change within the whole setup
    Were you able to observe those missing writes also with vanilla ticket-booking-aecor demo or only with your own project?
    Mark Kegel
    @littlenag
    @falconepl ok, i've tracked the issue down
    the ticket booking demo works just fine, btw
    here is the code in question: ```
      def reserve(client: ClientId, records: NonEmptyList[LnsRecord], expiresAt: Instant): I[Unit] = {
        for {
          now <- currentTime
          x <- OptionT(read).cata(
            if (records.distinct =!= records) reject(DuplicateRecords)
            else if (records.size > 4) reject(TooManyRecords)
            else if (expiresAt.isBefore(now)) reject(InvalidExpirationDate)
            else append(PointCodeReserved(client, records, expiresAt)),
    
            _ => reject(PointCodeAlreadyExists),
          )
        } yield x
      }
    this is my version of EventsourcedBooking.place
    starting out i'm oddly able to re-use nearly everything in the ticket booking example, so i've had to make very few changes
    the only real difference is that i now need the current time
    the issue appears to be related to OptionT(read).cata
    i'm not sure why, but if i remove that part, and just pattern match on the result then i get everything working as normal
    if not, then i get nothing written in the database
    my guess is that the Functor for I that cata needs is some how messed up
    Mark Kegel
    @littlenag
    ok, i see the issue now
    mapping when i should have been flatMapping, which was hidden by the any to Unit + turning off the value discard warning
    plus, cata can't do what i want
    figured the issue out by unrolling what cata does
    Przemek Sokół
    @falconepl
    @littlenag Nice catch! Good to hear that you've tracked down the issue
    Yeah, -Ywarn-value-discard is super helpful, especially when used along with -Xfatal-warnings
    Saved me many times. Debugging value discard related bugs can get pretty nasty sometimes
    Przemek Sokół
    @falconepl
    It's in ticket-booking-aecor's build.sbt already, so I guess you've got your custom build.sbt (at least not a tailored copy-paste from the demo)?