@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:
Could you give me some advice on redeploying an aecor cluster?
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.]
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
}
EventsourcedBooking.place
OptionT(read).cata
I
that cata
needs is some how messed up
cata
can't do what i want
cata
does
-Ywarn-value-discard
is super helpful, especially when used along with -Xfatal-warnings
NotUsed
I think it is, for when you really intend to have no action
Saga[F[_], D]
- and that's because it should provide some create(data: D): F[Unit]
capability (every user's concrete saga implementation may operate on a different data type passed around)