•
Suguru Hamazaki
濱崎 俊
•
SoftwareEngineer at MEDIA
INDEX, Inc.
MEDIA INDEX株式会社で勤務
•
Experience: 2 years in Scala + 5
months in Spray
Scala歴2年、Spray歴5ヶ月
•
Use Spray as a backend service of
our product, Sova
SovaのバックエンドでSprayを使ってます
4.
•
Mostly Ruby onRails app.
ほとんどは Ruby on Rails のアプリ
•
Internally use a virtualization product.
内部で仮想化製品を使用
•
Spray app helps the RoR app control the
virtualization product.
Sprayアプリで、仮想化製品の制御部分を補助
5.
•
an open-source toolkitfor building REST/HTTPbased integration layers
REST/HTTPによる統合レイヤーを構築するための、オープンソースなツールキット
•
on top of Scala and Akka
Scala と Akka がベース
•
asynchronous, actor-based, fast, lightweight,
modular and testable
非同期、Actorベース、高速、軽量、モジュラー化されており、テスト可能
— from http://spray.io/
•
Actor and Futurebased concurrency
Actor と Future をベースにした concurrency
•
case-classes as message protocols
メッセージプロトコルとしてのcaseクラス
•
type safety
型安全性
•
‘fluent’ internal DSL
「流暢な」内部 DSL
15.
A bad decisionI made
before
以前こんな失敗を
•
For an XML-RPC application outsourced from a
customer
XML-RPC アプリの受託案件で
•
•
Scala + apache-xmlrpc + servlet for XML-RPC
app
Worked fine, but…
ちゃんと機能したけど……
•
Didn’t learn many things
あまり多くを学ばなかった
16.
•
API based onmutable
operations
mutable な操作をベースにした API
•
conversions between Scala
and Java collections
Scala と Java のコレクション間の変換
•
Scala as just ‘better Java’
What we sawthrough the
demo
•
Created SBT project for spray app development
Spray アプリ開発用に、SBT のプロジェクトを作った
•
Defined an HttpService actor under ActorSystem
and started it
ActorSystem 管理下に HttpService アクターを定義し、起動した
•
Defined a route that represents how requests are
handled
リクエストの処理を表わすルートを定義した
•
Created a child actor and interact with it
子アクターを作り、メッセージをやりとりした