Unifying Frontend and Backend Development with Scala - ScalaCon 2021Taro L. Saito
Scala can be used for developing both frontend (Scala.js) and backend (Scala JVM) applications. A missing piece has been bridging these two worlds using Scala. We built Airframe RPC, a framework that uses Scala traits as a unified RPC interface between servers and clients. With Airframe RPC, you can build HTTP/1 (Finagle) and HTTP/2 (gRPC) services just by defining Scala traits and case classes. It simplifies web application design as you only need to care about Scala interfaces without using existing web standards like REST, ProtocolBuffers, OpenAPI, etc. Scala.js support of Airframe also enables building interactive Web applications that can dynamically render DOM elements while talking with Scala-based RPC servers. With Airframe RPC, the value of Scala developers will be much higher both for frontend and backend areas.
Journey of Migrating 1 Million Presto Queries - Presto Webinar 2020Taro L. Saito
Arm Treasure Data utilizes Presto as the query engine processing over 1 million queries per day to support the data business of 500+ companies in three regions; US, EU, and Asia. Arm Treasure Data had been using Presto 0.205 and in 2019 started a big migration project to Presto 317. Although we performed extensive query simulations to check any incompatibilities, we faced many unexpected challenges during the migration at production.
Scala for Everything: From Frontend to Backend Applications - Scala Matsuri 2020Taro L. Saito
Scala is a powerful language; You can build front-end applications with Scala.js, and efficient backend application servers for JVM. In this session, we will learn how to build everything with Scala by using Airframe OSS framework.
Airframe is a library designed for maximizing the advantages of Scala as a hybrid of object-oriented and functional programming language. In this session, we will learn how to use Airframe to build REST APIs and RPC (with Finagle or gRPC) services, and how to create frontend applications in Scala.js that interact with the servers using functional interfaces for dynamically updating web pages.
Airframe RPC is a framework for building RPC services by using Scala as a unified RPC interface between servers and clients. It supports Finagle (HTTP/1) and gRPC (HTTP/2) backend, and even Scala.js for web application development.
Talk video: https://www.youtube.com/watch?v=qf8wOc2YHmQ&feature=youtu.be
Documentation: https://wvlet.org/airframe/docs/airframe-rpc
Demo source code: https://github.com/wvlet/airframe/tree/master/examples/rpc-examples
Airframe Meetup #3: 2019 Updates & AirSpecTaro L. Saito
Presentation slides of Airframe Meetup #3 https://airframe.connpass.com/event/148169/
- Airframe 19 Milestone
- AirSpec: A new testing library for Scala
-
Presto At Arm Treasure Data - 2019 UpdatesTaro L. Saito
Presentation at Presto Conference Tokyo 2019
- Arm Treasure Data
- Plazma DB Indexes
- Real-time, Archive Storages
- Schema-on-read data processing
- Physical partition maintenance via presto-stella plugin
Presto @ Treasure Data - Presto Meetup Boston 2015Taro L. Saito
Treasure Data simplifies event analytics for the complex digital
world. Our customers send us 1,000,000 events per second and issue 30,000+ Presto queries everyday to understand their customers better. One of the challenges is designing a cloud database with zero downtime to support a global customer base. We have achieved this goal by developing several open-source technologies; Fluentd and Embulk enable seamless log collection from stream/batch sources, and with MessagePack we can provide an extensible columnar store that accommodates future schema changes. Finally, Presto allows us to serve a wide variety of data processing our customers perform on our service. In this talk, I will present an overview of our system, and how our customers keep using Presto while collecting and extending their data set.
【DLゼミ】XFeat: Accelerated Features for Lightweight Image Matchingharmonylab
公開URL:https://arxiv.org/pdf/2404.19174
出典:Guilherme Potje, Felipe Cadar, Andre Araujo, Renato Martins, Erickson R. ascimento: XFeat: Accelerated Features for Lightweight Image Matching, Proceedings of the 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2023)
概要:リソース効率に優れた特徴点マッチングのための軽量なアーキテクチャ「XFeat(Accelerated Features)」を提案します。手法は、局所的な特徴点の検出、抽出、マッチングのための畳み込みニューラルネットワークの基本的な設計を再検討します。特に、リソースが限られたデバイス向けに迅速かつ堅牢なアルゴリズムが必要とされるため、解像度を可能な限り高く保ちながら、ネットワークのチャネル数を制限します。さらに、スパース下でのマッチングを選択できる設計となっており、ナビゲーションやARなどのアプリケーションに適しています。XFeatは、高速かつ同等以上の精度を実現し、一般的なラップトップのCPU上でリアルタイムで動作します。
セル生産方式におけるロボットの活用には様々な問題があるが,その一つとして 3 体以上の物体の組み立てが挙げられる.一般に,複数物体を同時に組み立てる際は,対象の部品をそれぞれロボットアームまたは治具でそれぞれ独立に保持することで組み立てを遂行すると考えられる.ただし,この方法ではロボットアームや治具を部品数と同じ数だけ必要とし,部品数が多いほどコスト面や設置スペースの関係で無駄が多くなる.この課題に対して音𣷓らは組み立て対象物に働く接触力等の解析により,治具等で固定されていない対象物が組み立て作業中に運動しにくい状態となる条件を求めた.すなわち,環境中の非把持対象物のロバスト性を考慮して,組み立て作業条件を検討している.本研究ではこの方策に基づいて,複数物体の組み立て作業を単腕マニピュレータで実行することを目的とする.このとき,対象物のロバスト性を考慮することで,仮組状態の複数物体を同時に扱う手法を提案する.作業対象としてパイプジョイントの組み立てを挙げ,簡易な道具を用いることで単腕マニピュレータで複数物体を同時に把持できることを示す.さらに,作業成功率の向上のために RGB-D カメラを用いた物体の位置検出に基づくロボット制御及び動作計画を実装する.
This paper discusses assembly operations using a single manipulator and a parallel gripper to simultaneously
grasp multiple objects and hold the group of temporarily assembled objects. Multiple robots and jigs generally operate
assembly tasks by constraining the target objects mechanically or geometrically to prevent them from moving. It is
necessary to analyze the physical interaction between the objects for such constraints to achieve the tasks with a single
gripper. In this paper, we focus on assembling pipe joints as an example and discuss constraining the motion of the
objects. Our demonstration shows that a simple tool can facilitate holding multiple objects with a single gripper.
2. 情報解析の仕事:プログラミング
Silk: Smart Cluster Computing for Data Scientists
l
B = A.map(f)
l
⼊入⼒力力データ A に対して関数fを適⽤用し、Bに代⼊入
f
A
l
B
関数 f の例例: 任意のアルゴリズム(計算)
l
l
l
l
リードAをアラインメント
SAM -‐‑‒> BAMへのフォーマット変換
RNA-‐‑‒Seq -‐‑‒> FPKMの計算
など
xerial.org/silk
2
4. ヒト⼀一⼈人分の全ゲノム解析に必要なデータ量量
Silk: Smart Cluster Computing for Data Scientists
l
l
l
l
l
Input: FASTQ file(s) 500GB (50x coverage, 200 million entries)
f: An alignment program
Output: Alignment results 750GB (sequence + alignment data)
Total storage space required: 1.2TB
Computational time required: 1 days (using hundreds of CPUs)
Input
f
Output
University of Tokyo Genome Browser (UTGB)
xerial.org/silk
4
14. 課題1:ワークフローの⾼高速な実⾏行行
Silk: Smart Cluster Computing for Data Scientists
l
分散演算のための基本演算を提供
l
l
l
l
l
map(f: A => B)、flatMap(f: A => Seq[B])
filter(pred: A => Boolean)
reduce(op: (A, A) => A)
join(B, paramA, paramB), groupBy(k:A=>Key)
などなど
f
g
A
B
f
R
g
A0
B0
A1
B1
A2
B2
xerial.org/silk
R
14
15. 課題
Silk: Smart Cluster Computing for Data Scientists
l
課題1:ワークフローの⾼高速な実⾏行行
l
l
多数のマシン、CPUを⽤用いて並列列に計算を⾏行行う
課題2:ワークフローを簡単に記述できるようにする
l
⾼高度度な並列列・分散処理理の知識識をユーザーに要求しない
xerial.org/silk
15
17. プログラムの作成過程
Silk: Smart Cluster Computing for Data Scientists
Program v1
f
A
B
val B = A.map(f)
l
データ A に対して、関数 f を適⽤用した結果をBに代⼊入
l
計算に数時間かかる
l
=> 実⾏行行中にも次の解析コードを追加したい
xerial.org/silk
17
18. ワークフローの追加
Silk: Smart Cluster Computing for Data Scientists
Program v2
Program v1
A
f
g
B
C
val B = A.map(f)
val C = B.map(g)
l
例例:
l
l
Program v1 を実⾏行行後、新たな解析が必要になりProgram v2を作成
既に計算されたBの結果を利利⽤用して val C = B.map(g) を計算するには?
xerial.org/silk
18
20. 課題3:ワークフローの更更新を管理理する
Silk: Smart Cluster Computing for Data Scientists
Program v2
Program v1
f
g
A
B
l
例例:fの計算に数時間かかる場合
l
既に計算したBの結果を再利利⽤用
l
l
ファイルに保存
問題点
l
l
プログラムが冗⻑⾧長に
fが軽い計算の場合には保存しない
⽅方が得だが、その判断が難しい
C
val fileB = “result/B.obj”
val B = if(!fileB.exists) {
val tmp = A.map(f)
tmp.saveTo(fileB)
tmp
} else load(fileB)
val fileC = “result/C.obj”
val C = if(!fileC.exists) {
…
}
xerial.org/silk
20
21. プログラムへのマーキング(変数名)
Silk: Smart Cluster Computing for Data Scientists
Program v2
Program v1
f
g
A
B
C
val B = A.map(f)
val C = B.map(g)
l
Bの計算が終わったことをどう判定するか?
l
l
Bの結果を、Bという名前で保存する
変数名をマーカーとして活⽤用
コードの実⾏行行時には失われている情報
コード中の変数名の情報をコンパイル時に取得
l
l
l
Scala Macroの機能を活⽤用
xerial.org/silk
21
22. オペレーションツリーの作成
Silk: Smart Cluster Computing for Data Scientists
Program v2
Program v1
f
A
g
B
C
val B = A.map(f)
val C = B.map(g)
l
各変数には、Silkのオペレーションが代⼊入される
l
l
l
val B = MapOp(input:A, output:B, function:f)
val C = MapOp(input:B, output:C, function:g)
ネストしたオペーレション
l
l
l
val C = MapOp(input:MapOp(input:A, output:B, function:f), output:C, function:g)
Silkでのデータ操作は、プログラムツリーの構築
計算結果の再利利⽤用
l
Cの計算にはBが必要。Bが計算されていれば再利利⽤用、なければA.map(f)を実⾏行行
xerial.org/silk
22