SlideShare a Scribd company logo
© 2020 Treasure Data 1
Taro L. Saito
Treasure Data
November 2nd, 2021
ScalaCon 2021
Unifying Frontend and Backend
Development with Scala
Copyright 1995-2020 Treasure Data. All rights reserved.
About Me: Taro L. Saito
2
● Treasure Data
○ Principal software engineer
○ Building distributed query engine services
● OSS activities
○ Using Scala for 13+ years
■ Since Scala 2.7 (2008)
○ Airframe (This talk)
■ 20+ Scala utility modules
○ sbt-sonatype
■ Publishing to Maven central (Sonatype)
○ etc.
Airframe
Copyright 1995-2020 Treasure Data. All rights reserved.
Treasure Data: A Ready-to-Use Cloud Data Platform
3
Logs
Device
Data
Batch
Data
PlazmaDB
Table Schema
Data Collection Cloud Storage Distributed Data Processing
Jobs
Job Management
SQL Editor
Scheduler
Workflows
Machine
Learning
Treasure Data OSS
Third Party OSS
Data
● Even if you are not an engineer, you can start collecting and analyzing your data
Copyright 1995-2020 Treasure Data. All rights reserved.
Even Backend Engineers Need Frontend Skills
● Creating a better visualization of services
○ To monitor millions of queries running every day
○ Created a UI for service monitoring and cluster management with Scala.js
4
Copyright 1995-2020 Treasure Data. All rights reserved.
Scala.js Application: Notebook Query Editor
● Rich SQL editor
● Frontend
○ Scala.js
○ Monaco editor of Visual Studio
Code
● Backend
○ Scala on JVM
○ RPC server
■ SQL runner
■ Task manager
● Written only in Scala
5
Copyright 1995-2020 Treasure Data. All rights reserved.
Too Many Frontend and Backend Frameworks
● How do we choose one of the frameworks to use?
● It’s almost impossible to find Scala engineers mastering all of these frontend and backend
technologies.
6
Web Browsers
Scala.js
Copyright 1995-2020 Treasure Data. All rights reserved.
Airframe RPC
● Using plain Scala as an RPC interface between frontend and backend applications
● Low-learning cost
○ Requires only basic Scala knowledge, which can be learned with one Scala book
● Our experience so far after introducing Airframe RPC:
○ A Java engineer in Treasure Data can start writing a Scala RPC service interacting with a
Scala.js UI in a week.
7
RPC Interface
Scala.js Client RPC Web Server
Generates
Scala.js
Web Application
API Documentation
RPC Call RPC Call
Implements
Airframe
Copyright 1995-2020 Treasure Data. All rights reserved.
Airframe
● GitHub: wvlet/airframe
● 20+ useful modules written in pure Scala
○ Cross-built for Scala 2.12, 2.13, and Scala.js
○ Scala 3 support is in progress
■ 85%~ completed
■ WIP:
● Tasty reader & Scala reflection
compatibility
● Core Modules (*: will be explained in this talk)
○ airframe-log*
○ airframe-codec*
■ Object serializer
○ airframe-http*
■ HTTP server/client with RPC support
○ airframe-rx*
■ Reactive DOM rendering
○ airframe-json/msgpack
■ JSON/MsgPack parser
○ airframe-di
■ Constructor injection helper
○ airframe-surface
■ Compile-time or runtime object inspector
○ AirSpec: Testing library integrated with Airframe DI
○ etc.
8
Airframe
Copyright 1995-2020 Treasure Data. All rights reserved.
● Various internal and third-party Scala/Java libraries were used
○ e.g., Many web frameworks, utilities, testing frameworks, etc.
● The cost of learning individual libraries and frameworks was high
Before Airframe: 5 Years Ago (2016)
9
Knowledge
Experiences
Design Decisions
Products
24/7 Services
Business Values
Programming Various Libraries Outcome
logger
launcher
object mapper
JDBC reader
json4s jackson
….
Copyright 1995-2020 Treasure Data. All rights reserved.
Current (2021): Consolidating the Best Practices into Airframe OSS
● Since 2016, we started defining standards in Airframe
○ Engineers can focus on developing applications instead of learning frameworks
10
Knowledge
Experiences
Design Decisions
Products
24/7 Services
Business Values
Programming OSS Outcome
Airframe
Copyright 1995-2020 Treasure Data. All rights reserved.
airframe-log: A Modern Logging Library for Scala and Scala.js
● There were too many choices just for generating human-readable logs
○ log4j, slf4j, scala-logging, java.util.logging, twitter/util, etc.
● airframe-log
○ Adding colorful logging methods to your class with LogSupport trait
○ Showing the source code location
11
Copyright 1995-2020 Treasure Data. All rights reserved.
airframe-log usage in sbt-sonatype
● Shows detailed logs while publishing projects to Maven Central (Sonatype OSS Repository)
● News: sbt-sonatype update
○ Since 2019, sbt-sonatype introduced a new bundle upload process, which can upload thousands of
artifact files (jars, source files) to Sonatype within a minute.
12
Copyright 1995-2020 Treasure Data. All rights reserved.
● Scala.js compiles Scala code into JavaScript, which runs on web browsers
● Logging for the developer console of web browsers
airframe-log: Debugging Scala.js Code
13
Copyright 1995-2020 Treasure Data. All rights reserved.
Frontend Development: Rendering DOM with Scala.js
● DOM element:
○ <div class=”container”> …. </div>
■ tag, attribute, enclosed elements
○ scalajs-dom library has all necessary functions for manipulating DOM nodes
● A previous approach for DOM rendering:
○ Converting Scala’s XML literal into DOM tree nodes
■ OSS: monadic-html, Binding.scala
■ Similar to JSX in Facebook React (XML syntax embedded to JavaScript)
○ But, XML literal will be deprecated in Scala 3
14
Copyright 1995-2020 Treasure Data. All rights reserved.
airframe-rx: Functional DOM Rendering
● The current best practice is defining
functions for rendering HTML elements
○ table, tr, td, body, div, span, etc.
● Then, compose these functions
● Style 1: Separating DOM attributes and
elements into different blocks
○ ScalaTags, Slinky
○ Some disadvantages
■ Too many parentheses!
■ Formatting with scalafmt is a bit
challenging
● Style 2: Enclosing both DOM attributes
and elements inside a single block
○ airframe-rx, scalajs-react
○ More Scala-friendly syntax
○ The begin/end of a tag are clear
15
ScalaTags
airframe-rx
Copyright 1995-2020 Treasure Data. All rights reserved.
airframe-rx: Rendering Complex DOM
● RxElement interface:
○ def render(): RxElement
○ Support nesting with apply(...)
■ Embedding Scala functions and collections
16
Copyright 1995-2020 Treasure Data. All rights reserved.
airframe-rx: Reactive Stream Interface Rx[A]
● Rx[A]
○ ReactiveX stream implementation
● Rewriting DOM interactively upon upstream data changes
○ e.g., mouse clicks, getting RPC responses (Future), interval
timer events, etc.
● Reactive Operators
○ map, flatMap, filter, join, zip, etc.
○ The usage is almost the same with Scala collection APIs
17
Airframe
Copyright 1995-2020 Treasure Data. All rights reserved.
airframe-rx: Rx.variable
● Rx.variable
○ Fire an event if the variable is updated
● Interactive DOM Rendering
○ Subscribing upstream changes
■ Update DOMs for each change
○ Cancellation
■ Unsubscribe the event processing
■ Necessary for cleaning up event
handlers added to the browser
● mouse click handler, timer, etc.
18
Copyright 1995-2020 Treasure Data. All rights reserved.
airframe-rx: Gallery
19
Copyright 1995-2020 Treasure Data. All rights reserved.
RPC: Bridging Scala and Scala.js Applications
Program Function
Call
Return
Local Function Call
(ideal)
Program Function
Serialize
Deserialize
Request Data
Deserialize
Response Data
Serialize
Remote Procedure Call
(reality)
Network
Client
Call
Return
Server
Call
Return
20
Scala.js
Scala.js
Copyright 1995-2020 Treasure Data. All rights reserved.
Traditional Approaches for Implementing RPC
● REST API
○ Define function interfaces with HTTP endpoints (e.g., GET/POST/PUT/DELETE, etc.)
○ REST web frameworks for Scala
■ Play framework, akka-http, Finatra, Finch, skinny-framework, etc.
● gRPC
○ Define function interfaces with Google’s ProtocolBuffers (.proto) schema language
○ Generate server and client code stubs from proto files
○ Scala wrappers:
■ ScalaPB, muScala, akka-grpc, etc.
Program Function
Serialize
Deserialize
Request Data
Deserialize
Response Data
Serialize
Client
Call
Return
Server
Call
Return
21
Copyright 1995-2020 Treasure Data. All rights reserved.
New Approach: Defining RPC Interface with Scala
● Scala is a perfect fit for RPC
○ Scala functions = RPC methods
○ Scala objects (statically typed) = RPC request/response types
● Using the same interface and model classes between servers and clients
○ No need to think about REST nor ProtocolBuffers for implementing RPC
22
Airframe
Copyright 1995-2020 Treasure Data. All rights reserved.
Necessary Building Blocks for Implementing RPC
● 1. Message serializer and deserializer
● 2. Network data format
○ JSON (REST), Protobuf (gRPC), or MessagePack (Airframe RPC)
● 3. RPC interface language
○ REST API, Protobuf, or Scala
● 4. HTTP client and server implementation
○ Code generator from RPC interface
23
Program Function
Serialize
Deserialize
Request Data
Deserialize
Response Data
Serialize
Client
Call
Return
Server
Call
Return
Copyright 1995-2020 Treasure Data. All rights reserved.
airframe-codec: MessagePack-Based Object Serialization
● MessagePack
○ A compact binary format compatible with
JSON
Object Object
Pack Unpack
Pack
Unpack
Server Side
Client Side
24
Scala.js
JSON
Copyright 1995-2020 Treasure Data. All rights reserved.
airframe-codec: Predefined Codecs
● Primitive Codec
○ ByteCodec, CharCodec, ShortCodec, IntCodec, LongCodec
○ FloatCodec, DoubleCodec
○ StringCodec
○ BooleanCodec
○ TimeStampCodec
● Collection Codec
○ ArrayCodec, SeqCodec, ListCodec, IndexSeqCodec, MapCodec
○ OptionCodec, EitherCodec
● Java-specific Codec
○ UUIDCodec, FileCodec, ZonedDateTimeCodec, InstantCodec
○ JDBCResultSetCodec
● etc.
25
Airframe
Copyright 1995-2020 Treasure Data. All rights reserved.
airframe-codec: Serializing Complex Objects
Pack
Unpack
IntCodec
StringCodec
DoubleCodec
MessageCodec.of[A]
26
Serialize
Deserialize
JSON
● airframe-surface
○ Inspecting object parameters using compile-time macros
○ Different implementations between Scala 2 and Scala 3
Copyright 1995-2020 Treasure Data. All rights reserved.
Object Serialization for Multiple Data Formats
● Data to Object Mapping
○ We need many data readers as well as object mappers
● A lot of existing libraries for parsing JSON
○ circe, json4s, play-json, jackson, etc.
YAML
JDBC
ResultSet
YAML Parser +
Object Mapper
Config
Object
Table
Object
Object-Relation
Mapper
JSON
JSON Parser +
Object Mapper
Object
27
Copyright 1995-2020 Treasure Data. All rights reserved.
airframe-codec: Using MessagePack As A Universal Data Format
Object
Unpack
Pack
JDBC
ResultSet
Pack/Unpack
YAML
JSON
28
● Once your data are converted into MessagePack, you can use the same object
serializer/deserializer (airframe-codec)
● Airframe RPC supports JSON format through MessagePack conversion
Airframe
airframe-codec
Copyright 1995-2020 Treasure Data. All rights reserved.
Airframe RPC: Serializing Function Call Request
● Serialize function call arguments as Map (arg_name -> arg_value)
● An example:
○ Map(“person” -> Person(1, “leo”), “message” -> “Hello RPC!”)
■ Serialize this Map into MessagePack with airframe-codec
● Mapping to HTTP requests
○ HTTP method: POST
○ Path: /(package name).(class name)/(method name)
■ e.g., /hello.api.v1.MyService/hello
○ Content body: serialized function call arguments
29
Copyright 1995-2020 Treasure Data. All rights reserved.
Airframe RPC: Implementing RPC Servers
● Extending the RPC interface trait
30
Copyright 1995-2020 Treasure Data. All rights reserved.
Airframe RPC: Backend Servers/Clients Are Pluggable
RPC Interface RPC Web Server
Generates API Documentation
31
Airframe
RPC Call RPC Call
Implements
● Finagle (HTTP/1)
● gRPC (HTTP/2)
RPC Clients
Copyright 1995-2020 Treasure Data. All rights reserved.
● Finagle: Twitter’s HTTP server written in Scala
○ For HTTP/1 services accessible from web browsers running Scala.js code
AIrframe RPC: Finagle Backend
32
Airframe
Scala.js
airframe-rx-html
airframe-http-finagle
Copyright 1995-2020 Treasure Data. All rights reserved.
● gRPC
○ grpc-java (using Netty as backend)
● Airframe RPC + gRPC
○ No .proto file is required
○ Only Scala
Airframe RPC: gRPC Backend
33
Airframe
Copyright 1995-2020 Treasure Data. All rights reserved.
RPC Performance Comparison: Greeter Service
● Airframe RPC
○ serde: MessagePack (airframe-codec) -
Scala case classes
○ Finagle (HTTP1) or gRPC (HTTP2)
● ScalaPB
○ serde: Protobuf - Scala case classes
○ gRPC (HTTP2)
● grpc-java
○ serde: Protobuf - Java classes
○ gRPC (HTTP2)
● Notes
○ Using Finagle with HTTP2 had almost no
benefit over HTTP1
○ Multiplexing RPC requests into a
single connection is the key
performance factor
○ Overhead of ScalaPB over grpc-java
■ Scala Future (10% overhead)
■ Mapping Protobuf to Scala case
classes (10% overhead)
34
HTTP/1 HTTP/2 (gRPC)
Copyright 1995-2020 Treasure Data. All rights reserved.
[Advanced] Extending gRPC for Other Data Formats
● gRPC is data-format agonistic
framework
○ You can use other than
ProtocolBuffers
■ e.g., JSON, MessagePack
● There are two extension points:
● MethodDescriptor
○ Define gRPC endpoints
corresponding to Scala functions
○ Register custom marshallers
● Request/ResponseMarshaller
○ Define how to encode/decode RPC
request/response data
○ We are using airframe-codec here
35
Copyright 1995-2020 Treasure Data. All rights reserved.
sbt-airframe: Generating RPC Clients
● sbt-airframe plugin
○ Read RPC interface classes and generate HTTP client code for the target backend
■ Using different code generators for Scala, Scala.js, and gRPC
sbt-airframe
Code
Generation
RPC Client
Scala.js
36
Scala.js Client
HTTP/gRPC Client
Open API Spec
Cross-Language
RPC Client
Copyright 1995-2020 Treasure Data. All rights reserved.
sbt-airframe: Generating Open API Schema
● RPC Interface -> Open API schema YAML file
● Generating RPC Clients & Swagger Documentation
37
RPC Interface
API Documentation
Open API Spec
(YAML)
Cross-Language
RPC Client
Generate
sbt-airframe
API Documentation
Copyright 1995-2020 Treasure Data. All rights reserved.
Making An RPC Call
Program Function
Serialize
Deserialize
Request Data
Deserialize
Response Data
Serialize
Client
Call
Response
Server
Call
Response
Airframe
Scala.js
38
Copyright 1995-2020 Treasure Data. All rights reserved.
Summary: Enable Scala-Oriented Development with Airframe
39
RPC Interface
Scala.js Client RPC Web Server
Generates
Scala.js
Web Application
API Documentation
RPC Call RPC Call
Implements
Airframe
● Kick start frontend/backend application development with Scala
○ Only one language to learn
○ No need to think about REST, ProtocolBuffers, other frontend frameworks at the beginning.
● Find example code at https://github.com/wvlet/airframe/ (examples folder)

More Related Content

What's hot

Iceberg: a fast table format for S3
Iceberg: a fast table format for S3Iceberg: a fast table format for S3
Iceberg: a fast table format for S3DataWorks Summit
 
Intro to InfluxDB 2.0 and Your First Flux Query by Sonia Gupta
Intro to InfluxDB 2.0 and Your First Flux Query by Sonia GuptaIntro to InfluxDB 2.0 and Your First Flux Query by Sonia Gupta
Intro to InfluxDB 2.0 and Your First Flux Query by Sonia GuptaInfluxData
 
InfluxDB 2.0: Dashboarding 101 by David G. Simmons
InfluxDB 2.0: Dashboarding 101 by David G. SimmonsInfluxDB 2.0: Dashboarding 101 by David G. Simmons
InfluxDB 2.0: Dashboarding 101 by David G. SimmonsInfluxData
 
Data Engineer’s Lunch #41: PygramETL
Data Engineer’s Lunch #41: PygramETLData Engineer’s Lunch #41: PygramETL
Data Engineer’s Lunch #41: PygramETLAnant Corporation
 
InfluxDB 2.0 Client Libraries by Noah Crowley
InfluxDB 2.0 Client Libraries by Noah CrowleyInfluxDB 2.0 Client Libraries by Noah Crowley
InfluxDB 2.0 Client Libraries by Noah CrowleyInfluxData
 
It's Time To Stop Using Lambda Architecture | Yaroslav Tkachenko, Shopify
It's Time To Stop Using Lambda Architecture | Yaroslav Tkachenko, ShopifyIt's Time To Stop Using Lambda Architecture | Yaroslav Tkachenko, Shopify
It's Time To Stop Using Lambda Architecture | Yaroslav Tkachenko, ShopifyHostedbyConfluent
 
Introduction to Flink Streaming
Introduction to Flink StreamingIntroduction to Flink Streaming
Introduction to Flink Streamingdatamantra
 
Interactive Data Analysis in Spark Streaming
Interactive Data Analysis in Spark StreamingInteractive Data Analysis in Spark Streaming
Interactive Data Analysis in Spark Streamingdatamantra
 
Introducing TiDB [Delivered: 09/27/18 at NYC SQL Meetup]
Introducing TiDB [Delivered: 09/27/18 at NYC SQL Meetup]Introducing TiDB [Delivered: 09/27/18 at NYC SQL Meetup]
Introducing TiDB [Delivered: 09/27/18 at NYC SQL Meetup]Kevin Xu
 
Iceberg: A modern table format for big data (Strata NY 2018)
Iceberg: A modern table format for big data (Strata NY 2018)Iceberg: A modern table format for big data (Strata NY 2018)
Iceberg: A modern table format for big data (Strata NY 2018)Ryan Blue
 
Kafka Tiered Storage | Satish Duggana and Sriharsha Chintalapani, Uber
Kafka Tiered Storage | Satish Duggana and Sriharsha Chintalapani, UberKafka Tiered Storage | Satish Duggana and Sriharsha Chintalapani, Uber
Kafka Tiered Storage | Satish Duggana and Sriharsha Chintalapani, UberHostedbyConfluent
 
Presentation at SF Kubernetes Meetup (10/30/18), Introducing TiDB/TiKV
Presentation at SF Kubernetes Meetup (10/30/18), Introducing TiDB/TiKVPresentation at SF Kubernetes Meetup (10/30/18), Introducing TiDB/TiKV
Presentation at SF Kubernetes Meetup (10/30/18), Introducing TiDB/TiKVKevin Xu
 
TiDB Introduction - San Francisco MySQL Meetup
TiDB Introduction - San Francisco MySQL MeetupTiDB Introduction - San Francisco MySQL Meetup
TiDB Introduction - San Francisco MySQL MeetupMorgan Tocker
 
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...InfluxData
 
Streaming Data from Cassandra into Kafka
Streaming Data from Cassandra into KafkaStreaming Data from Cassandra into Kafka
Streaming Data from Cassandra into KafkaAbrar Sheikh
 
Geospatial querying in Apache Marmotta - ApacheCon Big Data Europe 2015
Geospatial querying in Apache Marmotta - ApacheCon Big Data Europe 2015Geospatial querying in Apache Marmotta - ApacheCon Big Data Europe 2015
Geospatial querying in Apache Marmotta - ApacheCon Big Data Europe 2015Sergio Fernández
 
Introduction to InfluxDB 2.0 & Your First Flux Query by Sonia Gupta, Develope...
Introduction to InfluxDB 2.0 & Your First Flux Query by Sonia Gupta, Develope...Introduction to InfluxDB 2.0 & Your First Flux Query by Sonia Gupta, Develope...
Introduction to InfluxDB 2.0 & Your First Flux Query by Sonia Gupta, Develope...InfluxData
 
Introducing TiDB [Delivered: 09/25/18 at Portland Cloud Native Meetup]
Introducing TiDB [Delivered: 09/25/18 at Portland Cloud Native Meetup]Introducing TiDB [Delivered: 09/25/18 at Portland Cloud Native Meetup]
Introducing TiDB [Delivered: 09/25/18 at Portland Cloud Native Meetup]Kevin Xu
 
InfluxData Internals by Ryan Betts
InfluxData Internals by Ryan BettsInfluxData Internals by Ryan Betts
InfluxData Internals by Ryan BettsInfluxData
 

What's hot (20)

Iceberg: a fast table format for S3
Iceberg: a fast table format for S3Iceberg: a fast table format for S3
Iceberg: a fast table format for S3
 
Intro to InfluxDB 2.0 and Your First Flux Query by Sonia Gupta
Intro to InfluxDB 2.0 and Your First Flux Query by Sonia GuptaIntro to InfluxDB 2.0 and Your First Flux Query by Sonia Gupta
Intro to InfluxDB 2.0 and Your First Flux Query by Sonia Gupta
 
InfluxDB 2.0: Dashboarding 101 by David G. Simmons
InfluxDB 2.0: Dashboarding 101 by David G. SimmonsInfluxDB 2.0: Dashboarding 101 by David G. Simmons
InfluxDB 2.0: Dashboarding 101 by David G. Simmons
 
Data Engineer’s Lunch #41: PygramETL
Data Engineer’s Lunch #41: PygramETLData Engineer’s Lunch #41: PygramETL
Data Engineer’s Lunch #41: PygramETL
 
InfluxDB 2.0 Client Libraries by Noah Crowley
InfluxDB 2.0 Client Libraries by Noah CrowleyInfluxDB 2.0 Client Libraries by Noah Crowley
InfluxDB 2.0 Client Libraries by Noah Crowley
 
It's Time To Stop Using Lambda Architecture | Yaroslav Tkachenko, Shopify
It's Time To Stop Using Lambda Architecture | Yaroslav Tkachenko, ShopifyIt's Time To Stop Using Lambda Architecture | Yaroslav Tkachenko, Shopify
It's Time To Stop Using Lambda Architecture | Yaroslav Tkachenko, Shopify
 
Introduction to Flink Streaming
Introduction to Flink StreamingIntroduction to Flink Streaming
Introduction to Flink Streaming
 
TiDB Introduction
TiDB IntroductionTiDB Introduction
TiDB Introduction
 
Interactive Data Analysis in Spark Streaming
Interactive Data Analysis in Spark StreamingInteractive Data Analysis in Spark Streaming
Interactive Data Analysis in Spark Streaming
 
Introducing TiDB [Delivered: 09/27/18 at NYC SQL Meetup]
Introducing TiDB [Delivered: 09/27/18 at NYC SQL Meetup]Introducing TiDB [Delivered: 09/27/18 at NYC SQL Meetup]
Introducing TiDB [Delivered: 09/27/18 at NYC SQL Meetup]
 
Iceberg: A modern table format for big data (Strata NY 2018)
Iceberg: A modern table format for big data (Strata NY 2018)Iceberg: A modern table format for big data (Strata NY 2018)
Iceberg: A modern table format for big data (Strata NY 2018)
 
Kafka Tiered Storage | Satish Duggana and Sriharsha Chintalapani, Uber
Kafka Tiered Storage | Satish Duggana and Sriharsha Chintalapani, UberKafka Tiered Storage | Satish Duggana and Sriharsha Chintalapani, Uber
Kafka Tiered Storage | Satish Duggana and Sriharsha Chintalapani, Uber
 
Presentation at SF Kubernetes Meetup (10/30/18), Introducing TiDB/TiKV
Presentation at SF Kubernetes Meetup (10/30/18), Introducing TiDB/TiKVPresentation at SF Kubernetes Meetup (10/30/18), Introducing TiDB/TiKV
Presentation at SF Kubernetes Meetup (10/30/18), Introducing TiDB/TiKV
 
TiDB Introduction - San Francisco MySQL Meetup
TiDB Introduction - San Francisco MySQL MeetupTiDB Introduction - San Francisco MySQL Meetup
TiDB Introduction - San Francisco MySQL Meetup
 
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
 
Streaming Data from Cassandra into Kafka
Streaming Data from Cassandra into KafkaStreaming Data from Cassandra into Kafka
Streaming Data from Cassandra into Kafka
 
Geospatial querying in Apache Marmotta - ApacheCon Big Data Europe 2015
Geospatial querying in Apache Marmotta - ApacheCon Big Data Europe 2015Geospatial querying in Apache Marmotta - ApacheCon Big Data Europe 2015
Geospatial querying in Apache Marmotta - ApacheCon Big Data Europe 2015
 
Introduction to InfluxDB 2.0 & Your First Flux Query by Sonia Gupta, Develope...
Introduction to InfluxDB 2.0 & Your First Flux Query by Sonia Gupta, Develope...Introduction to InfluxDB 2.0 & Your First Flux Query by Sonia Gupta, Develope...
Introduction to InfluxDB 2.0 & Your First Flux Query by Sonia Gupta, Develope...
 
Introducing TiDB [Delivered: 09/25/18 at Portland Cloud Native Meetup]
Introducing TiDB [Delivered: 09/25/18 at Portland Cloud Native Meetup]Introducing TiDB [Delivered: 09/25/18 at Portland Cloud Native Meetup]
Introducing TiDB [Delivered: 09/25/18 at Portland Cloud Native Meetup]
 
InfluxData Internals by Ryan Betts
InfluxData Internals by Ryan BettsInfluxData Internals by Ryan Betts
InfluxData Internals by Ryan Betts
 

Similar to Unifying Frontend and Backend Development with Scala - ScalaCon 2021

Airframe: Lightweight Building Blocks for Scala @ TD Tech Talk 2018-10-17
Airframe: Lightweight Building Blocks for Scala @ TD Tech Talk 2018-10-17Airframe: Lightweight Building Blocks for Scala @ TD Tech Talk 2018-10-17
Airframe: Lightweight Building Blocks for Scala @ TD Tech Talk 2018-10-17Taro L. Saito
 
Node.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleNode.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleDmytro Semenov
 
Airframe: Lightweight Building Blocks for Scala - Scale By The Bay 2018
Airframe: Lightweight Building Blocks for Scala - Scale By The Bay 2018Airframe: Lightweight Building Blocks for Scala - Scale By The Bay 2018
Airframe: Lightweight Building Blocks for Scala - Scale By The Bay 2018Taro L. Saito
 
Laskar: High-Velocity GraphQL & Lambda-based Software Development Model
Laskar: High-Velocity GraphQL & Lambda-based Software Development ModelLaskar: High-Velocity GraphQL & Lambda-based Software Development Model
Laskar: High-Velocity GraphQL & Lambda-based Software Development ModelGarindra Prahandono
 
Functional APIs with Absinthe GraphQL
Functional APIs with Absinthe GraphQLFunctional APIs with Absinthe GraphQL
Functional APIs with Absinthe GraphQLZvi Avraham
 
SF Big Analytics_20190612: Scaling Apache Spark on Kubernetes at Lyft
SF Big Analytics_20190612: Scaling Apache Spark on Kubernetes at LyftSF Big Analytics_20190612: Scaling Apache Spark on Kubernetes at Lyft
SF Big Analytics_20190612: Scaling Apache Spark on Kubernetes at LyftChester Chen
 
td-spark internals: Extending Spark with Airframe - Spark Meetup Tokyo #3 2020
td-spark internals: Extending Spark with Airframe - Spark Meetup Tokyo #3 2020td-spark internals: Extending Spark with Airframe - Spark Meetup Tokyo #3 2020
td-spark internals: Extending Spark with Airframe - Spark Meetup Tokyo #3 2020Taro L. Saito
 
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with KubernetesKubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with KubernetesSeungYong Oh
 
Intro to creating kubernetes operators
Intro to creating kubernetes operators Intro to creating kubernetes operators
Intro to creating kubernetes operators Juraj Hantak
 
Scaling Apache Spark on Kubernetes at Lyft
Scaling Apache Spark on Kubernetes at LyftScaling Apache Spark on Kubernetes at Lyft
Scaling Apache Spark on Kubernetes at LyftDatabricks
 
Building an analytics workflow using Apache Airflow
Building an analytics workflow using Apache AirflowBuilding an analytics workflow using Apache Airflow
Building an analytics workflow using Apache AirflowYohei Onishi
 
Terraform 101: What's infrastructure as code?
Terraform 101: What's infrastructure as code?Terraform 101: What's infrastructure as code?
Terraform 101: What's infrastructure as code?GDX Wu
 
Building a Next-gen Data Platform and Leveraging the OSS Ecosystem for Easy W...
Building a Next-gen Data Platform and Leveraging the OSS Ecosystem for Easy W...Building a Next-gen Data Platform and Leveraging the OSS Ecosystem for Easy W...
Building a Next-gen Data Platform and Leveraging the OSS Ecosystem for Easy W...StampedeCon
 
Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2aspyker
 
NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1Ruslan Meshenberg
 
Migrating to spark 2.0
Migrating to spark 2.0Migrating to spark 2.0
Migrating to spark 2.0datamantra
 
Introduction to Apache Flink
Introduction to Apache FlinkIntroduction to Apache Flink
Introduction to Apache Flinkdatamantra
 
Upcoming features in Airflow 2
Upcoming features in Airflow 2Upcoming features in Airflow 2
Upcoming features in Airflow 2Kaxil Naik
 
Scaling spark on kubernetes at Lyft
Scaling spark on kubernetes at LyftScaling spark on kubernetes at Lyft
Scaling spark on kubernetes at LyftLi Gao
 
High-speed Database Throughput Using Apache Arrow Flight SQL
High-speed Database Throughput Using Apache Arrow Flight SQLHigh-speed Database Throughput Using Apache Arrow Flight SQL
High-speed Database Throughput Using Apache Arrow Flight SQLScyllaDB
 

Similar to Unifying Frontend and Backend Development with Scala - ScalaCon 2021 (20)

Airframe: Lightweight Building Blocks for Scala @ TD Tech Talk 2018-10-17
Airframe: Lightweight Building Blocks for Scala @ TD Tech Talk 2018-10-17Airframe: Lightweight Building Blocks for Scala @ TD Tech Talk 2018-10-17
Airframe: Lightweight Building Blocks for Scala @ TD Tech Talk 2018-10-17
 
Node.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleNode.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scale
 
Airframe: Lightweight Building Blocks for Scala - Scale By The Bay 2018
Airframe: Lightweight Building Blocks for Scala - Scale By The Bay 2018Airframe: Lightweight Building Blocks for Scala - Scale By The Bay 2018
Airframe: Lightweight Building Blocks for Scala - Scale By The Bay 2018
 
Laskar: High-Velocity GraphQL & Lambda-based Software Development Model
Laskar: High-Velocity GraphQL & Lambda-based Software Development ModelLaskar: High-Velocity GraphQL & Lambda-based Software Development Model
Laskar: High-Velocity GraphQL & Lambda-based Software Development Model
 
Functional APIs with Absinthe GraphQL
Functional APIs with Absinthe GraphQLFunctional APIs with Absinthe GraphQL
Functional APIs with Absinthe GraphQL
 
SF Big Analytics_20190612: Scaling Apache Spark on Kubernetes at Lyft
SF Big Analytics_20190612: Scaling Apache Spark on Kubernetes at LyftSF Big Analytics_20190612: Scaling Apache Spark on Kubernetes at Lyft
SF Big Analytics_20190612: Scaling Apache Spark on Kubernetes at Lyft
 
td-spark internals: Extending Spark with Airframe - Spark Meetup Tokyo #3 2020
td-spark internals: Extending Spark with Airframe - Spark Meetup Tokyo #3 2020td-spark internals: Extending Spark with Airframe - Spark Meetup Tokyo #3 2020
td-spark internals: Extending Spark with Airframe - Spark Meetup Tokyo #3 2020
 
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with KubernetesKubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes
 
Intro to creating kubernetes operators
Intro to creating kubernetes operators Intro to creating kubernetes operators
Intro to creating kubernetes operators
 
Scaling Apache Spark on Kubernetes at Lyft
Scaling Apache Spark on Kubernetes at LyftScaling Apache Spark on Kubernetes at Lyft
Scaling Apache Spark on Kubernetes at Lyft
 
Building an analytics workflow using Apache Airflow
Building an analytics workflow using Apache AirflowBuilding an analytics workflow using Apache Airflow
Building an analytics workflow using Apache Airflow
 
Terraform 101: What's infrastructure as code?
Terraform 101: What's infrastructure as code?Terraform 101: What's infrastructure as code?
Terraform 101: What's infrastructure as code?
 
Building a Next-gen Data Platform and Leveraging the OSS Ecosystem for Easy W...
Building a Next-gen Data Platform and Leveraging the OSS Ecosystem for Easy W...Building a Next-gen Data Platform and Leveraging the OSS Ecosystem for Easy W...
Building a Next-gen Data Platform and Leveraging the OSS Ecosystem for Easy W...
 
Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2
 
NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1
 
Migrating to spark 2.0
Migrating to spark 2.0Migrating to spark 2.0
Migrating to spark 2.0
 
Introduction to Apache Flink
Introduction to Apache FlinkIntroduction to Apache Flink
Introduction to Apache Flink
 
Upcoming features in Airflow 2
Upcoming features in Airflow 2Upcoming features in Airflow 2
Upcoming features in Airflow 2
 
Scaling spark on kubernetes at Lyft
Scaling spark on kubernetes at LyftScaling spark on kubernetes at Lyft
Scaling spark on kubernetes at Lyft
 
High-speed Database Throughput Using Apache Arrow Flight SQL
High-speed Database Throughput Using Apache Arrow Flight SQLHigh-speed Database Throughput Using Apache Arrow Flight SQL
High-speed Database Throughput Using Apache Arrow Flight SQL
 

More from Taro L. Saito

Tips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTaro L. Saito
 
Learning Silicon Valley Culture
Learning Silicon Valley CultureLearning Silicon Valley Culture
Learning Silicon Valley CultureTaro L. Saito
 
Presto At Treasure Data
Presto At Treasure DataPresto At Treasure Data
Presto At Treasure DataTaro L. Saito
 
Scala at Treasure Data
Scala at Treasure DataScala at Treasure Data
Scala at Treasure DataTaro L. Saito
 
Introduction to Presto at Treasure Data
Introduction to Presto at Treasure DataIntroduction to Presto at Treasure Data
Introduction to Presto at Treasure DataTaro L. Saito
 
Workflow Hacks #1 - dots. Tokyo
Workflow Hacks #1 - dots. TokyoWorkflow Hacks #1 - dots. Tokyo
Workflow Hacks #1 - dots. TokyoTaro L. Saito
 
Presto @ Treasure Data - Presto Meetup Boston 2015
Presto @ Treasure Data - Presto Meetup Boston 2015Presto @ Treasure Data - Presto Meetup Boston 2015
Presto @ Treasure Data - Presto Meetup Boston 2015Taro L. Saito
 
Presto As A Service - Treasure DataでのPresto運用事例
Presto As A Service - Treasure DataでのPresto運用事例Presto As A Service - Treasure DataでのPresto運用事例
Presto As A Service - Treasure DataでのPresto運用事例Taro L. Saito
 
Presto as a Service - Tips for operation and monitoring
Presto as a Service - Tips for operation and monitoringPresto as a Service - Tips for operation and monitoring
Presto as a Service - Tips for operation and monitoringTaro L. Saito
 
Treasure Dataを支える技術 - MessagePack編
Treasure Dataを支える技術 - MessagePack編Treasure Dataを支える技術 - MessagePack編
Treasure Dataを支える技術 - MessagePack編Taro L. Saito
 
Weaving Dataflows with Silk - ScalaMatsuri 2014, Tokyo
Weaving Dataflows with Silk - ScalaMatsuri 2014, TokyoWeaving Dataflows with Silk - ScalaMatsuri 2014, Tokyo
Weaving Dataflows with Silk - ScalaMatsuri 2014, TokyoTaro L. Saito
 
Spark Internals - Hadoop Source Code Reading #16 in Japan
Spark Internals - Hadoop Source Code Reading #16 in JapanSpark Internals - Hadoop Source Code Reading #16 in Japan
Spark Internals - Hadoop Source Code Reading #16 in JapanTaro L. Saito
 
Streaming Distributed Data Processing with Silk #deim2014
Streaming Distributed Data Processing with Silk #deim2014Streaming Distributed Data Processing with Silk #deim2014
Streaming Distributed Data Processing with Silk #deim2014Taro L. Saito
 
Silkによる並列分散ワークフロープログラミング
Silkによる並列分散ワークフロープログラミングSilkによる並列分散ワークフロープログラミング
Silkによる並列分散ワークフロープログラミングTaro L. Saito
 
2011年度 生物データベース論 2日目 木構造データ
2011年度 生物データベース論 2日目 木構造データ2011年度 生物データベース論 2日目 木構造データ
2011年度 生物データベース論 2日目 木構造データTaro L. Saito
 
Relational-Style XML Query @ SIGMOD-J 2008 Dec.
Relational-Style XML Query @ SIGMOD-J 2008 Dec.Relational-Style XML Query @ SIGMOD-J 2008 Dec.
Relational-Style XML Query @ SIGMOD-J 2008 Dec.Taro L. Saito
 

More from Taro L. Saito (17)

Tips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTips For Maintaining OSS Projects
Tips For Maintaining OSS Projects
 
Learning Silicon Valley Culture
Learning Silicon Valley CultureLearning Silicon Valley Culture
Learning Silicon Valley Culture
 
Presto At Treasure Data
Presto At Treasure DataPresto At Treasure Data
Presto At Treasure Data
 
Scala at Treasure Data
Scala at Treasure DataScala at Treasure Data
Scala at Treasure Data
 
Introduction to Presto at Treasure Data
Introduction to Presto at Treasure DataIntroduction to Presto at Treasure Data
Introduction to Presto at Treasure Data
 
Workflow Hacks #1 - dots. Tokyo
Workflow Hacks #1 - dots. TokyoWorkflow Hacks #1 - dots. Tokyo
Workflow Hacks #1 - dots. Tokyo
 
Presto @ Treasure Data - Presto Meetup Boston 2015
Presto @ Treasure Data - Presto Meetup Boston 2015Presto @ Treasure Data - Presto Meetup Boston 2015
Presto @ Treasure Data - Presto Meetup Boston 2015
 
Presto As A Service - Treasure DataでのPresto運用事例
Presto As A Service - Treasure DataでのPresto運用事例Presto As A Service - Treasure DataでのPresto運用事例
Presto As A Service - Treasure DataでのPresto運用事例
 
JNuma Library
JNuma LibraryJNuma Library
JNuma Library
 
Presto as a Service - Tips for operation and monitoring
Presto as a Service - Tips for operation and monitoringPresto as a Service - Tips for operation and monitoring
Presto as a Service - Tips for operation and monitoring
 
Treasure Dataを支える技術 - MessagePack編
Treasure Dataを支える技術 - MessagePack編Treasure Dataを支える技術 - MessagePack編
Treasure Dataを支える技術 - MessagePack編
 
Weaving Dataflows with Silk - ScalaMatsuri 2014, Tokyo
Weaving Dataflows with Silk - ScalaMatsuri 2014, TokyoWeaving Dataflows with Silk - ScalaMatsuri 2014, Tokyo
Weaving Dataflows with Silk - ScalaMatsuri 2014, Tokyo
 
Spark Internals - Hadoop Source Code Reading #16 in Japan
Spark Internals - Hadoop Source Code Reading #16 in JapanSpark Internals - Hadoop Source Code Reading #16 in Japan
Spark Internals - Hadoop Source Code Reading #16 in Japan
 
Streaming Distributed Data Processing with Silk #deim2014
Streaming Distributed Data Processing with Silk #deim2014Streaming Distributed Data Processing with Silk #deim2014
Streaming Distributed Data Processing with Silk #deim2014
 
Silkによる並列分散ワークフロープログラミング
Silkによる並列分散ワークフロープログラミングSilkによる並列分散ワークフロープログラミング
Silkによる並列分散ワークフロープログラミング
 
2011年度 生物データベース論 2日目 木構造データ
2011年度 生物データベース論 2日目 木構造データ2011年度 生物データベース論 2日目 木構造データ
2011年度 生物データベース論 2日目 木構造データ
 
Relational-Style XML Query @ SIGMOD-J 2008 Dec.
Relational-Style XML Query @ SIGMOD-J 2008 Dec.Relational-Style XML Query @ SIGMOD-J 2008 Dec.
Relational-Style XML Query @ SIGMOD-J 2008 Dec.
 

Recently uploaded

Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
 
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»QADay
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Alison B. Lowndes
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀DianaGray10
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...Sri Ambati
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...Elena Simperl
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaRTTS
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Thierry Lestable
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupCatarinaPereira64715
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Product School
 

Recently uploaded (20)

Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 

Unifying Frontend and Backend Development with Scala - ScalaCon 2021

  • 1. © 2020 Treasure Data 1 Taro L. Saito Treasure Data November 2nd, 2021 ScalaCon 2021 Unifying Frontend and Backend Development with Scala
  • 2. Copyright 1995-2020 Treasure Data. All rights reserved. About Me: Taro L. Saito 2 ● Treasure Data ○ Principal software engineer ○ Building distributed query engine services ● OSS activities ○ Using Scala for 13+ years ■ Since Scala 2.7 (2008) ○ Airframe (This talk) ■ 20+ Scala utility modules ○ sbt-sonatype ■ Publishing to Maven central (Sonatype) ○ etc. Airframe
  • 3. Copyright 1995-2020 Treasure Data. All rights reserved. Treasure Data: A Ready-to-Use Cloud Data Platform 3 Logs Device Data Batch Data PlazmaDB Table Schema Data Collection Cloud Storage Distributed Data Processing Jobs Job Management SQL Editor Scheduler Workflows Machine Learning Treasure Data OSS Third Party OSS Data ● Even if you are not an engineer, you can start collecting and analyzing your data
  • 4. Copyright 1995-2020 Treasure Data. All rights reserved. Even Backend Engineers Need Frontend Skills ● Creating a better visualization of services ○ To monitor millions of queries running every day ○ Created a UI for service monitoring and cluster management with Scala.js 4
  • 5. Copyright 1995-2020 Treasure Data. All rights reserved. Scala.js Application: Notebook Query Editor ● Rich SQL editor ● Frontend ○ Scala.js ○ Monaco editor of Visual Studio Code ● Backend ○ Scala on JVM ○ RPC server ■ SQL runner ■ Task manager ● Written only in Scala 5
  • 6. Copyright 1995-2020 Treasure Data. All rights reserved. Too Many Frontend and Backend Frameworks ● How do we choose one of the frameworks to use? ● It’s almost impossible to find Scala engineers mastering all of these frontend and backend technologies. 6 Web Browsers Scala.js
  • 7. Copyright 1995-2020 Treasure Data. All rights reserved. Airframe RPC ● Using plain Scala as an RPC interface between frontend and backend applications ● Low-learning cost ○ Requires only basic Scala knowledge, which can be learned with one Scala book ● Our experience so far after introducing Airframe RPC: ○ A Java engineer in Treasure Data can start writing a Scala RPC service interacting with a Scala.js UI in a week. 7 RPC Interface Scala.js Client RPC Web Server Generates Scala.js Web Application API Documentation RPC Call RPC Call Implements Airframe
  • 8. Copyright 1995-2020 Treasure Data. All rights reserved. Airframe ● GitHub: wvlet/airframe ● 20+ useful modules written in pure Scala ○ Cross-built for Scala 2.12, 2.13, and Scala.js ○ Scala 3 support is in progress ■ 85%~ completed ■ WIP: ● Tasty reader & Scala reflection compatibility ● Core Modules (*: will be explained in this talk) ○ airframe-log* ○ airframe-codec* ■ Object serializer ○ airframe-http* ■ HTTP server/client with RPC support ○ airframe-rx* ■ Reactive DOM rendering ○ airframe-json/msgpack ■ JSON/MsgPack parser ○ airframe-di ■ Constructor injection helper ○ airframe-surface ■ Compile-time or runtime object inspector ○ AirSpec: Testing library integrated with Airframe DI ○ etc. 8 Airframe
  • 9. Copyright 1995-2020 Treasure Data. All rights reserved. ● Various internal and third-party Scala/Java libraries were used ○ e.g., Many web frameworks, utilities, testing frameworks, etc. ● The cost of learning individual libraries and frameworks was high Before Airframe: 5 Years Ago (2016) 9 Knowledge Experiences Design Decisions Products 24/7 Services Business Values Programming Various Libraries Outcome logger launcher object mapper JDBC reader json4s jackson ….
  • 10. Copyright 1995-2020 Treasure Data. All rights reserved. Current (2021): Consolidating the Best Practices into Airframe OSS ● Since 2016, we started defining standards in Airframe ○ Engineers can focus on developing applications instead of learning frameworks 10 Knowledge Experiences Design Decisions Products 24/7 Services Business Values Programming OSS Outcome Airframe
  • 11. Copyright 1995-2020 Treasure Data. All rights reserved. airframe-log: A Modern Logging Library for Scala and Scala.js ● There were too many choices just for generating human-readable logs ○ log4j, slf4j, scala-logging, java.util.logging, twitter/util, etc. ● airframe-log ○ Adding colorful logging methods to your class with LogSupport trait ○ Showing the source code location 11
  • 12. Copyright 1995-2020 Treasure Data. All rights reserved. airframe-log usage in sbt-sonatype ● Shows detailed logs while publishing projects to Maven Central (Sonatype OSS Repository) ● News: sbt-sonatype update ○ Since 2019, sbt-sonatype introduced a new bundle upload process, which can upload thousands of artifact files (jars, source files) to Sonatype within a minute. 12
  • 13. Copyright 1995-2020 Treasure Data. All rights reserved. ● Scala.js compiles Scala code into JavaScript, which runs on web browsers ● Logging for the developer console of web browsers airframe-log: Debugging Scala.js Code 13
  • 14. Copyright 1995-2020 Treasure Data. All rights reserved. Frontend Development: Rendering DOM with Scala.js ● DOM element: ○ <div class=”container”> …. </div> ■ tag, attribute, enclosed elements ○ scalajs-dom library has all necessary functions for manipulating DOM nodes ● A previous approach for DOM rendering: ○ Converting Scala’s XML literal into DOM tree nodes ■ OSS: monadic-html, Binding.scala ■ Similar to JSX in Facebook React (XML syntax embedded to JavaScript) ○ But, XML literal will be deprecated in Scala 3 14
  • 15. Copyright 1995-2020 Treasure Data. All rights reserved. airframe-rx: Functional DOM Rendering ● The current best practice is defining functions for rendering HTML elements ○ table, tr, td, body, div, span, etc. ● Then, compose these functions ● Style 1: Separating DOM attributes and elements into different blocks ○ ScalaTags, Slinky ○ Some disadvantages ■ Too many parentheses! ■ Formatting with scalafmt is a bit challenging ● Style 2: Enclosing both DOM attributes and elements inside a single block ○ airframe-rx, scalajs-react ○ More Scala-friendly syntax ○ The begin/end of a tag are clear 15 ScalaTags airframe-rx
  • 16. Copyright 1995-2020 Treasure Data. All rights reserved. airframe-rx: Rendering Complex DOM ● RxElement interface: ○ def render(): RxElement ○ Support nesting with apply(...) ■ Embedding Scala functions and collections 16
  • 17. Copyright 1995-2020 Treasure Data. All rights reserved. airframe-rx: Reactive Stream Interface Rx[A] ● Rx[A] ○ ReactiveX stream implementation ● Rewriting DOM interactively upon upstream data changes ○ e.g., mouse clicks, getting RPC responses (Future), interval timer events, etc. ● Reactive Operators ○ map, flatMap, filter, join, zip, etc. ○ The usage is almost the same with Scala collection APIs 17 Airframe
  • 18. Copyright 1995-2020 Treasure Data. All rights reserved. airframe-rx: Rx.variable ● Rx.variable ○ Fire an event if the variable is updated ● Interactive DOM Rendering ○ Subscribing upstream changes ■ Update DOMs for each change ○ Cancellation ■ Unsubscribe the event processing ■ Necessary for cleaning up event handlers added to the browser ● mouse click handler, timer, etc. 18
  • 19. Copyright 1995-2020 Treasure Data. All rights reserved. airframe-rx: Gallery 19
  • 20. Copyright 1995-2020 Treasure Data. All rights reserved. RPC: Bridging Scala and Scala.js Applications Program Function Call Return Local Function Call (ideal) Program Function Serialize Deserialize Request Data Deserialize Response Data Serialize Remote Procedure Call (reality) Network Client Call Return Server Call Return 20 Scala.js Scala.js
  • 21. Copyright 1995-2020 Treasure Data. All rights reserved. Traditional Approaches for Implementing RPC ● REST API ○ Define function interfaces with HTTP endpoints (e.g., GET/POST/PUT/DELETE, etc.) ○ REST web frameworks for Scala ■ Play framework, akka-http, Finatra, Finch, skinny-framework, etc. ● gRPC ○ Define function interfaces with Google’s ProtocolBuffers (.proto) schema language ○ Generate server and client code stubs from proto files ○ Scala wrappers: ■ ScalaPB, muScala, akka-grpc, etc. Program Function Serialize Deserialize Request Data Deserialize Response Data Serialize Client Call Return Server Call Return 21
  • 22. Copyright 1995-2020 Treasure Data. All rights reserved. New Approach: Defining RPC Interface with Scala ● Scala is a perfect fit for RPC ○ Scala functions = RPC methods ○ Scala objects (statically typed) = RPC request/response types ● Using the same interface and model classes between servers and clients ○ No need to think about REST nor ProtocolBuffers for implementing RPC 22 Airframe
  • 23. Copyright 1995-2020 Treasure Data. All rights reserved. Necessary Building Blocks for Implementing RPC ● 1. Message serializer and deserializer ● 2. Network data format ○ JSON (REST), Protobuf (gRPC), or MessagePack (Airframe RPC) ● 3. RPC interface language ○ REST API, Protobuf, or Scala ● 4. HTTP client and server implementation ○ Code generator from RPC interface 23 Program Function Serialize Deserialize Request Data Deserialize Response Data Serialize Client Call Return Server Call Return
  • 24. Copyright 1995-2020 Treasure Data. All rights reserved. airframe-codec: MessagePack-Based Object Serialization ● MessagePack ○ A compact binary format compatible with JSON Object Object Pack Unpack Pack Unpack Server Side Client Side 24 Scala.js JSON
  • 25. Copyright 1995-2020 Treasure Data. All rights reserved. airframe-codec: Predefined Codecs ● Primitive Codec ○ ByteCodec, CharCodec, ShortCodec, IntCodec, LongCodec ○ FloatCodec, DoubleCodec ○ StringCodec ○ BooleanCodec ○ TimeStampCodec ● Collection Codec ○ ArrayCodec, SeqCodec, ListCodec, IndexSeqCodec, MapCodec ○ OptionCodec, EitherCodec ● Java-specific Codec ○ UUIDCodec, FileCodec, ZonedDateTimeCodec, InstantCodec ○ JDBCResultSetCodec ● etc. 25 Airframe
  • 26. Copyright 1995-2020 Treasure Data. All rights reserved. airframe-codec: Serializing Complex Objects Pack Unpack IntCodec StringCodec DoubleCodec MessageCodec.of[A] 26 Serialize Deserialize JSON ● airframe-surface ○ Inspecting object parameters using compile-time macros ○ Different implementations between Scala 2 and Scala 3
  • 27. Copyright 1995-2020 Treasure Data. All rights reserved. Object Serialization for Multiple Data Formats ● Data to Object Mapping ○ We need many data readers as well as object mappers ● A lot of existing libraries for parsing JSON ○ circe, json4s, play-json, jackson, etc. YAML JDBC ResultSet YAML Parser + Object Mapper Config Object Table Object Object-Relation Mapper JSON JSON Parser + Object Mapper Object 27
  • 28. Copyright 1995-2020 Treasure Data. All rights reserved. airframe-codec: Using MessagePack As A Universal Data Format Object Unpack Pack JDBC ResultSet Pack/Unpack YAML JSON 28 ● Once your data are converted into MessagePack, you can use the same object serializer/deserializer (airframe-codec) ● Airframe RPC supports JSON format through MessagePack conversion Airframe airframe-codec
  • 29. Copyright 1995-2020 Treasure Data. All rights reserved. Airframe RPC: Serializing Function Call Request ● Serialize function call arguments as Map (arg_name -> arg_value) ● An example: ○ Map(“person” -> Person(1, “leo”), “message” -> “Hello RPC!”) ■ Serialize this Map into MessagePack with airframe-codec ● Mapping to HTTP requests ○ HTTP method: POST ○ Path: /(package name).(class name)/(method name) ■ e.g., /hello.api.v1.MyService/hello ○ Content body: serialized function call arguments 29
  • 30. Copyright 1995-2020 Treasure Data. All rights reserved. Airframe RPC: Implementing RPC Servers ● Extending the RPC interface trait 30
  • 31. Copyright 1995-2020 Treasure Data. All rights reserved. Airframe RPC: Backend Servers/Clients Are Pluggable RPC Interface RPC Web Server Generates API Documentation 31 Airframe RPC Call RPC Call Implements ● Finagle (HTTP/1) ● gRPC (HTTP/2) RPC Clients
  • 32. Copyright 1995-2020 Treasure Data. All rights reserved. ● Finagle: Twitter’s HTTP server written in Scala ○ For HTTP/1 services accessible from web browsers running Scala.js code AIrframe RPC: Finagle Backend 32 Airframe Scala.js airframe-rx-html airframe-http-finagle
  • 33. Copyright 1995-2020 Treasure Data. All rights reserved. ● gRPC ○ grpc-java (using Netty as backend) ● Airframe RPC + gRPC ○ No .proto file is required ○ Only Scala Airframe RPC: gRPC Backend 33 Airframe
  • 34. Copyright 1995-2020 Treasure Data. All rights reserved. RPC Performance Comparison: Greeter Service ● Airframe RPC ○ serde: MessagePack (airframe-codec) - Scala case classes ○ Finagle (HTTP1) or gRPC (HTTP2) ● ScalaPB ○ serde: Protobuf - Scala case classes ○ gRPC (HTTP2) ● grpc-java ○ serde: Protobuf - Java classes ○ gRPC (HTTP2) ● Notes ○ Using Finagle with HTTP2 had almost no benefit over HTTP1 ○ Multiplexing RPC requests into a single connection is the key performance factor ○ Overhead of ScalaPB over grpc-java ■ Scala Future (10% overhead) ■ Mapping Protobuf to Scala case classes (10% overhead) 34 HTTP/1 HTTP/2 (gRPC)
  • 35. Copyright 1995-2020 Treasure Data. All rights reserved. [Advanced] Extending gRPC for Other Data Formats ● gRPC is data-format agonistic framework ○ You can use other than ProtocolBuffers ■ e.g., JSON, MessagePack ● There are two extension points: ● MethodDescriptor ○ Define gRPC endpoints corresponding to Scala functions ○ Register custom marshallers ● Request/ResponseMarshaller ○ Define how to encode/decode RPC request/response data ○ We are using airframe-codec here 35
  • 36. Copyright 1995-2020 Treasure Data. All rights reserved. sbt-airframe: Generating RPC Clients ● sbt-airframe plugin ○ Read RPC interface classes and generate HTTP client code for the target backend ■ Using different code generators for Scala, Scala.js, and gRPC sbt-airframe Code Generation RPC Client Scala.js 36 Scala.js Client HTTP/gRPC Client Open API Spec Cross-Language RPC Client
  • 37. Copyright 1995-2020 Treasure Data. All rights reserved. sbt-airframe: Generating Open API Schema ● RPC Interface -> Open API schema YAML file ● Generating RPC Clients & Swagger Documentation 37 RPC Interface API Documentation Open API Spec (YAML) Cross-Language RPC Client Generate sbt-airframe API Documentation
  • 38. Copyright 1995-2020 Treasure Data. All rights reserved. Making An RPC Call Program Function Serialize Deserialize Request Data Deserialize Response Data Serialize Client Call Response Server Call Response Airframe Scala.js 38
  • 39. Copyright 1995-2020 Treasure Data. All rights reserved. Summary: Enable Scala-Oriented Development with Airframe 39 RPC Interface Scala.js Client RPC Web Server Generates Scala.js Web Application API Documentation RPC Call RPC Call Implements Airframe ● Kick start frontend/backend application development with Scala ○ Only one language to learn ○ No need to think about REST, ProtocolBuffers, other frontend frameworks at the beginning. ● Find example code at https://github.com/wvlet/airframe/ (examples folder)