SlideShare a Scribd company logo
NEScala2016Roundup
by @hunglin at @VideoBlocks
1
About
● A media company - Creative Content Everyone Can Afford
● Since 2011, we saved more than $5B for our customers
● We reached 1M clips of inventory + $1M marketplace
sales faster than any company in history
● 15 engineers (total 60+ employees)
2
AboutMe
● Use Scala for about 5 years
● Not using Scala day to day for the past 9 months
● Scala developer, not sorcerer.
● Data Handyman @ Videoblocks - We Heart Data
● codingphilosophy.com
3
4
● On 3/4 - 3/5
● Since 2011
● At Philadelphia this year (last year in Boston)
● 3/4: conference - 1 track, 11 talks
● 3/5: unconference - 2-5 tracks, 26 talks
● pretty academia as usual
● $60 - order of magnitude cheaper, and better
NEScala2016
5
You have to be there!
Day1:Conference
6
7
Scalaz-StreamMasterclass
● https://github.com/runarorama/ircz
● monad is just a fancy way of saying "accumulate the
effects"
● monoid is just a fancy way of saying "collect the
elements"
8
9
SparkRDD
● compile-time type safe
● api is based on Scala collection (good and bad)
10
def collect(): Array[T]
def collect[U](f: PartialFunction[T,U])(implicit arg0: ClassTag[U]): RDD[U]
//val rdd = sc.textFile("hdfs:/user/bmc/wikipedia‐pagecounts.gz")
//val parsedRDD = rdd.flatMap { line=>
// line.split("""s+""") match {
// case Array(project,_,numRequests,_)=>Some((project,numRequests))
// case_=>None
// }}
parsedRDD.filter { case (project,numRequest) => project=="en" }.
reduceByKey(_+_).
take(100).
Foreach{ case (project,requests) => println(s"$project:$requests") }
SparkDataFrame
● DSL
● Optimized by catalyst
● lost type safety
11
val df = parsedRDD.toDF("project", "numRequests")
df.groupBy($"page").
agg(sum($"numRequests").as("count")).
limit(100).
show(100)
scala>:typedf.collect()
Array[org.apache.spark.sql.Row]
SparkDataset
● DSL + RDD api
● Type safety
● Optimized
● Use Tungsten, faster (20x) and smaller (4x)
12
val df = sqlContext.read.json("people.json")
case class Person(name: String, age: Long)
val ds: Dataset[Person] = df.as[Person]
ds.groupBy(_.name).count()
experimental
13
MacrosforMortals
● illTyped from Shapeless
● AST is pretty hard to deal with
● quasiquotes: val tree = q"class C"
14
15
Logical Programming in Scala
https://github.com/stewSquared/ukanren 16
17
MonadicLogging?
● Monad to accumulate effects (log)
● Write log of the same thread together
● Write log with logic
○ if (latency > 10ms) { mlog.toStdOut }
● Maybe too complicated and defeat the purpose of
logging?
○ Async + JVM crash, how to know what's going?
18
19
StreamFrameworkComparison
● Apache Flink
● Apache Spark
● Google Cloud Dataflow
● Apache Samza
20
21
AsyncTest
● Do we need it?
● It is required by Scala.js
22
23
CBT:CommunityBuildTool
● https://github.com/cvogt/cbt
● Side project from Chris Vogt
● Write Scala code to build, instead of the DSL (black
magic) of SBT
24
25
Modularity
● We shouldn't need to Mock if we modularize our code
correctly
● https://adriaanm.github.io/files/higher.pdf
26
27
DataPipelinewithAkkaStream
● Websocket as emitter
● Kafka as queue
● Akka Stream as process engine
28
29
TypeParameterv.s.TypeMember
● Sometimes compiler has issues with type parameter
○ trait Foo[F <: Foo[T]]
30
trait Foo[+T]
trait Foo {
Type T <: Exception
}
Day2:Unconference
31
32
33
Rapture-GuavaofScala
34
● single point of failure is GREAT in code
● config through import
● Rapture JSON supports 8 JSON backend
● syntax error of html or json are checked by compiler
● use gitter to report bug to Jon
Scala.js
● All Scala code are supported, but not all libraries
● union type
● D3, react, autowire
35
SI-2712
36
Scala Issue: Implement higher-order unification for type
constructor inference.
object Test {
def meh[M[_], A](x: M[A]): M[A] = x
meh{(x: Int) => x} // should solve ?M = [X] X => X and ?A = Int ...
}
37
Resources
38
● Runar's blog: http://blog.higher-order.com/
● Slides of Brendan's talk: https://speakerdeck.com/bwmcadams/nescala-16-scala-
macros-for-mortals-or-how-i-learned-to-stop-worrying-and-mumbling-wtf
● Logic programming: https://github.com/stewSquared/ukanren
● Akka stream: https://github.com/pkinsky/akka-streams-example
● Type member vs type parameter: http://www.artima.com/weblogs/viewpost.jsp?
thread=270195
● Good blog of category theory: http://bartoszmilewski.com/2014/10/28/category-
theory-for-programmers-the-preface/
● Unconference grid: https://goo.gl/ei5ijy
● Rapture (The Grava of Scala) https://github.com/propensive/rapture
● Another javascript library in shapeless: https://github.com/travisbrown/circe
● Typesafe RPC: https://github.com/lihaoyi/autowire
● https://issues.scala-lang.org/browse/SI-2712

More Related Content

What's hot

Untitled talk at Riviera.rb
Untitled talk at Riviera.rbUntitled talk at Riviera.rb
Untitled talk at Riviera.rb
Jean-Baptiste Mazon
 
Typescript language
Typescript languageTypescript language
Typescript language
.NET Crowd
 
Last Month in PHP - December 2016
Last Month in PHP - December 2016Last Month in PHP - December 2016
Last Month in PHP - December 2016
Eric Poe
 
The working architecture of node js applications open tech week javascript ...
The working architecture of node js applications   open tech week javascript ...The working architecture of node js applications   open tech week javascript ...
The working architecture of node js applications open tech week javascript ...
Viktor Turskyi
 
Running Through Typescript
Running Through TypescriptRunning Through Typescript
Running Through Typescript
Nikhil Wanpal
 
Angular2 - A story from the trenches
Angular2 - A story from the trenchesAngular2 - A story from the trenches
Angular2 - A story from the trenches
Johannes Rudolph
 
Web Assembly
Web AssemblyWeb Assembly
Web Assembly
Valerio Como
 
NODE JS OC Meetup 1
NODE JS OC Meetup 1NODE JS OC Meetup 1
NODE JS OC Meetup 1
eddify
 
Andrew Berezovsky - Drupal 8 How to Migr8
Andrew Berezovsky - Drupal 8 How to Migr8Andrew Berezovsky - Drupal 8 How to Migr8
Andrew Berezovsky - Drupal 8 How to Migr8
DrupalSib
 
Go at Skroutz
Go at SkroutzGo at Skroutz
Go at Skroutz
AgisAnastasopoulos
 
PSGL (PlayStation Graphics Library)
PSGL (PlayStation Graphics Library)PSGL (PlayStation Graphics Library)
PSGL (PlayStation Graphics Library)
Slide_N
 
Montreal.rb ruby debugging basics - march 20th 2012
Montreal.rb   ruby debugging basics - march 20th 2012Montreal.rb   ruby debugging basics - march 20th 2012
Montreal.rb ruby debugging basics - march 20th 2012
Rafael Rosa
 
High Availability for the LAMP Stack
High Availability for the LAMP StackHigh Availability for the LAMP Stack
High Availability for the LAMP Stack
Jason Cannon
 
From silos to circles
From silos to circlesFrom silos to circles
From silos to circles
robpark68
 
ATLRUG Community Announcements for December 2016
ATLRUG Community Announcements for December 2016ATLRUG Community Announcements for December 2016
ATLRUG Community Announcements for December 2016
jasnow
 
VN Tech Seminor Vol.1
VN Tech Seminor Vol.1VN Tech Seminor Vol.1
VN Tech Seminor Vol.1
Shuhei Yamashita
 
Rails data migrations
Rails data migrationsRails data migrations
Rails data migrations
Andrei Kaleshka
 
How to sell drupal 8
How to sell drupal 8How to sell drupal 8
How to sell drupal 8
Anatolii Pazhyn
 

What's hot (18)

Untitled talk at Riviera.rb
Untitled talk at Riviera.rbUntitled talk at Riviera.rb
Untitled talk at Riviera.rb
 
Typescript language
Typescript languageTypescript language
Typescript language
 
Last Month in PHP - December 2016
Last Month in PHP - December 2016Last Month in PHP - December 2016
Last Month in PHP - December 2016
 
The working architecture of node js applications open tech week javascript ...
The working architecture of node js applications   open tech week javascript ...The working architecture of node js applications   open tech week javascript ...
The working architecture of node js applications open tech week javascript ...
 
Running Through Typescript
Running Through TypescriptRunning Through Typescript
Running Through Typescript
 
Angular2 - A story from the trenches
Angular2 - A story from the trenchesAngular2 - A story from the trenches
Angular2 - A story from the trenches
 
Web Assembly
Web AssemblyWeb Assembly
Web Assembly
 
NODE JS OC Meetup 1
NODE JS OC Meetup 1NODE JS OC Meetup 1
NODE JS OC Meetup 1
 
Andrew Berezovsky - Drupal 8 How to Migr8
Andrew Berezovsky - Drupal 8 How to Migr8Andrew Berezovsky - Drupal 8 How to Migr8
Andrew Berezovsky - Drupal 8 How to Migr8
 
Go at Skroutz
Go at SkroutzGo at Skroutz
Go at Skroutz
 
PSGL (PlayStation Graphics Library)
PSGL (PlayStation Graphics Library)PSGL (PlayStation Graphics Library)
PSGL (PlayStation Graphics Library)
 
Montreal.rb ruby debugging basics - march 20th 2012
Montreal.rb   ruby debugging basics - march 20th 2012Montreal.rb   ruby debugging basics - march 20th 2012
Montreal.rb ruby debugging basics - march 20th 2012
 
High Availability for the LAMP Stack
High Availability for the LAMP StackHigh Availability for the LAMP Stack
High Availability for the LAMP Stack
 
From silos to circles
From silos to circlesFrom silos to circles
From silos to circles
 
ATLRUG Community Announcements for December 2016
ATLRUG Community Announcements for December 2016ATLRUG Community Announcements for December 2016
ATLRUG Community Announcements for December 2016
 
VN Tech Seminor Vol.1
VN Tech Seminor Vol.1VN Tech Seminor Vol.1
VN Tech Seminor Vol.1
 
Rails data migrations
Rails data migrationsRails data migrations
Rails data migrations
 
How to sell drupal 8
How to sell drupal 8How to sell drupal 8
How to sell drupal 8
 

Similar to NE Scala 2016 roundup

DrupalCon Europe 2020 Low Code
DrupalCon Europe 2020 Low CodeDrupalCon Europe 2020 Low Code
DrupalCon Europe 2020 Low Code
Alejandro Moreno
 
Efficient Django
Efficient DjangoEfficient Django
Efficient Django
David Arcos
 
Kotlin REST & GraphQL API
Kotlin REST & GraphQL APIKotlin REST & GraphQL API
Kotlin REST & GraphQL API
Sean O'Brien
 
Accelerating Big Data beyond the JVM - Fosdem 2018
Accelerating Big Data beyond the JVM - Fosdem 2018Accelerating Big Data beyond the JVM - Fosdem 2018
Accelerating Big Data beyond the JVM - Fosdem 2018
Holden Karau
 
Are general purpose big data systems eating the world?
Are general purpose big data systems eating the world?Are general purpose big data systems eating the world?
Are general purpose big data systems eating the world?
Holden Karau
 
Sharing (or stealing) the jewels of python with big data &amp; the jvm (1)
Sharing (or stealing) the jewels of python with big data &amp; the jvm (1)Sharing (or stealing) the jewels of python with big data &amp; the jvm (1)
Sharing (or stealing) the jewels of python with big data &amp; the jvm (1)
Holden Karau
 
Scala Days Highlights | BoldRadius
Scala Days Highlights | BoldRadiusScala Days Highlights | BoldRadius
Scala Days Highlights | BoldRadius
BoldRadius Solutions
 
Ecma6 in the wild
Ecma6 in the wildEcma6 in the wild
Ecma6 in the wild
Codecamp Romania
 
Ecma6 in the wild
Ecma6 in the wildEcma6 in the wild
Ecma6 in the wild
Codecamp Romania
 
Introduction to Idem for Microsoft Azure
Introduction to Idem for Microsoft AzureIntroduction to Idem for Microsoft Azure
Introduction to Idem for Microsoft Azure
Nicholas Hughes
 
Serverless for High Performance Computing
Serverless for High Performance ComputingServerless for High Performance Computing
Serverless for High Performance Computing
Luciano Mammino
 
Getting started contributing to Apache Spark
Getting started contributing to Apache SparkGetting started contributing to Apache Spark
Getting started contributing to Apache Spark
Holden Karau
 
Apache Spark Performance Observations
Apache Spark Performance ObservationsApache Spark Performance Observations
Apache Spark Performance Observations
Adam Roberts
 
Shaping the Future of Automatic Programming
Shaping the Future of Automatic ProgrammingShaping the Future of Automatic Programming
Shaping the Future of Automatic Programming
Christos Tsakostas
 
stackconf 2020 | DevOps im Mittelstand by Falk Stern
stackconf 2020 | DevOps im Mittelstand by Falk Sternstackconf 2020 | DevOps im Mittelstand by Falk Stern
stackconf 2020 | DevOps im Mittelstand by Falk Stern
NETWAYS
 
Ratpack 101 - GR8Conf 2015
Ratpack 101 - GR8Conf 2015Ratpack 101 - GR8Conf 2015
Ratpack 101 - GR8Conf 2015
Alvaro Sanchez-Mariscal
 
IBM Runtimes Performance Observations with Apache Spark
IBM Runtimes Performance Observations with Apache SparkIBM Runtimes Performance Observations with Apache Spark
IBM Runtimes Performance Observations with Apache Spark
AdamRobertsIBM
 
Making the big data ecosystem work together with Python & Apache Arrow, Apach...
Making the big data ecosystem work together with Python & Apache Arrow, Apach...Making the big data ecosystem work together with Python & Apache Arrow, Apach...
Making the big data ecosystem work together with Python & Apache Arrow, Apach...
Holden Karau
 
Making the big data ecosystem work together with python apache arrow, spark,...
Making the big data ecosystem work together with python  apache arrow, spark,...Making the big data ecosystem work together with python  apache arrow, spark,...
Making the big data ecosystem work together with python apache arrow, spark,...
Holden Karau
 
Big data beyond the JVM - DDTX 2018
Big data beyond the JVM -  DDTX 2018Big data beyond the JVM -  DDTX 2018
Big data beyond the JVM - DDTX 2018
Holden Karau
 

Similar to NE Scala 2016 roundup (20)

DrupalCon Europe 2020 Low Code
DrupalCon Europe 2020 Low CodeDrupalCon Europe 2020 Low Code
DrupalCon Europe 2020 Low Code
 
Efficient Django
Efficient DjangoEfficient Django
Efficient Django
 
Kotlin REST & GraphQL API
Kotlin REST & GraphQL APIKotlin REST & GraphQL API
Kotlin REST & GraphQL API
 
Accelerating Big Data beyond the JVM - Fosdem 2018
Accelerating Big Data beyond the JVM - Fosdem 2018Accelerating Big Data beyond the JVM - Fosdem 2018
Accelerating Big Data beyond the JVM - Fosdem 2018
 
Are general purpose big data systems eating the world?
Are general purpose big data systems eating the world?Are general purpose big data systems eating the world?
Are general purpose big data systems eating the world?
 
Sharing (or stealing) the jewels of python with big data &amp; the jvm (1)
Sharing (or stealing) the jewels of python with big data &amp; the jvm (1)Sharing (or stealing) the jewels of python with big data &amp; the jvm (1)
Sharing (or stealing) the jewels of python with big data &amp; the jvm (1)
 
Scala Days Highlights | BoldRadius
Scala Days Highlights | BoldRadiusScala Days Highlights | BoldRadius
Scala Days Highlights | BoldRadius
 
Ecma6 in the wild
Ecma6 in the wildEcma6 in the wild
Ecma6 in the wild
 
Ecma6 in the wild
Ecma6 in the wildEcma6 in the wild
Ecma6 in the wild
 
Introduction to Idem for Microsoft Azure
Introduction to Idem for Microsoft AzureIntroduction to Idem for Microsoft Azure
Introduction to Idem for Microsoft Azure
 
Serverless for High Performance Computing
Serverless for High Performance ComputingServerless for High Performance Computing
Serverless for High Performance Computing
 
Getting started contributing to Apache Spark
Getting started contributing to Apache SparkGetting started contributing to Apache Spark
Getting started contributing to Apache Spark
 
Apache Spark Performance Observations
Apache Spark Performance ObservationsApache Spark Performance Observations
Apache Spark Performance Observations
 
Shaping the Future of Automatic Programming
Shaping the Future of Automatic ProgrammingShaping the Future of Automatic Programming
Shaping the Future of Automatic Programming
 
stackconf 2020 | DevOps im Mittelstand by Falk Stern
stackconf 2020 | DevOps im Mittelstand by Falk Sternstackconf 2020 | DevOps im Mittelstand by Falk Stern
stackconf 2020 | DevOps im Mittelstand by Falk Stern
 
Ratpack 101 - GR8Conf 2015
Ratpack 101 - GR8Conf 2015Ratpack 101 - GR8Conf 2015
Ratpack 101 - GR8Conf 2015
 
IBM Runtimes Performance Observations with Apache Spark
IBM Runtimes Performance Observations with Apache SparkIBM Runtimes Performance Observations with Apache Spark
IBM Runtimes Performance Observations with Apache Spark
 
Making the big data ecosystem work together with Python & Apache Arrow, Apach...
Making the big data ecosystem work together with Python & Apache Arrow, Apach...Making the big data ecosystem work together with Python & Apache Arrow, Apach...
Making the big data ecosystem work together with Python & Apache Arrow, Apach...
 
Making the big data ecosystem work together with python apache arrow, spark,...
Making the big data ecosystem work together with python  apache arrow, spark,...Making the big data ecosystem work together with python  apache arrow, spark,...
Making the big data ecosystem work together with python apache arrow, spark,...
 
Big data beyond the JVM - DDTX 2018
Big data beyond the JVM -  DDTX 2018Big data beyond the JVM -  DDTX 2018
Big data beyond the JVM - DDTX 2018
 

More from Hung Lin

Handle TBs with $1500 per month
Handle TBs with $1500 per monthHandle TBs with $1500 per month
Handle TBs with $1500 per month
Hung Lin
 
6 Months Sailing with Docker in Production
6 Months Sailing with Docker in Production 6 Months Sailing with Docker in Production
6 Months Sailing with Docker in Production
Hung Lin
 
Micro Services
Micro ServicesMicro Services
Micro Services
Hung Lin
 
Lunch_and_Learn_20150603
Lunch_and_Learn_20150603Lunch_and_Learn_20150603
Lunch_and_Learn_20150603
Hung Lin
 
Tech Talk - Things I Learned at Scala Days 2013
Tech Talk - Things I Learned at Scala Days 2013Tech Talk - Things I Learned at Scala Days 2013
Tech Talk - Things I Learned at Scala Days 2013
Hung Lin
 
nescala 2013
nescala 2013nescala 2013
nescala 2013
Hung Lin
 

More from Hung Lin (6)

Handle TBs with $1500 per month
Handle TBs with $1500 per monthHandle TBs with $1500 per month
Handle TBs with $1500 per month
 
6 Months Sailing with Docker in Production
6 Months Sailing with Docker in Production 6 Months Sailing with Docker in Production
6 Months Sailing with Docker in Production
 
Micro Services
Micro ServicesMicro Services
Micro Services
 
Lunch_and_Learn_20150603
Lunch_and_Learn_20150603Lunch_and_Learn_20150603
Lunch_and_Learn_20150603
 
Tech Talk - Things I Learned at Scala Days 2013
Tech Talk - Things I Learned at Scala Days 2013Tech Talk - Things I Learned at Scala Days 2013
Tech Talk - Things I Learned at Scala Days 2013
 
nescala 2013
nescala 2013nescala 2013
nescala 2013
 

Recently uploaded

Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
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
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Zilliz
 
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
 
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
 
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
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 

Recently uploaded (20)

Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
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
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
 
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
 
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
 
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
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 

NE Scala 2016 roundup

  • 2. About ● A media company - Creative Content Everyone Can Afford ● Since 2011, we saved more than $5B for our customers ● We reached 1M clips of inventory + $1M marketplace sales faster than any company in history ● 15 engineers (total 60+ employees) 2
  • 3. AboutMe ● Use Scala for about 5 years ● Not using Scala day to day for the past 9 months ● Scala developer, not sorcerer. ● Data Handyman @ Videoblocks - We Heart Data ● codingphilosophy.com 3
  • 4. 4
  • 5. ● On 3/4 - 3/5 ● Since 2011 ● At Philadelphia this year (last year in Boston) ● 3/4: conference - 1 track, 11 talks ● 3/5: unconference - 2-5 tracks, 26 talks ● pretty academia as usual ● $60 - order of magnitude cheaper, and better NEScala2016 5 You have to be there!
  • 7. 7
  • 8. Scalaz-StreamMasterclass ● https://github.com/runarorama/ircz ● monad is just a fancy way of saying "accumulate the effects" ● monoid is just a fancy way of saying "collect the elements" 8
  • 9. 9
  • 10. SparkRDD ● compile-time type safe ● api is based on Scala collection (good and bad) 10 def collect(): Array[T] def collect[U](f: PartialFunction[T,U])(implicit arg0: ClassTag[U]): RDD[U] //val rdd = sc.textFile("hdfs:/user/bmc/wikipedia‐pagecounts.gz") //val parsedRDD = rdd.flatMap { line=> // line.split("""s+""") match { // case Array(project,_,numRequests,_)=>Some((project,numRequests)) // case_=>None // }} parsedRDD.filter { case (project,numRequest) => project=="en" }. reduceByKey(_+_). take(100). Foreach{ case (project,requests) => println(s"$project:$requests") }
  • 11. SparkDataFrame ● DSL ● Optimized by catalyst ● lost type safety 11 val df = parsedRDD.toDF("project", "numRequests") df.groupBy($"page"). agg(sum($"numRequests").as("count")). limit(100). show(100) scala>:typedf.collect() Array[org.apache.spark.sql.Row]
  • 12. SparkDataset ● DSL + RDD api ● Type safety ● Optimized ● Use Tungsten, faster (20x) and smaller (4x) 12 val df = sqlContext.read.json("people.json") case class Person(name: String, age: Long) val ds: Dataset[Person] = df.as[Person] ds.groupBy(_.name).count() experimental
  • 13. 13
  • 14. MacrosforMortals ● illTyped from Shapeless ● AST is pretty hard to deal with ● quasiquotes: val tree = q"class C" 14
  • 15. 15
  • 16. Logical Programming in Scala https://github.com/stewSquared/ukanren 16
  • 17. 17
  • 18. MonadicLogging? ● Monad to accumulate effects (log) ● Write log of the same thread together ● Write log with logic ○ if (latency > 10ms) { mlog.toStdOut } ● Maybe too complicated and defeat the purpose of logging? ○ Async + JVM crash, how to know what's going? 18
  • 19. 19
  • 20. StreamFrameworkComparison ● Apache Flink ● Apache Spark ● Google Cloud Dataflow ● Apache Samza 20
  • 21. 21
  • 22. AsyncTest ● Do we need it? ● It is required by Scala.js 22
  • 23. 23
  • 24. CBT:CommunityBuildTool ● https://github.com/cvogt/cbt ● Side project from Chris Vogt ● Write Scala code to build, instead of the DSL (black magic) of SBT 24
  • 25. 25
  • 26. Modularity ● We shouldn't need to Mock if we modularize our code correctly ● https://adriaanm.github.io/files/higher.pdf 26
  • 27. 27
  • 28. DataPipelinewithAkkaStream ● Websocket as emitter ● Kafka as queue ● Akka Stream as process engine 28
  • 29. 29
  • 30. TypeParameterv.s.TypeMember ● Sometimes compiler has issues with type parameter ○ trait Foo[F <: Foo[T]] 30 trait Foo[+T] trait Foo { Type T <: Exception }
  • 32. 32
  • 33. 33
  • 34. Rapture-GuavaofScala 34 ● single point of failure is GREAT in code ● config through import ● Rapture JSON supports 8 JSON backend ● syntax error of html or json are checked by compiler ● use gitter to report bug to Jon
  • 35. Scala.js ● All Scala code are supported, but not all libraries ● union type ● D3, react, autowire 35
  • 36. SI-2712 36 Scala Issue: Implement higher-order unification for type constructor inference. object Test { def meh[M[_], A](x: M[A]): M[A] = x meh{(x: Int) => x} // should solve ?M = [X] X => X and ?A = Int ... }
  • 37. 37
  • 38. Resources 38 ● Runar's blog: http://blog.higher-order.com/ ● Slides of Brendan's talk: https://speakerdeck.com/bwmcadams/nescala-16-scala- macros-for-mortals-or-how-i-learned-to-stop-worrying-and-mumbling-wtf ● Logic programming: https://github.com/stewSquared/ukanren ● Akka stream: https://github.com/pkinsky/akka-streams-example ● Type member vs type parameter: http://www.artima.com/weblogs/viewpost.jsp? thread=270195 ● Good blog of category theory: http://bartoszmilewski.com/2014/10/28/category- theory-for-programmers-the-preface/ ● Unconference grid: https://goo.gl/ei5ijy ● Rapture (The Grava of Scala) https://github.com/propensive/rapture ● Another javascript library in shapeless: https://github.com/travisbrown/circe ● Typesafe RPC: https://github.com/lihaoyi/autowire ● https://issues.scala-lang.org/browse/SI-2712