SlideShare a Scribd company logo
ERROR HANDLING IN
SCALA
Daniel Pfeiffer - @pfeiffer_d_
FROM ZERO TO
HERO
ERRORS VS.
FAILURES
ERRORS ARE UNEXPECTED
FAILURES ARE EXPECTED WRONG
BEHAVIOUR
THE PROBLEM
DOMAIN
THE PROBLEM DOMAIN
sealed trait TimeEntryStatus
case object Open extends TimeEntryStatus
case object Accepted extends TimeEntryStatus
case object Declined extends TimeEntryStatus
case class TimeEntry(
id: UUID,
begin: LocalDateTime,
end: LocalDateTime,
status: TimeEntryStatus
)
THE PROBLEM DOMAIN
val timeEntry = TimeEntry(
id = UUID.randomUUID,
begin = LocalDateTime.now.minusHours(1),
end = LocalDateTime.now,
status = Open
)
THE PROBLEM DOMAIN
class TimeEntryService{
private[this] var timeEntries: Map[UUID, TimeEntry] = Map()
def create(t: TimeEntry) = ???
def accept(id: UUID) = ???
def decline(id: UUID) = ???
}
FAILURES
HAPPEN
IDs are unique
IDs might not exist
Many more
A JAVAISH
SOLUTION
Many of us are used to
develop like this
Failures handling with
exceptions
Better solutions
already exist
A JAVAISH SOLUTION
abstract class TimeEntryException(message: String) extends Exception
case class TimeEntryAlreadyExistsException(id: UUID)
extends TimeEntryException(s"Time Entry with id $id already exists.")
case class TimeEntryDoesNotExistException(id: UUID)
extends TimeEntryException(s"Time Entry with id $id does not exist.")
A JAVAISH SOLUTION
class TimeEntryService {
def create(t: TimeEntry): Unit = {
if (timeEntries.contains(t.id)) {
throw TimeEntryAlreadyExistsException(t.id)
} else {
timeEntries = timeEntries + (t.id -> t)
}
}
}
A JAVAISH SOLUTION
try {
service.create(entry)
service.accept(entry.id)
} catch {
case TimeEntryDoesNotExistException(id) =>
println("Sorry the time entry does not exist.")
case TimeEntryAlreadyExistsException(id) =>
println("Sorry the time entry does already exist.")
}
AT LEAST WE CAN
TRY
AT LEAST WE CAN TRY
def create(timeEntry: TimeEntry): Try[Unit] = {
if (timeentries.contains(timeEntry.id)) {
Failure(TimeEntryAlreadyExistsException(timeEntry.id))
} else {
timeentries += (timeEntry.id -> timeEntry)
Success(())
}
}
LOOKS BETTER, HMMM?
val result: Try[Unit] = for {
_ <- service.create(timeEntry)
_ <- service.accept(timeEntry.id)
_ <- service.create(timeEntry)
} yield ()
result match {
case Success(_) => println("Succeeded.")
case Failure(ex) => println(s"Exception occurred. ${ex.getMessage}")
}
USE THE FORCE LUKE
MY PRECIOUS
sealed trait TimeEntryFailure
case class ValidationFailed(failures: List[String])
extends TimeEntryFailure
case class TimeEntryDoesNotExist(id: UUID)
extends TimeEntryFailure
case class TimeEntryAlreadyExists(id: UUID)
extends TimeEntryFailure
EITHER, WE TRY...
type TimeEntryResult[A] = Either[TimeEntryFailure, A]
def create(t: TimeEntry): TimeEntryResult[Unit] = {
if (timeEntries.contains(t.id)) {
Left(TimeEntryAlreadyExists(t.id))
} else {
timeEntries = timeEntries + (t.id -> t)
Right(())
}
}
... AND MATCH IT
//type TimeEntryResult[A] = Either[TimeEntryFailure,A]
val result: TimeEntryResult[Unit] = for {
_ <- service.create(entry)
_ <- service.create(entry)
_ <- service.accept(entry.id)
} yield ()
result.fold(
{
case TimeEntryDoesNotExist(id) => println("Sorry, the time entry does not exis
case TimeEntryAlreadyExists(id) => println("Sorry, the time entry already exis
}, { _ =>
println("Yeaaah, success!")
}
)
YOU GOT A COMPILER, SO USE IT
[warn] /Users/daniel/presentations/2017-06-08_error-handling-in-scala/
code/src/main/scala/com/github/dpfeiffer/errorhandling/either/
ExampleWithEither.scala:60: match may not be exhaustive.
[warn] It would fail on the following input: ValidationFailed(_)
[warn] {
[warn] ^
[warn] one warning found
LET'S MAKE THIS A HARD CONSTRAINT
scalacOptions += "-Xfatal-warnings",
[error] /Users/daniel/presentations/2017-06-08_error-handling-in-scala/
code/src/main/scala/com/github/dpfeiffer/errorhandling/either/
ExampleWithEither.scala:60: match may not be exhaustive.
[error] It would fail on the following input: ValidationFailed(_)
[error] {
[error] ^
[error] one error found
THE EMPIRE STRIKES BACK
WELCOME TO THE FUTURE, ...
def create(timeEntry: TimeEntry)
(implicit ec: ExecutionContext): Future[Unit] = {
for{
exists <- exists(timeEntry.id)
_ <- if (exists) {
Future.failed(TimeEntryAlreadyExistsException(timeEntry.id))
} else {
store(timeEntry)
}
} yield ()
}
... THAT LOOKS LIKE THE TRY
val result = for {
_ <- service.create(timeEntry)
_ <- service.accept(timeEntry.id)
_ <- service.create(timeEntry)
} yield ()
result.onComplete {
case Success(_) => println("Succeeded.")
case Failure(ex) => println(s"Exception occurred. ${ex.getMessage}")
}
WE
WANT
BOTH
Asynchronity
Nice failure handling
FUTURE[EITHER[FAILURE,A]]
//type TimeEntryResult[A] = Future[Either[TimeEntryFailure, A]]
val result: TimeEntryResult[Unit] = for {
r1 <- service.create(entry)
r2 <- r1 match {
case Left(f) => Future.successful[TimeEntryFailureOr[Unit]](Left(f))
case Right(_) => service.create(entry)
}
r3 <- r2 match {
case Left(f) => Future.successful[TimeEntryFailureOr[Unit]](Left(f))
case Right(_) => service.accept(entry.id)
}
} yield r3
MONAD
TRANSFORMERS
EITHERT MONAD TRANSFORMER
vs
type TimeEntryResult[A] = Future[Either[TimeEntryFailure, A]]
import cats.data.EitherT
type TimeEntryResult[A] = EitherT[Future, TimeEntryFailure, A]
WRAPPING EVERYTHING IN A NEW
MONAD
type FutureEither = EitherT[Future, String, String]
val a: FutureEither = EitherT(Future(Right("right")))
val b: FutureEither = EitherT(Future(Left("left"))
val c: FutureEither = EitherT.right(Future("right"))
val d: FutureEither = EitherT.left(Future("left"))
val e: FutureEither = EitherT.fromEither(Right("right"))
THE USAGE LOOKS GOOD IF...
we only use TimeEntryResult[_]
//type TimeEntryResult[A] = EitherT[Future,TimeEntryFailure,A]
val result: TimeEntryResult[Unit] = for {
_ <- service.create(entry)
_ <- service.create(entry)
_ <- service.accept(entry.id)
} yield ()
result
.fold(handleFailure, _ => println("Success!!!"))
.onComplete {
case Failure(t) => println("Oh noooo!")
case Success(_) =>
}
BUT IF WE MIX TYPES...
def create(t: TimeEntry)
(implicit ec: ExecutionContext): TimeEntryResult[Unit] = {
for {
_ <- EitherT (
find(t.id).map{
case Some(_) => Left(TimeEntryAlreadyExists(t.id))
case None => Right(())
}
)
_ <- EitherT.right(store(t))
} yield ()
}
private def find(timeEntryId: UUID)
(implicit ec: ExecutionContext): Future[Option[TimeEntry]] = Future {
timeEntries.get(timeEntryId)
}
private def store(t: TimeEntry)
(implicit ec: ExecutionContext): Future[Unit] = Future {
timeEntries += (t.id -> t)
().asRight
}
SCALA IS FLEXIBLE ENOUGH TO GUIDE
US A WAY
def create(t: TimeEntry)
(implicit ec: ExecutionContext): TimeEntryResult[Unit] = {
for {
_ <- ? <~ find(t.id).map {
case Some(_) => Left(TimeEntryAlreadyExists(t.id))
case None => Right(())
}
_ <- ? <~ store(t)
} yield ()
}
SO WE CREATED OUR OWN DSL
object ? {
def <~[A](x: A)(implicit ec: ExecutionContext): TimeEntryResult[A] = {
x.pure[TimeEntryResult]
}
def <~[A](x: Either[TimeEntryFailure, A])(implicit ec: ExecutionContext): TimeEn
EitherT.fromEither[Future](x)
}
def <~[A](x: Future[A])(implicit ev: A <:!< Either[TimeEntryFailure, _], ec:
EitherT.right[Future, TimeEntryFailure, A](x)
}
def <~[A](x: Future[Either[TimeEntryFailure, A]]): TimeEntryResult[A] = {
EitherT(x)
}
}
LITERATURE
http://blog.leifbattermann.de/2017/03/16/7-most-
convenient-ways-to-create-a-future-either-stack/
http://twitter.github.io/effectivescala/#Error%20handlin
http://typelevel.org/cats/
http://eed3si9n.com/herding-cats/stacking-future-
and-either.html http://eed3si9n.com/herding-
cats/monad-transfomers.html
https://github.com/dpfeiffer/error-handling-in-scala

More Related Content

What's hot

The Ring programming language version 1.9 book - Part 38 of 210
The Ring programming language version 1.9 book - Part 38 of 210The Ring programming language version 1.9 book - Part 38 of 210
The Ring programming language version 1.9 book - Part 38 of 210
Mahmoud Samir Fayed
 
Scala by Luc Duponcheel
Scala by Luc DuponcheelScala by Luc Duponcheel
Scala by Luc Duponcheel
Stephan Janssen
 
Cn os-lp lab manual k.roshan
Cn os-lp lab manual k.roshanCn os-lp lab manual k.roshan
Cn os-lp lab manual k.roshan
riturajj
 
design and analysis of algorithm Lab files
design and analysis of algorithm Lab filesdesign and analysis of algorithm Lab files
design and analysis of algorithm Lab files
Nitesh Dubey
 
Os lab file c programs
Os lab file c programsOs lab file c programs
Os lab file c programs
Kandarp Tiwari
 
The Ring programming language version 1.9 book - Part 45 of 210
The Ring programming language version 1.9 book - Part 45 of 210The Ring programming language version 1.9 book - Part 45 of 210
The Ring programming language version 1.9 book - Part 45 of 210
Mahmoud Samir Fayed
 
The Essence of the Iterator Pattern
The Essence of the Iterator PatternThe Essence of the Iterator Pattern
The Essence of the Iterator Pattern
Eric Torreborre
 
The Ring programming language version 1.8 book - Part 42 of 202
The Ring programming language version 1.8 book - Part 42 of 202The Ring programming language version 1.8 book - Part 42 of 202
The Ring programming language version 1.8 book - Part 42 of 202
Mahmoud Samir Fayed
 
Daa practicals
Daa practicalsDaa practicals
Daa practicals
Rekha Yadav
 
Rxjs kyivjs 2015
Rxjs kyivjs 2015Rxjs kyivjs 2015
Rxjs kyivjs 2015
Alexander Mostovenko
 
The Ring programming language version 1.6 book - Part 183 of 189
The Ring programming language version 1.6 book - Part 183 of 189The Ring programming language version 1.6 book - Part 183 of 189
The Ring programming language version 1.6 book - Part 183 of 189
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 101 of 212
The Ring programming language version 1.10 book - Part 101 of 212The Ring programming language version 1.10 book - Part 101 of 212
The Ring programming language version 1.10 book - Part 101 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 14 of 84
The Ring programming language version 1.2 book - Part 14 of 84The Ring programming language version 1.2 book - Part 14 of 84
The Ring programming language version 1.2 book - Part 14 of 84
Mahmoud Samir Fayed
 
Scale Up with Lock-Free Algorithms @ JavaOne
Scale Up with Lock-Free Algorithms @ JavaOneScale Up with Lock-Free Algorithms @ JavaOne
Scale Up with Lock-Free Algorithms @ JavaOne
Roman Elizarov
 
The Ring programming language version 1.8 book - Part 35 of 202
The Ring programming language version 1.8 book - Part 35 of 202The Ring programming language version 1.8 book - Part 35 of 202
The Ring programming language version 1.8 book - Part 35 of 202
Mahmoud Samir Fayed
 
The Ring programming language version 1.3 book - Part 32 of 88
The Ring programming language version 1.3 book - Part 32 of 88The Ring programming language version 1.3 book - Part 32 of 88
The Ring programming language version 1.3 book - Part 32 of 88
Mahmoud Samir Fayed
 
The Essence of the Iterator Pattern (pdf)
The Essence of the Iterator Pattern (pdf)The Essence of the Iterator Pattern (pdf)
The Essence of the Iterator Pattern (pdf)
Eric Torreborre
 
The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212
Mahmoud Samir Fayed
 
Datastructures asignment
Datastructures asignmentDatastructures asignment
Datastructures asignment
sreekanth3dce
 
Effector: we need to go deeper
Effector: we need to go deeperEffector: we need to go deeper
Effector: we need to go deeper
Victor Didenko
 

What's hot (20)

The Ring programming language version 1.9 book - Part 38 of 210
The Ring programming language version 1.9 book - Part 38 of 210The Ring programming language version 1.9 book - Part 38 of 210
The Ring programming language version 1.9 book - Part 38 of 210
 
Scala by Luc Duponcheel
Scala by Luc DuponcheelScala by Luc Duponcheel
Scala by Luc Duponcheel
 
Cn os-lp lab manual k.roshan
Cn os-lp lab manual k.roshanCn os-lp lab manual k.roshan
Cn os-lp lab manual k.roshan
 
design and analysis of algorithm Lab files
design and analysis of algorithm Lab filesdesign and analysis of algorithm Lab files
design and analysis of algorithm Lab files
 
Os lab file c programs
Os lab file c programsOs lab file c programs
Os lab file c programs
 
The Ring programming language version 1.9 book - Part 45 of 210
The Ring programming language version 1.9 book - Part 45 of 210The Ring programming language version 1.9 book - Part 45 of 210
The Ring programming language version 1.9 book - Part 45 of 210
 
The Essence of the Iterator Pattern
The Essence of the Iterator PatternThe Essence of the Iterator Pattern
The Essence of the Iterator Pattern
 
The Ring programming language version 1.8 book - Part 42 of 202
The Ring programming language version 1.8 book - Part 42 of 202The Ring programming language version 1.8 book - Part 42 of 202
The Ring programming language version 1.8 book - Part 42 of 202
 
Daa practicals
Daa practicalsDaa practicals
Daa practicals
 
Rxjs kyivjs 2015
Rxjs kyivjs 2015Rxjs kyivjs 2015
Rxjs kyivjs 2015
 
The Ring programming language version 1.6 book - Part 183 of 189
The Ring programming language version 1.6 book - Part 183 of 189The Ring programming language version 1.6 book - Part 183 of 189
The Ring programming language version 1.6 book - Part 183 of 189
 
The Ring programming language version 1.10 book - Part 101 of 212
The Ring programming language version 1.10 book - Part 101 of 212The Ring programming language version 1.10 book - Part 101 of 212
The Ring programming language version 1.10 book - Part 101 of 212
 
The Ring programming language version 1.2 book - Part 14 of 84
The Ring programming language version 1.2 book - Part 14 of 84The Ring programming language version 1.2 book - Part 14 of 84
The Ring programming language version 1.2 book - Part 14 of 84
 
Scale Up with Lock-Free Algorithms @ JavaOne
Scale Up with Lock-Free Algorithms @ JavaOneScale Up with Lock-Free Algorithms @ JavaOne
Scale Up with Lock-Free Algorithms @ JavaOne
 
The Ring programming language version 1.8 book - Part 35 of 202
The Ring programming language version 1.8 book - Part 35 of 202The Ring programming language version 1.8 book - Part 35 of 202
The Ring programming language version 1.8 book - Part 35 of 202
 
The Ring programming language version 1.3 book - Part 32 of 88
The Ring programming language version 1.3 book - Part 32 of 88The Ring programming language version 1.3 book - Part 32 of 88
The Ring programming language version 1.3 book - Part 32 of 88
 
The Essence of the Iterator Pattern (pdf)
The Essence of the Iterator Pattern (pdf)The Essence of the Iterator Pattern (pdf)
The Essence of the Iterator Pattern (pdf)
 
The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212
 
Datastructures asignment
Datastructures asignmentDatastructures asignment
Datastructures asignment
 
Effector: we need to go deeper
Effector: we need to go deeperEffector: we need to go deeper
Effector: we need to go deeper
 

Similar to Error Handling in Scala

Improving Correctness With Type - Goto Con Berlin
Improving Correctness With Type - Goto Con BerlinImproving Correctness With Type - Goto Con Berlin
Improving Correctness With Type - Goto Con Berlin
Iain Hull
 
A Playful Introduction to Rx
A Playful Introduction to RxA Playful Introduction to Rx
A Playful Introduction to Rx
Andrey Cheptsov
 
Scala Back to Basics: Type Classes
Scala Back to Basics: Type ClassesScala Back to Basics: Type Classes
Scala Back to Basics: Type Classes
Tomer Gabel
 
Improving Correctness with Types
Improving Correctness with TypesImproving Correctness with Types
Improving Correctness with Types
Iain Hull
 
Are we ready to Go?
Are we ready to Go?Are we ready to Go?
Are we ready to Go?
Adam Dudczak
 
Functional DDD
Functional DDDFunctional DDD
Functional DDD
Alessandro Melchiori
 
ddd+scala
ddd+scaladdd+scala
ddd+scala
潤一 加藤
 
Taming Distribution: Formal Protocols for Akka Typed
Taming Distribution: Formal Protocols for Akka TypedTaming Distribution: Formal Protocols for Akka Typed
Taming Distribution: Formal Protocols for Akka Typed
Roland Kuhn
 
aming distribution: formal protocols for Akka Typed
aming distribution: formal protocols for Akka Typedaming distribution: formal protocols for Akka Typed
aming distribution: formal protocols for Akka Typed
J On The Beach
 
Simpler java
Simpler javaSimpler java
Simpler java
Stefan von Stein
 
JAVA.Q4 Create a Time class. This class will represent a point in.pdf
JAVA.Q4 Create a Time class. This class will represent a point in.pdfJAVA.Q4 Create a Time class. This class will represent a point in.pdf
JAVA.Q4 Create a Time class. This class will represent a point in.pdf
karymadelaneyrenne19
 
Kamil Chmielewski, Jacek Juraszek - "Hadoop. W poszukiwaniu złotego młotka."
Kamil Chmielewski, Jacek Juraszek - "Hadoop. W poszukiwaniu złotego młotka."Kamil Chmielewski, Jacek Juraszek - "Hadoop. W poszukiwaniu złotego młotka."
Kamil Chmielewski, Jacek Juraszek - "Hadoop. W poszukiwaniu złotego młotka."
sjabs
 
Functions, Types, Programs and Effects
Functions, Types, Programs and EffectsFunctions, Types, Programs and Effects
Functions, Types, Programs and Effects
Raymond Roestenburg
 
Improving Correctness with Types Kats Conf
Improving Correctness with Types Kats ConfImproving Correctness with Types Kats Conf
Improving Correctness with Types Kats Conf
Iain Hull
 
Monads - Dublin Scala meetup
Monads - Dublin Scala meetupMonads - Dublin Scala meetup
Monads - Dublin Scala meetup
Mikhail Girkin
 
Swift Rocks #2: Going functional
Swift Rocks #2: Going functionalSwift Rocks #2: Going functional
Swift Rocks #2: Going functional
Hackraft
 
Scala for Jedi
Scala for JediScala for Jedi
Scala for Jedi
Vladimir Parfinenko
 
SDC - Einführung in Scala
SDC - Einführung in ScalaSDC - Einführung in Scala
SDC - Einführung in Scala
Christian Baranowski
 
Anti patterns
Anti patternsAnti patterns
Anti patterns
Alex Tumanoff
 
Akka
AkkaAkka

Similar to Error Handling in Scala (20)

Improving Correctness With Type - Goto Con Berlin
Improving Correctness With Type - Goto Con BerlinImproving Correctness With Type - Goto Con Berlin
Improving Correctness With Type - Goto Con Berlin
 
A Playful Introduction to Rx
A Playful Introduction to RxA Playful Introduction to Rx
A Playful Introduction to Rx
 
Scala Back to Basics: Type Classes
Scala Back to Basics: Type ClassesScala Back to Basics: Type Classes
Scala Back to Basics: Type Classes
 
Improving Correctness with Types
Improving Correctness with TypesImproving Correctness with Types
Improving Correctness with Types
 
Are we ready to Go?
Are we ready to Go?Are we ready to Go?
Are we ready to Go?
 
Functional DDD
Functional DDDFunctional DDD
Functional DDD
 
ddd+scala
ddd+scaladdd+scala
ddd+scala
 
Taming Distribution: Formal Protocols for Akka Typed
Taming Distribution: Formal Protocols for Akka TypedTaming Distribution: Formal Protocols for Akka Typed
Taming Distribution: Formal Protocols for Akka Typed
 
aming distribution: formal protocols for Akka Typed
aming distribution: formal protocols for Akka Typedaming distribution: formal protocols for Akka Typed
aming distribution: formal protocols for Akka Typed
 
Simpler java
Simpler javaSimpler java
Simpler java
 
JAVA.Q4 Create a Time class. This class will represent a point in.pdf
JAVA.Q4 Create a Time class. This class will represent a point in.pdfJAVA.Q4 Create a Time class. This class will represent a point in.pdf
JAVA.Q4 Create a Time class. This class will represent a point in.pdf
 
Kamil Chmielewski, Jacek Juraszek - "Hadoop. W poszukiwaniu złotego młotka."
Kamil Chmielewski, Jacek Juraszek - "Hadoop. W poszukiwaniu złotego młotka."Kamil Chmielewski, Jacek Juraszek - "Hadoop. W poszukiwaniu złotego młotka."
Kamil Chmielewski, Jacek Juraszek - "Hadoop. W poszukiwaniu złotego młotka."
 
Functions, Types, Programs and Effects
Functions, Types, Programs and EffectsFunctions, Types, Programs and Effects
Functions, Types, Programs and Effects
 
Improving Correctness with Types Kats Conf
Improving Correctness with Types Kats ConfImproving Correctness with Types Kats Conf
Improving Correctness with Types Kats Conf
 
Monads - Dublin Scala meetup
Monads - Dublin Scala meetupMonads - Dublin Scala meetup
Monads - Dublin Scala meetup
 
Swift Rocks #2: Going functional
Swift Rocks #2: Going functionalSwift Rocks #2: Going functional
Swift Rocks #2: Going functional
 
Scala for Jedi
Scala for JediScala for Jedi
Scala for Jedi
 
SDC - Einführung in Scala
SDC - Einführung in ScalaSDC - Einführung in Scala
SDC - Einführung in Scala
 
Anti patterns
Anti patternsAnti patterns
Anti patterns
 
Akka
AkkaAkka
Akka
 

More from Daniel Pfeiffer

Event Sourcing without any Framework
Event Sourcing without any FrameworkEvent Sourcing without any Framework
Event Sourcing without any Framework
Daniel Pfeiffer
 
cats.effect.IO - Scala Vienna Meetup February 2019
cats.effect.IO - Scala Vienna Meetup February 2019cats.effect.IO - Scala Vienna Meetup February 2019
cats.effect.IO - Scala Vienna Meetup February 2019
Daniel Pfeiffer
 
The Monolith First Strategy!
The Monolith First Strategy!The Monolith First Strategy!
The Monolith First Strategy!
Daniel Pfeiffer
 
Play on Docker
Play on DockerPlay on Docker
Play on Docker
Daniel Pfeiffer
 
Event Sourcing on AWS Using Akka in Java
Event Sourcing on AWS Using Akka in JavaEvent Sourcing on AWS Using Akka in Java
Event Sourcing on AWS Using Akka in Java
Daniel Pfeiffer
 
Event Sourcing using Akka on AWS
Event Sourcing using Akka on AWSEvent Sourcing using Akka on AWS
Event Sourcing using Akka on AWS
Daniel Pfeiffer
 

More from Daniel Pfeiffer (6)

Event Sourcing without any Framework
Event Sourcing without any FrameworkEvent Sourcing without any Framework
Event Sourcing without any Framework
 
cats.effect.IO - Scala Vienna Meetup February 2019
cats.effect.IO - Scala Vienna Meetup February 2019cats.effect.IO - Scala Vienna Meetup February 2019
cats.effect.IO - Scala Vienna Meetup February 2019
 
The Monolith First Strategy!
The Monolith First Strategy!The Monolith First Strategy!
The Monolith First Strategy!
 
Play on Docker
Play on DockerPlay on Docker
Play on Docker
 
Event Sourcing on AWS Using Akka in Java
Event Sourcing on AWS Using Akka in JavaEvent Sourcing on AWS Using Akka in Java
Event Sourcing on AWS Using Akka in Java
 
Event Sourcing using Akka on AWS
Event Sourcing using Akka on AWSEvent Sourcing using Akka on AWS
Event Sourcing using Akka on AWS
 

Recently uploaded

Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 

Error Handling in Scala