Projects indexed in ES
Project's Progress is a real time analytics in MongoDB
Query:
Sort "OPEN" "substrate" projects by "progress"
10M Projects
100K Tickets
val sourceOne = Source(List(1,3,5,7))
val sourceTwo = Source(List(0,2,4,6))
val merged = Source.combine(sourceOne, sourceTwo)(Merge(_))
val mergedResult: Future[Int] = merged.runWith(Sink.fold(0)(_ + _)
def send(email: Email): Future[SMTPResponse] = {
// Create a connection to SMTP Agent
// Start SMTP Dialog
// Handle Exceptions
// Release resources
}
def getEmail(id): Future[Email] = {
// open a connection to DB
// Run transaction
// close the connection
// log
}
List(1 to 100).map(getEmail).map(send)
send is slow
getEmail is fast
val decider: Supervision.Decider = { case _: NonFatalException => Supervision.Resume case _ => Supervision.Stop }
Depending on the Use Case the right Framework should be used
Data Sets at least in Two Machines to run Map/Reduce on
Spectrum
basically to Create Actors
Neutron Timer Service
At Least Two Independent Activities
Neutron Data Aggregator
import scala.concurrent.Future
val futureFunction = Future {
normalFunction() }
When you are not sure to use future or not! I recommend please do use, it's very safe or When I have IO, (using "blocking" keyword)