SlideShare une entreprise Scribd logo
1  sur  35
Télécharger pour lire hors ligne
CAVE - an overview 
Val Dumitrescu 
Paweł Raszewski
Another monitoring solution? 
At GILT: 
● OpenTSDB + Nagios 
● DataDog 
● NewRelic 
● Notifications with PagerDuty
What is CAVE? 
Continuous 
Audit 
Vault 
Enterprise
What is CAVE? 
A monitoring system that is: 
● secure 
● independent 
● proprietary 
● open source
Requirements 
● horizontally scalable to millions of metrics, alerts 
● multi-tenant, multi-user 
● extensible HTTP-based API 
● flexible metric definition 
● data aggregation / multiple dimensions 
● flexible and extensible alert grammar 
● pluggable notification delivery system 
● clean user interface for graphing and dashboarding
Architecture
Architecture
Architecture
Architecture
Architecture
Architecture
Architecture
Alert Grammar 
Metric has name and tags (key-value pairs) 
e.g. 
orders [shipTo: US] 
response-time [svc: svc-important, env: prod]
Alert Grammar 
Aggregated Metric has metric, aggregator and 
period of aggregation, e.g. 
orders [shipTo: US].sum.5m 
response-time [svc: svc-important, env: prod].p99.5m 
Supported aggregators: 
count, min, max, mean, mode, median, sum 
stddev, p99, p999, p95, p90
Alert Grammar 
Alert Condition contains one expression with 
two terms and an operator. Each term is a 
metric, an aggregated metric or a value. 
e.g. 
orders [shipTo: US].sum.5m < 10 
orders [shipTo: US].sum.5m < ordersPredictedLow [shipTo: US]
Alert Grammar 
An optional number of times the threshold is 
broken, e.g. 
response-time [svc: svc-team, env: prod].p99.5m > 3000 at least 
3 times
Alert Grammar 
Special format for missing data 
e.g. 
orders [shipTo: US] missing for 5m 
heartbeat [svc: svc-important, env: prod] missing for 10m
Alert Grammar 
trait AlertParser extends JavaTokenParsers { 
sealed trait Source 
case class ValueSource(value: Double) extends Source 
case class MetricSource( 
metric: String, tags: Map[String, String]) extends Source 
case class AggregatedSource( 
metricSource: MetricSource, 
aggregator: Aggregator, duration: FiniteDuration) extends Source 
sealed trait AlertEntity 
case class SimpleAlert( 
sourceLeft: Source, operator: Operator, 
sourceRight: Source, times: Int) extends AlertEntity 
case class MissingDataAlert( 
metricSource: MetricSource, duration: FiniteDuration) extends AlertEntity 
… 
}
Alert Grammar 
trait AlertParser extends JavaTokenParsers { 
… 
def valueSource: Parser[ValueSource] = decimalNumber ^^ { 
case num => ValueSource(num.toDouble) 
} 
def word: Parser[String] = """[a-zA-Z][a-zA-Z0-9.-]*""".r 
def metricTag: Parser[(String, String)] = (word <~ ":") ~ word ^^ { 
case key ~ value => key -> value 
} 
def metricTags: Parser[Map[String, String]] = repsep(metricTag, ",") ^^ { 
case list => list.toMap 
} 
… 
}
Alert Grammar 
trait AlertParser extends JavaTokenParsers { 
… 
def metricSourceWithTags: Parser[MetricSource] = 
(word <~ "[") ~ (metricTags <~ "]") ^^ { 
case metric ~ tagMap => MetricSource(metric, tagMap) 
} 
def metricSourceWithoutTags: Parser[MetricSource] = word ^^ { 
case metric => MetricSource(metric, Map.empty[String, String]) 
} 
def metricSource = metricSourceWithTags | metricSourceWithoutTags 
… 
}
Alert Grammar 
trait AlertParser extends JavaTokenParsers { 
… 
def duration: Parser[FiniteDuration] = wholeNumber ~ ("s"|"m"|"h"|"d") ^^ { 
case time ~ "s" => time.toInt.seconds 
case time ~ "m" => time.toInt.minutes 
case time ~ "h" => time.toInt.hours 
case time ~ "d" => time.toInt.days 
} 
def aggregatedSource: Parser[AggregatedSource] = 
(metricSource <~ ".") ~ (aggregator <~ ".") ~ duration ^^ { 
case met ~ agg ~ dur => AggregatedSource(met, agg, dur) 
} 
def anySource: Parser[Source] = valueSource | aggregatedSource | metricSource 
… 
}
Alert Grammar 
trait AlertParser extends JavaTokenParsers { 
… 
def missingDataAlert: Parser[MissingDataAlert] = 
metricSource ~ "missing for" ~ duration ^^ { 
case source ~ _ ~ d => MissingDataAlert(source, d) 
} 
def simpleAlert: Parser[SimpleAlert] = anySource ~ operator ~ anySource ^^ { 
case left ~ op ~ right => SimpleAlert(left, op, right, 1) 
} 
def repeater: Parser[Int] = "at least" ~ wholeNumber ~ "times" ^^ { 
case _ ~ num ~ _ => num.toInt 
} 
def simpleAlertWithRepeater: Parser[SimpleAlert] = 
anySource ~ operator ~ anySource ~ repeater ^^ { 
case left ~ op ~ right ~ num => SimpleAlert(left, op, right, num) 
}
Alert Grammar 
trait AlertParser extends JavaTokenParsers { 
… 
def anyAlert: Parser[AlertEntity] = 
missingDataAlert | simpleAlertWithRepeater | simpleAlert 
} 
Usage: 
class Something(conditionString: String) extends AlertParser { 
… 
parseAll(anyAlert, conditionString) match { 
case Success(SimpleAlert(left, op, right, times), _) => … 
case Success(MissingDataAlert(metric, duration), _) => … 
case Failure(message, _) => … 
} 
}
Slick 
Functional Relational Mapping (FRM) 
library for Scala 
Slick <> Hibernate
Slick 
compile-time safety 
no need to write SQL 
full control over what is going on
Scala Collections API 
case class Person(id: Int, name: String) 
val list = List(Person(1, "Pawel"), 
Person(2, "Val"), 
Person(3, "Unknown Name"))
Scala Collections API 
case class Person(id: Int, name: String) 
val list = List(Person(1, "Pawel"), 
Person(2, "Val"), 
Person(3, "Unknown Name")) 
list.filter(_.id > 1)
Scala Collections API 
case class Person(id: Int, name: String) 
val list = List(Person(1, "Pawel"), 
Person(2, "Val"), 
Person(3, "Unknown Name")) 
list.filter(_.id > 1).map(_.name)
Scala Collections API 
case class Person(id: Int, name: String) 
val list = List(Person(1, "Pawel"), 
Person(2, "Val"), 
Person(3, "Unknown Name")) 
list.filter(_.id > 1).map(_.name) 
SELECT name FROM list WHERE id > 1
Schema 
ORGANIZATIONS TEAMS
Entity mapping 
/** Table description of table orgs.*/ 
class OrganizationsTable(tag: Tag) extends Table[OrganizationsRow](tag,"organizations") { 
... 
/** Database column id AutoInc, PrimaryKey */ 
val id: Column[Long] = column[Long]("id", O.AutoInc, O.PrimaryKey) 
/** Database column name */ 
val name: Column[String] = column[String]("name") 
/** Database column created_at */ 
val createdAt: Column[java.sql.Timestamp] = column[java.sql.Timestamp]("created_at") 
… 
/** Foreign key referencing Organizations (database name token_organization_fk) */ 
lazy val organizationsFk = foreignKey("token_organization_fk", organizationId, 
Organizations)(r => r.id, onUpdate = ForeignKeyAction.NoAction, onDelete = 
ForeignKeyAction.NoAction) 
}
CRUD 
val organizationsTable = TableQuery[OrganizationsTable] 
// SELECT * FROM ORGANIZATIONS 
organizationsTable.list 
// SELECT * FROM ORGANIZATIONS WHERE ID > 10 OFFSET 3 LIMIT 5 
organizationsTable.filter(_.id > 10).drop(3).take(5).list 
// INSERT 
organizationsTable += OrganizationsRow(1, "name", "email", "notificationUrl", ... , None, 
None) 
// UPDATE ORGANIZATIONS SET name = “new org name” WHERE ID=10 
organizationsTable.filter(_.id === 10).map(_.name).update("new org name") 
// DELETE FROM ORGANIZATIONS WHERE ID=10 
organizationsTable.filter(_.id === 10).delete
Queries - JOINS 
val organizationsTable = TableQuery[OrganizationsTable] 
val teamsTable = TableQuery[TeamsTable] 
val name = “teamName” 
val result = for { 
t <- teamsTable.sortBy(_.createdAt).filter(t => t.deletedAt.isEmpty) 
o <- t.organization.filter(o => o.deletedAt.isEmpty && o.name === name) 
} yield (t.name, o.name) 
SELECT t.name, o.name FROM TEAMS t 
LEFT JOIN ORGANIZATIONS o ON t.organization_id = o.id 
WHERE t.deleted_at IS NULL AND o.deleted_at IS NULL AND o.name = `teamName` 
ORDER BY t.created_at
SELECT t.name, o.name FROM TEAMS t 
LEFT JOIN ORGANIZATIONS o ON t.organization_id = o.id 
WHERE t.deleted_at IS NULL AND o.deleted_at IS NULL AND o.name = `teamName` 
ORDER BY t.created_at 
val result: List[(String, String)]
Connection pool and transactions 
val ds = new BoneCPDataSource 
val db = { 
ds.setDriverClass(rdsDriver) 
ds.setJdbcUrl(rdsJdbcConnectionString) 
ds.setPassword(rdsPassword) 
ds.setUser(rdsUser) 
Database.forDataSource(ds) 
} 
db.withTransaction { implicit session => 
// SLICK CODE GOES HERE 
}

Contenu connexe

Tendances

A evolução da persistência de dados (com sqlite) no android
A evolução da persistência de dados (com sqlite) no androidA evolução da persistência de dados (com sqlite) no android
A evolução da persistência de dados (com sqlite) no androidRodrigo de Souza Castro
 
mobl presentation @ IHomer
mobl presentation @ IHomermobl presentation @ IHomer
mobl presentation @ IHomerzefhemel
 
LetSwift RxSwift 시작하기
LetSwift RxSwift 시작하기LetSwift RxSwift 시작하기
LetSwift RxSwift 시작하기Wanbok Choi
 
Tutorial, Part 3: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 3: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...Tutorial, Part 3: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 3: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...SPTechCon
 
Event sourcing in the functional world (22 07-2021)
Event sourcing in the functional world (22 07-2021)Event sourcing in the functional world (22 07-2021)
Event sourcing in the functional world (22 07-2021)Vitaly Brusentsev
 
Scalding - Hadoop Word Count in LESS than 70 lines of code
Scalding - Hadoop Word Count in LESS than 70 lines of codeScalding - Hadoop Word Count in LESS than 70 lines of code
Scalding - Hadoop Word Count in LESS than 70 lines of codeKonrad Malawski
 
JDD 2016 - Pawel Byszewski - Kotlin, why?
JDD 2016 - Pawel Byszewski - Kotlin, why?JDD 2016 - Pawel Byszewski - Kotlin, why?
JDD 2016 - Pawel Byszewski - Kotlin, why?PROIDEA
 
Apache Spark - Key-Value RDD | Big Data Hadoop Spark Tutorial | CloudxLab
Apache Spark - Key-Value RDD | Big Data Hadoop Spark Tutorial | CloudxLabApache Spark - Key-Value RDD | Big Data Hadoop Spark Tutorial | CloudxLab
Apache Spark - Key-Value RDD | Big Data Hadoop Spark Tutorial | CloudxLabCloudxLab
 
New SPL Features in PHP 5.3
New SPL Features in PHP 5.3New SPL Features in PHP 5.3
New SPL Features in PHP 5.3Matthew Turland
 
Javascript built in String Functions
Javascript built in String FunctionsJavascript built in String Functions
Javascript built in String FunctionsAvanitrambadiya
 
Apache Spark - Key Value RDD - Transformations | Big Data Hadoop Spark Tutori...
Apache Spark - Key Value RDD - Transformations | Big Data Hadoop Spark Tutori...Apache Spark - Key Value RDD - Transformations | Big Data Hadoop Spark Tutori...
Apache Spark - Key Value RDD - Transformations | Big Data Hadoop Spark Tutori...CloudxLab
 
Windows 8 metro applications
Windows 8 metro applicationsWindows 8 metro applications
Windows 8 metro applicationsAlex Golesh
 
JAVA 8 : Migration et enjeux stratégiques en entreprise
JAVA 8 : Migration et enjeux stratégiques en entrepriseJAVA 8 : Migration et enjeux stratégiques en entreprise
JAVA 8 : Migration et enjeux stratégiques en entrepriseSOAT
 
Big Data Everywhere Chicago: Unleash the Power of HBase Shell (Conversant)
Big Data Everywhere Chicago: Unleash the Power of HBase Shell (Conversant) Big Data Everywhere Chicago: Unleash the Power of HBase Shell (Conversant)
Big Data Everywhere Chicago: Unleash the Power of HBase Shell (Conversant) BigDataEverywhere
 
JavaScript Functions
JavaScript Functions JavaScript Functions
JavaScript Functions Reem Alattas
 
Backbone.js: Run your Application Inside The Browser
Backbone.js: Run your Application Inside The BrowserBackbone.js: Run your Application Inside The Browser
Backbone.js: Run your Application Inside The BrowserHoward Lewis Ship
 
20070329 Java Programing Tips
20070329 Java Programing Tips20070329 Java Programing Tips
20070329 Java Programing TipsShingo Furuyama
 

Tendances (20)

A evolução da persistência de dados (com sqlite) no android
A evolução da persistência de dados (com sqlite) no androidA evolução da persistência de dados (com sqlite) no android
A evolução da persistência de dados (com sqlite) no android
 
What is new in Java 8
What is new in Java 8What is new in Java 8
What is new in Java 8
 
mobl presentation @ IHomer
mobl presentation @ IHomermobl presentation @ IHomer
mobl presentation @ IHomer
 
LetSwift RxSwift 시작하기
LetSwift RxSwift 시작하기LetSwift RxSwift 시작하기
LetSwift RxSwift 시작하기
 
Tutorial, Part 3: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 3: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...Tutorial, Part 3: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 3: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
 
Event sourcing in the functional world (22 07-2021)
Event sourcing in the functional world (22 07-2021)Event sourcing in the functional world (22 07-2021)
Event sourcing in the functional world (22 07-2021)
 
Scalding - Hadoop Word Count in LESS than 70 lines of code
Scalding - Hadoop Word Count in LESS than 70 lines of codeScalding - Hadoop Word Count in LESS than 70 lines of code
Scalding - Hadoop Word Count in LESS than 70 lines of code
 
Bioinformatics p5-bioperlv2014
Bioinformatics p5-bioperlv2014Bioinformatics p5-bioperlv2014
Bioinformatics p5-bioperlv2014
 
JDD 2016 - Pawel Byszewski - Kotlin, why?
JDD 2016 - Pawel Byszewski - Kotlin, why?JDD 2016 - Pawel Byszewski - Kotlin, why?
JDD 2016 - Pawel Byszewski - Kotlin, why?
 
Apache Spark - Key-Value RDD | Big Data Hadoop Spark Tutorial | CloudxLab
Apache Spark - Key-Value RDD | Big Data Hadoop Spark Tutorial | CloudxLabApache Spark - Key-Value RDD | Big Data Hadoop Spark Tutorial | CloudxLab
Apache Spark - Key-Value RDD | Big Data Hadoop Spark Tutorial | CloudxLab
 
New SPL Features in PHP 5.3
New SPL Features in PHP 5.3New SPL Features in PHP 5.3
New SPL Features in PHP 5.3
 
Javascript built in String Functions
Javascript built in String FunctionsJavascript built in String Functions
Javascript built in String Functions
 
Apache Spark - Key Value RDD - Transformations | Big Data Hadoop Spark Tutori...
Apache Spark - Key Value RDD - Transformations | Big Data Hadoop Spark Tutori...Apache Spark - Key Value RDD - Transformations | Big Data Hadoop Spark Tutori...
Apache Spark - Key Value RDD - Transformations | Big Data Hadoop Spark Tutori...
 
Windows 8 metro applications
Windows 8 metro applicationsWindows 8 metro applications
Windows 8 metro applications
 
Java script arrays
Java script arraysJava script arrays
Java script arrays
 
JAVA 8 : Migration et enjeux stratégiques en entreprise
JAVA 8 : Migration et enjeux stratégiques en entrepriseJAVA 8 : Migration et enjeux stratégiques en entreprise
JAVA 8 : Migration et enjeux stratégiques en entreprise
 
Big Data Everywhere Chicago: Unleash the Power of HBase Shell (Conversant)
Big Data Everywhere Chicago: Unleash the Power of HBase Shell (Conversant) Big Data Everywhere Chicago: Unleash the Power of HBase Shell (Conversant)
Big Data Everywhere Chicago: Unleash the Power of HBase Shell (Conversant)
 
JavaScript Functions
JavaScript Functions JavaScript Functions
JavaScript Functions
 
Backbone.js: Run your Application Inside The Browser
Backbone.js: Run your Application Inside The BrowserBackbone.js: Run your Application Inside The Browser
Backbone.js: Run your Application Inside The Browser
 
20070329 Java Programing Tips
20070329 Java Programing Tips20070329 Java Programing Tips
20070329 Java Programing Tips
 

En vedette

Building a JavaScript Module Framework at Gilt
Building a JavaScript Module Framework at GiltBuilding a JavaScript Module Framework at Gilt
Building a JavaScript Module Framework at GiltEric Shepherd
 
Dsug 05 02-15 - ScalDI - lightweight DI in Scala
Dsug 05 02-15 - ScalDI - lightweight DI in ScalaDsug 05 02-15 - ScalDI - lightweight DI in Scala
Dsug 05 02-15 - ScalDI - lightweight DI in ScalaUgo Matrangolo
 
“Get Stuff Done Faster: Why Engineers Should Work with the ‘Dark Side’ of Tech”
“Get Stuff Done Faster: Why Engineers Should Work with the ‘Dark Side’ of Tech”“Get Stuff Done Faster: Why Engineers Should Work with the ‘Dark Side’ of Tech”
“Get Stuff Done Faster: Why Engineers Should Work with the ‘Dark Side’ of Tech”Gilt Tech Talks
 
Mobile Design at Gilt
Mobile Design at GiltMobile Design at Gilt
Mobile Design at GiltDavid Park
 
tvOS, The Focus Engine, and Swift
tvOS, The Focus Engine, and SwifttvOS, The Focus Engine, and Swift
tvOS, The Focus Engine, and SwiftEvan Maloney
 
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...C4Media
 
Scaling micro services at gilt
Scaling micro services at giltScaling micro services at gilt
Scaling micro services at giltAdrian Trenaman
 

En vedette (7)

Building a JavaScript Module Framework at Gilt
Building a JavaScript Module Framework at GiltBuilding a JavaScript Module Framework at Gilt
Building a JavaScript Module Framework at Gilt
 
Dsug 05 02-15 - ScalDI - lightweight DI in Scala
Dsug 05 02-15 - ScalDI - lightweight DI in ScalaDsug 05 02-15 - ScalDI - lightweight DI in Scala
Dsug 05 02-15 - ScalDI - lightweight DI in Scala
 
“Get Stuff Done Faster: Why Engineers Should Work with the ‘Dark Side’ of Tech”
“Get Stuff Done Faster: Why Engineers Should Work with the ‘Dark Side’ of Tech”“Get Stuff Done Faster: Why Engineers Should Work with the ‘Dark Side’ of Tech”
“Get Stuff Done Faster: Why Engineers Should Work with the ‘Dark Side’ of Tech”
 
Mobile Design at Gilt
Mobile Design at GiltMobile Design at Gilt
Mobile Design at Gilt
 
tvOS, The Focus Engine, and Swift
tvOS, The Focus Engine, and SwifttvOS, The Focus Engine, and Swift
tvOS, The Focus Engine, and Swift
 
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
 
Scaling micro services at gilt
Scaling micro services at giltScaling micro services at gilt
Scaling micro services at gilt
 

Similaire à CAVE Overview

Swift Sequences & Collections
Swift Sequences & CollectionsSwift Sequences & Collections
Swift Sequences & CollectionsCocoaHeads France
 
Improving Correctness with Types
Improving Correctness with TypesImproving Correctness with Types
Improving Correctness with TypesIain Hull
 
Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...
Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...
Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...randyguck
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfHiroshi Ono
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfHiroshi Ono
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfHiroshi Ono
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfHiroshi Ono
 
Altitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, Ever
Altitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, EverAltitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, Ever
Altitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, EverFastly
 
Beginning Scala Svcc 2009
Beginning Scala Svcc 2009Beginning Scala Svcc 2009
Beginning Scala Svcc 2009David Pollak
 
Wprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data EcosystemWprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data EcosystemSages
 
Logstash-Elasticsearch-Kibana
Logstash-Elasticsearch-KibanaLogstash-Elasticsearch-Kibana
Logstash-Elasticsearch-Kibanadknx01
 
Scala presentation by Aleksandar Prokopec
Scala presentation by Aleksandar ProkopecScala presentation by Aleksandar Prokopec
Scala presentation by Aleksandar ProkopecLoïc Descotte
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with ClojureDmitry Buzdin
 
Ti1220 Lecture 7: Polymorphism
Ti1220 Lecture 7: PolymorphismTi1220 Lecture 7: Polymorphism
Ti1220 Lecture 7: PolymorphismEelco Visser
 
Big Data LDN 2017: Processing Fast Data With Apache Spark: the Tale of Two APIs
Big Data LDN 2017: Processing Fast Data With Apache Spark: the Tale of Two APIsBig Data LDN 2017: Processing Fast Data With Apache Spark: the Tale of Two APIs
Big Data LDN 2017: Processing Fast Data With Apache Spark: the Tale of Two APIsMatt Stubbs
 
Tools for Making Machine Learning more Reactive
Tools for Making Machine Learning more ReactiveTools for Making Machine Learning more Reactive
Tools for Making Machine Learning more ReactiveJeff Smith
 

Similaire à CAVE Overview (20)

Swift Sequences & Collections
Swift Sequences & CollectionsSwift Sequences & Collections
Swift Sequences & Collections
 
Improving Correctness with Types
Improving Correctness with TypesImproving Correctness with Types
Improving Correctness with Types
 
Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...
Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...
Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
 
Practical cats
Practical catsPractical cats
Practical cats
 
Altitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, Ever
Altitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, EverAltitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, Ever
Altitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, Ever
 
Beginning Scala Svcc 2009
Beginning Scala Svcc 2009Beginning Scala Svcc 2009
Beginning Scala Svcc 2009
 
Spark workshop
Spark workshopSpark workshop
Spark workshop
 
Wprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data EcosystemWprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
 
Logstash-Elasticsearch-Kibana
Logstash-Elasticsearch-KibanaLogstash-Elasticsearch-Kibana
Logstash-Elasticsearch-Kibana
 
Solr @ Etsy - Apache Lucene Eurocon
Solr @ Etsy - Apache Lucene EuroconSolr @ Etsy - Apache Lucene Eurocon
Solr @ Etsy - Apache Lucene Eurocon
 
Scala presentation by Aleksandar Prokopec
Scala presentation by Aleksandar ProkopecScala presentation by Aleksandar Prokopec
Scala presentation by Aleksandar Prokopec
 
How te bring common UI patterns to ADF
How te bring common UI patterns to ADFHow te bring common UI patterns to ADF
How te bring common UI patterns to ADF
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
 
Ti1220 Lecture 7: Polymorphism
Ti1220 Lecture 7: PolymorphismTi1220 Lecture 7: Polymorphism
Ti1220 Lecture 7: Polymorphism
 
Big Data LDN 2017: Processing Fast Data With Apache Spark: the Tale of Two APIs
Big Data LDN 2017: Processing Fast Data With Apache Spark: the Tale of Two APIsBig Data LDN 2017: Processing Fast Data With Apache Spark: the Tale of Two APIs
Big Data LDN 2017: Processing Fast Data With Apache Spark: the Tale of Two APIs
 
Tools for Making Machine Learning more Reactive
Tools for Making Machine Learning more ReactiveTools for Making Machine Learning more Reactive
Tools for Making Machine Learning more Reactive
 

Dernier

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 

Dernier (20)

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 

CAVE Overview

  • 1. CAVE - an overview Val Dumitrescu Paweł Raszewski
  • 2. Another monitoring solution? At GILT: ● OpenTSDB + Nagios ● DataDog ● NewRelic ● Notifications with PagerDuty
  • 3. What is CAVE? Continuous Audit Vault Enterprise
  • 4. What is CAVE? A monitoring system that is: ● secure ● independent ● proprietary ● open source
  • 5. Requirements ● horizontally scalable to millions of metrics, alerts ● multi-tenant, multi-user ● extensible HTTP-based API ● flexible metric definition ● data aggregation / multiple dimensions ● flexible and extensible alert grammar ● pluggable notification delivery system ● clean user interface for graphing and dashboarding
  • 13. Alert Grammar Metric has name and tags (key-value pairs) e.g. orders [shipTo: US] response-time [svc: svc-important, env: prod]
  • 14. Alert Grammar Aggregated Metric has metric, aggregator and period of aggregation, e.g. orders [shipTo: US].sum.5m response-time [svc: svc-important, env: prod].p99.5m Supported aggregators: count, min, max, mean, mode, median, sum stddev, p99, p999, p95, p90
  • 15. Alert Grammar Alert Condition contains one expression with two terms and an operator. Each term is a metric, an aggregated metric or a value. e.g. orders [shipTo: US].sum.5m < 10 orders [shipTo: US].sum.5m < ordersPredictedLow [shipTo: US]
  • 16. Alert Grammar An optional number of times the threshold is broken, e.g. response-time [svc: svc-team, env: prod].p99.5m > 3000 at least 3 times
  • 17. Alert Grammar Special format for missing data e.g. orders [shipTo: US] missing for 5m heartbeat [svc: svc-important, env: prod] missing for 10m
  • 18. Alert Grammar trait AlertParser extends JavaTokenParsers { sealed trait Source case class ValueSource(value: Double) extends Source case class MetricSource( metric: String, tags: Map[String, String]) extends Source case class AggregatedSource( metricSource: MetricSource, aggregator: Aggregator, duration: FiniteDuration) extends Source sealed trait AlertEntity case class SimpleAlert( sourceLeft: Source, operator: Operator, sourceRight: Source, times: Int) extends AlertEntity case class MissingDataAlert( metricSource: MetricSource, duration: FiniteDuration) extends AlertEntity … }
  • 19. Alert Grammar trait AlertParser extends JavaTokenParsers { … def valueSource: Parser[ValueSource] = decimalNumber ^^ { case num => ValueSource(num.toDouble) } def word: Parser[String] = """[a-zA-Z][a-zA-Z0-9.-]*""".r def metricTag: Parser[(String, String)] = (word <~ ":") ~ word ^^ { case key ~ value => key -> value } def metricTags: Parser[Map[String, String]] = repsep(metricTag, ",") ^^ { case list => list.toMap } … }
  • 20. Alert Grammar trait AlertParser extends JavaTokenParsers { … def metricSourceWithTags: Parser[MetricSource] = (word <~ "[") ~ (metricTags <~ "]") ^^ { case metric ~ tagMap => MetricSource(metric, tagMap) } def metricSourceWithoutTags: Parser[MetricSource] = word ^^ { case metric => MetricSource(metric, Map.empty[String, String]) } def metricSource = metricSourceWithTags | metricSourceWithoutTags … }
  • 21. Alert Grammar trait AlertParser extends JavaTokenParsers { … def duration: Parser[FiniteDuration] = wholeNumber ~ ("s"|"m"|"h"|"d") ^^ { case time ~ "s" => time.toInt.seconds case time ~ "m" => time.toInt.minutes case time ~ "h" => time.toInt.hours case time ~ "d" => time.toInt.days } def aggregatedSource: Parser[AggregatedSource] = (metricSource <~ ".") ~ (aggregator <~ ".") ~ duration ^^ { case met ~ agg ~ dur => AggregatedSource(met, agg, dur) } def anySource: Parser[Source] = valueSource | aggregatedSource | metricSource … }
  • 22. Alert Grammar trait AlertParser extends JavaTokenParsers { … def missingDataAlert: Parser[MissingDataAlert] = metricSource ~ "missing for" ~ duration ^^ { case source ~ _ ~ d => MissingDataAlert(source, d) } def simpleAlert: Parser[SimpleAlert] = anySource ~ operator ~ anySource ^^ { case left ~ op ~ right => SimpleAlert(left, op, right, 1) } def repeater: Parser[Int] = "at least" ~ wholeNumber ~ "times" ^^ { case _ ~ num ~ _ => num.toInt } def simpleAlertWithRepeater: Parser[SimpleAlert] = anySource ~ operator ~ anySource ~ repeater ^^ { case left ~ op ~ right ~ num => SimpleAlert(left, op, right, num) }
  • 23. Alert Grammar trait AlertParser extends JavaTokenParsers { … def anyAlert: Parser[AlertEntity] = missingDataAlert | simpleAlertWithRepeater | simpleAlert } Usage: class Something(conditionString: String) extends AlertParser { … parseAll(anyAlert, conditionString) match { case Success(SimpleAlert(left, op, right, times), _) => … case Success(MissingDataAlert(metric, duration), _) => … case Failure(message, _) => … } }
  • 24. Slick Functional Relational Mapping (FRM) library for Scala Slick <> Hibernate
  • 25. Slick compile-time safety no need to write SQL full control over what is going on
  • 26. Scala Collections API case class Person(id: Int, name: String) val list = List(Person(1, "Pawel"), Person(2, "Val"), Person(3, "Unknown Name"))
  • 27. Scala Collections API case class Person(id: Int, name: String) val list = List(Person(1, "Pawel"), Person(2, "Val"), Person(3, "Unknown Name")) list.filter(_.id > 1)
  • 28. Scala Collections API case class Person(id: Int, name: String) val list = List(Person(1, "Pawel"), Person(2, "Val"), Person(3, "Unknown Name")) list.filter(_.id > 1).map(_.name)
  • 29. Scala Collections API case class Person(id: Int, name: String) val list = List(Person(1, "Pawel"), Person(2, "Val"), Person(3, "Unknown Name")) list.filter(_.id > 1).map(_.name) SELECT name FROM list WHERE id > 1
  • 31. Entity mapping /** Table description of table orgs.*/ class OrganizationsTable(tag: Tag) extends Table[OrganizationsRow](tag,"organizations") { ... /** Database column id AutoInc, PrimaryKey */ val id: Column[Long] = column[Long]("id", O.AutoInc, O.PrimaryKey) /** Database column name */ val name: Column[String] = column[String]("name") /** Database column created_at */ val createdAt: Column[java.sql.Timestamp] = column[java.sql.Timestamp]("created_at") … /** Foreign key referencing Organizations (database name token_organization_fk) */ lazy val organizationsFk = foreignKey("token_organization_fk", organizationId, Organizations)(r => r.id, onUpdate = ForeignKeyAction.NoAction, onDelete = ForeignKeyAction.NoAction) }
  • 32. CRUD val organizationsTable = TableQuery[OrganizationsTable] // SELECT * FROM ORGANIZATIONS organizationsTable.list // SELECT * FROM ORGANIZATIONS WHERE ID > 10 OFFSET 3 LIMIT 5 organizationsTable.filter(_.id > 10).drop(3).take(5).list // INSERT organizationsTable += OrganizationsRow(1, "name", "email", "notificationUrl", ... , None, None) // UPDATE ORGANIZATIONS SET name = “new org name” WHERE ID=10 organizationsTable.filter(_.id === 10).map(_.name).update("new org name") // DELETE FROM ORGANIZATIONS WHERE ID=10 organizationsTable.filter(_.id === 10).delete
  • 33. Queries - JOINS val organizationsTable = TableQuery[OrganizationsTable] val teamsTable = TableQuery[TeamsTable] val name = “teamName” val result = for { t <- teamsTable.sortBy(_.createdAt).filter(t => t.deletedAt.isEmpty) o <- t.organization.filter(o => o.deletedAt.isEmpty && o.name === name) } yield (t.name, o.name) SELECT t.name, o.name FROM TEAMS t LEFT JOIN ORGANIZATIONS o ON t.organization_id = o.id WHERE t.deleted_at IS NULL AND o.deleted_at IS NULL AND o.name = `teamName` ORDER BY t.created_at
  • 34. SELECT t.name, o.name FROM TEAMS t LEFT JOIN ORGANIZATIONS o ON t.organization_id = o.id WHERE t.deleted_at IS NULL AND o.deleted_at IS NULL AND o.name = `teamName` ORDER BY t.created_at val result: List[(String, String)]
  • 35. Connection pool and transactions val ds = new BoneCPDataSource val db = { ds.setDriverClass(rdsDriver) ds.setJdbcUrl(rdsJdbcConnectionString) ds.setPassword(rdsPassword) ds.setUser(rdsUser) Database.forDataSource(ds) } db.withTransaction { implicit session => // SLICK CODE GOES HERE }