applied to Fly Futures Ops are time constrained Ops may succeed or fail FiniteDurations Express only finite leases in nanos (prev millis) Make a JVM local ( inter-thread ) version that has the new features as a test bed.
Library only • Work with everything else • Flight (Experimental) Interface • FiniteDurations • Futures https://github.com/fly-object-space google : Fly Object Space
for Akka distribution ! Handles overall transaction ! Validators execute sequentially prior to logic ! Reactor executes afterwards and asynchronously writes notifications (if any) outside transaction context ! Might have gone too far with implicits
never did anything with them ! Inserting into DB easy ! Querying reasonably painful ! NoSQL + Message Bus non trivial + complex in fast moving startup ! Eventually disabled clients
Late auction is a bad one (unlikely to replay in case of long outage) ! Only winning bids translate to transactions ! All nodes capable of closing transaction (for redundancy)
write lock through a select for update def pin(auctionId: UUID) = SQL ("Select * from TA_LOCKS where LOCKABLE = 'CLOSER' FOR UPDATE").execute ! Locks out other nodes ! Could be finer grained ! Needs to have extra timeout code setup to execute predictably ! Only once by virtue of changed state in DB (need to check)
each story ! Add to validation chain ! Add to main part of story ! Use notifications to invalidate cache ! Write auctions to Fly, use take for once only
in Space to indicate lock – or absence! ! For Auction – absence of auction object ! For Account modifications – presence of object ! What if there are two ! What if the owner disappears ! What if the ownership changes on an edge (split brain)
Futures ! Modify to work cleanly with account balances ! Keep database but redesign to work nicely with Fly ! Keep notifications out of database ! Flatten notification structure
case class Notice( id: UUID, originatorId: UUID, timestamp: Long, attributes: Map[String, String], to: Seq[UUID], system: Boolean) ! Will flatten to help leverage Fly filters case class Notice (subject: String = null, _predicate: String = null, _object = String) And correlate on receivers