SlideShare une entreprise Scribd logo
1  sur  7
Xitrum - a Scala framework inspired by Rails




Slides are in English,
but because there are many Japanese   Scala Conference in Japan 2013
in the audience,                      Ngoc ( ゴック )
I will try talk in Japanese
Self introduction
●
    Ngoc ( ゴック ), from Vietnam
●   Working in Tokyo, at Mobilus:
    http://mobilus.co.jp
●   Creating chat systems for smartphones using
    Scala
What is Xitrum
●   Scala web framework + standalone HTTP(S) server
●   Inspired by Rails, not a Rails clone
●   Main features: async and clustered
●   Clustering is in-process:
    - Very fast
    - You don't need a separate server, e.g. Redis, memcached
●   Based on Netty, Hazelcast, and Akka:
    - Netty     => async IO
    - Hazelcast => clustered data
    (may be removed when Akka's clustering feature is mature)
    - Akka      => remote code (not clustered code yet)
●   Clustering feature in Akka 2.1 is still experimental, hope Akka 2.2
    will be released soon
One instance


       Cluster




Akka
Why I created Xitrum
●   I came to Scala in 2010, from Ruby
●   In 2010, Play did not support Scala
●   There was Scalatra and Lift, but:
    - Scalatra did not have many features
    - Lift was not easy to use (from a Rubyist perspective)

    => I decided to create something in between:
    - More featureful than Scalatra
    - Easier to use than Lift

    Scalatra <---- Xitrum ----> Lift
●   I have used used Xitrum in most of my projects: chat systems, API
    server for smartphones, realtime web sites etc.
Xitrum features
●   Async and clustered
●   WebSocket, SockJS (like Socket.IO, but easier)
●   Routes are collected automatically, like JAX-RS
●   Scalate template engine
●   i18n based on GNU gettext
●   Standalone HTTP(S) server: serves static files very fast
    - Small files are cached in memory
    - Big files are sent using NIO’s zero copy
●   Many more, see:
    http://ngocdaothanh.github.com/xitrum/
Demo
●   Online demo:
    http://ngocdaothanh.github.com/xitrum/
●   Source code:
    https://github.com/ngocdaothanh/xitrum-demos


    I will show you:
●   Routes collecting
●   Clustering

Contenu connexe

Tendances

Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache Sling
Bob Paulin
 

Tendances (20)

Play framework
Play frameworkPlay framework
Play framework
 
Web application development using Play Framework (with Java)
Web application development using Play Framework (with Java)Web application development using Play Framework (with Java)
Web application development using Play Framework (with Java)
 
Play Framework workshop: full stack java web app
Play Framework workshop: full stack java web appPlay Framework workshop: full stack java web app
Play Framework workshop: full stack java web app
 
Using Play Framework 2 in production
Using Play Framework 2 in productionUsing Play Framework 2 in production
Using Play Framework 2 in production
 
FITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingFITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript Debugging
 
Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache Sling
 
Choosing a Javascript Framework
Choosing a Javascript FrameworkChoosing a Javascript Framework
Choosing a Javascript Framework
 
Introduction to Play Framework
Introduction to Play FrameworkIntroduction to Play Framework
Introduction to Play Framework
 
Play Framework 2.5
Play Framework 2.5Play Framework 2.5
Play Framework 2.5
 
Доклад Михаила Егорова на PHDays
Доклад Михаила Егорова на PHDaysДоклад Михаила Егорова на PHDays
Доклад Михаила Егорова на PHDays
 
Microservices in Scala: Play Framework
Microservices in Scala: Play FrameworkMicroservices in Scala: Play Framework
Microservices in Scala: Play Framework
 
Your First Scala Web Application using Play 2.1
Your First Scala Web Application using Play 2.1Your First Scala Web Application using Play 2.1
Your First Scala Web Application using Play 2.1
 
Building modular applications with the Java Platform Module System and Layrry
Building modular applications with the Java Platform Module System and LayrryBuilding modular applications with the Java Platform Module System and Layrry
Building modular applications with the Java Platform Module System and Layrry
 
RESTful Web Applications with Apache Sling
RESTful Web Applications with Apache SlingRESTful Web Applications with Apache Sling
RESTful Web Applications with Apache Sling
 
Akka.net versus microsoft orleans
Akka.net versus microsoft orleansAkka.net versus microsoft orleans
Akka.net versus microsoft orleans
 
No Container: a Modern Java Stack with Bootique
No Container: a Modern Java Stack with BootiqueNo Container: a Modern Java Stack with Bootique
No Container: a Modern Java Stack with Bootique
 
Maven
Maven Maven
Maven
 
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaSphere ver)
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaSphere ver)The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaSphere ver)
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaSphere ver)
 
Test Automation using Ruby
Test Automation using Ruby Test Automation using Ruby
Test Automation using Ruby
 
Building and Managing Projects with Maven
Building and Managing Projects with MavenBuilding and Managing Projects with Maven
Building and Managing Projects with Maven
 

En vedette (14)

Tunez3
Tunez3Tunez3
Tunez3
 
Tunez2
Tunez2Tunez2
Tunez2
 
John Archer. Lest we forget. Hardly likely, really.
John Archer. Lest we forget. Hardly likely, really.John Archer. Lest we forget. Hardly likely, really.
John Archer. Lest we forget. Hardly likely, really.
 
Tunez4
Tunez4Tunez4
Tunez4
 
Divers, Survivors, Thrivers
Divers, Survivors, ThriversDivers, Survivors, Thrivers
Divers, Survivors, Thrivers
 
Xitrum internals
Xitrum internalsXitrum internals
Xitrum internals
 
Functions P P S
Functions  P P SFunctions  P P S
Functions P P S
 
Tunez
TunezTunez
Tunez
 
Identity Web2.0 :* *Building a Brand Presence Online
Identity Web2.0 :* *Building a Brand Presence OnlineIdentity Web2.0 :* *Building a Brand Presence Online
Identity Web2.0 :* *Building a Brand Presence Online
 
Synergy of leadership and technological innovation
Synergy of leadership and technological innovationSynergy of leadership and technological innovation
Synergy of leadership and technological innovation
 
Presentaziy
PresentaziyPresentaziy
Presentaziy
 
何でRuby
何でRuby何でRuby
何でRuby
 
Nhập môn BDD
Nhập môn BDDNhập môn BDD
Nhập môn BDD
 
Quality : First Time Right Approach
Quality : First Time Right ApproachQuality : First Time Right Approach
Quality : First Time Right Approach
 

Similaire à Xitrum @ Scala Conference in Japan 2013

Openstack India May Meetup
Openstack India May MeetupOpenstack India May Meetup
Openstack India May Meetup
Deepak Garg
 
ApacheCon NA 2010 - High Performance Cloud-enabled SCA Runtimes
ApacheCon NA 2010 - High Performance Cloud-enabled SCA RuntimesApacheCon NA 2010 - High Performance Cloud-enabled SCA Runtimes
ApacheCon NA 2010 - High Performance Cloud-enabled SCA Runtimes
Jean-Sebastien Delfino
 
Openstack overview thomas-goirand
Openstack overview thomas-goirandOpenstack overview thomas-goirand
Openstack overview thomas-goirand
OpenCity Community
 

Similaire à Xitrum @ Scala Conference in Japan 2013 (20)

Clojure web dev history
Clojure web dev historyClojure web dev history
Clojure web dev history
 
Openstack India May Meetup
Openstack India May MeetupOpenstack India May Meetup
Openstack India May Meetup
 
Exploring the Scala ecosystem
Exploring the Scala ecosystemExploring the Scala ecosystem
Exploring the Scala ecosystem
 
ApacheCon NA 2010 - High Performance Cloud-enabled SCA Runtimes
ApacheCon NA 2010 - High Performance Cloud-enabled SCA RuntimesApacheCon NA 2010 - High Performance Cloud-enabled SCA Runtimes
ApacheCon NA 2010 - High Performance Cloud-enabled SCA Runtimes
 
Docker Meetup Tokyo #23 - Zenko Open Source Multi-Cloud Data Controller - Lau...
Docker Meetup Tokyo #23 - Zenko Open Source Multi-Cloud Data Controller - Lau...Docker Meetup Tokyo #23 - Zenko Open Source Multi-Cloud Data Controller - Lau...
Docker Meetup Tokyo #23 - Zenko Open Source Multi-Cloud Data Controller - Lau...
 
Introduction to Lua Luajit Openresty Luvit
Introduction to Lua Luajit Openresty LuvitIntroduction to Lua Luajit Openresty Luvit
Introduction to Lua Luajit Openresty Luvit
 
Kolla talk at OpenStack Summit 2017 in Sydney
Kolla talk at OpenStack Summit 2017 in SydneyKolla talk at OpenStack Summit 2017 in Sydney
Kolla talk at OpenStack Summit 2017 in Sydney
 
Monkey Server
Monkey ServerMonkey Server
Monkey Server
 
Hack Rio/OS
Hack Rio/OSHack Rio/OS
Hack Rio/OS
 
Play 2 Java Framework with TDD
Play 2 Java Framework with TDDPlay 2 Java Framework with TDD
Play 2 Java Framework with TDD
 
Play2 Java
Play2 JavaPlay2 Java
Play2 Java
 
Instant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositoriesInstant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositories
 
digital-twins-webthings-iotjs-20190512rzr
digital-twins-webthings-iotjs-20190512rzrdigital-twins-webthings-iotjs-20190512rzr
digital-twins-webthings-iotjs-20190512rzr
 
Scala services in action
Scala services in actionScala services in action
Scala services in action
 
Openstack overview thomas-goirand
Openstack overview thomas-goirandOpenstack overview thomas-goirand
Openstack overview thomas-goirand
 
Automated Snap Package build processes without the Build Service
Automated Snap Package build processes without the Build ServiceAutomated Snap Package build processes without the Build Service
Automated Snap Package build processes without the Build Service
 
Type safe, versioned, and rewindable stream processing with Apache {Avro, K...
Type safe, versioned, and rewindable stream processing  with  Apache {Avro, K...Type safe, versioned, and rewindable stream processing  with  Apache {Avro, K...
Type safe, versioned, and rewindable stream processing with Apache {Avro, K...
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
IoT-javascript-2019-fosdem
IoT-javascript-2019-fosdemIoT-javascript-2019-fosdem
IoT-javascript-2019-fosdem
 
Stackato v4
Stackato v4Stackato v4
Stackato v4
 

Plus de Ngoc Dao

Actor-based concurrency and Akka Fundamentals
Actor-based concurrency and Akka FundamentalsActor-based concurrency and Akka Fundamentals
Actor-based concurrency and Akka Fundamentals
Ngoc Dao
 
SockJS Intro
SockJS IntroSockJS Intro
SockJS Intro
Ngoc Dao
 
Easy distributed load test with Tsung
Easy distributed load test with TsungEasy distributed load test with Tsung
Easy distributed load test with Tsung
Ngoc Dao
 
How to start using Scala
How to start using ScalaHow to start using Scala
How to start using Scala
Ngoc Dao
 
Camellia General
Camellia GeneralCamellia General
Camellia General
Ngoc Dao
 

Plus de Ngoc Dao (16)

Model with actors and implement with Akka
Model with actors and implement with AkkaModel with actors and implement with Akka
Model with actors and implement with Akka
 
BIG DATA サービス と ツール
BIG DATA サービス と ツールBIG DATA サービス と ツール
BIG DATA サービス と ツール
 
Actor-based concurrency and Akka Fundamentals
Actor-based concurrency and Akka FundamentalsActor-based concurrency and Akka Fundamentals
Actor-based concurrency and Akka Fundamentals
 
SockJS Intro
SockJS IntroSockJS Intro
SockJS Intro
 
Easy distributed load test with Tsung
Easy distributed load test with TsungEasy distributed load test with Tsung
Easy distributed load test with Tsung
 
How to start using Scala
How to start using ScalaHow to start using Scala
How to start using Scala
 
Cloud Erlang
Cloud ErlangCloud Erlang
Cloud Erlang
 
Những lỗi bảo mật web thường gặp ở phần application
Những lỗi bảo mật web thường gặp ở phần applicationNhững lỗi bảo mật web thường gặp ở phần application
Những lỗi bảo mật web thường gặp ở phần application
 
Erlang Web
Erlang WebErlang Web
Erlang Web
 
Nitrogen Web Framework
Nitrogen Web FrameworkNitrogen Web Framework
Nitrogen Web Framework
 
スポイトができるまで
スポイトができるまでスポイトができるまで
スポイトができるまで
 
Camellia General
Camellia GeneralCamellia General
Camellia General
 
Sinh hoat CLB tin hoc Komaba lan 2 - Phat bieu cua Ngoc
Sinh hoat CLB tin hoc Komaba lan 2 - Phat bieu cua NgocSinh hoat CLB tin hoc Komaba lan 2 - Phat bieu cua Ngoc
Sinh hoat CLB tin hoc Komaba lan 2 - Phat bieu cua Ngoc
 
Sinh hoat CLB tin hoc Komaba lan 1 - Phat bieu cua G
Sinh hoat CLB tin hoc Komaba lan 1 - Phat bieu cua GSinh hoat CLB tin hoc Komaba lan 1 - Phat bieu cua G
Sinh hoat CLB tin hoc Komaba lan 1 - Phat bieu cua G
 
Sinh hoat CLB tin hoc Komaba lan 1 - Phat bieu cua Ngoc
Sinh hoat CLB tin hoc Komaba lan 1 - Phat bieu cua NgocSinh hoat CLB tin hoc Komaba lan 1 - Phat bieu cua Ngoc
Sinh hoat CLB tin hoc Komaba lan 1 - Phat bieu cua Ngoc
 
Sinh hoat CLB tin hoc Komaba lan 1 - Phat bieu cua Hung
Sinh hoat CLB tin hoc Komaba lan 1 - Phat bieu cua HungSinh hoat CLB tin hoc Komaba lan 1 - Phat bieu cua Hung
Sinh hoat CLB tin hoc Komaba lan 1 - Phat bieu cua Hung
 

Xitrum @ Scala Conference in Japan 2013

  • 1. Xitrum - a Scala framework inspired by Rails Slides are in English, but because there are many Japanese Scala Conference in Japan 2013 in the audience, Ngoc ( ゴック ) I will try talk in Japanese
  • 2. Self introduction ● Ngoc ( ゴック ), from Vietnam ● Working in Tokyo, at Mobilus: http://mobilus.co.jp ● Creating chat systems for smartphones using Scala
  • 3. What is Xitrum ● Scala web framework + standalone HTTP(S) server ● Inspired by Rails, not a Rails clone ● Main features: async and clustered ● Clustering is in-process: - Very fast - You don't need a separate server, e.g. Redis, memcached ● Based on Netty, Hazelcast, and Akka: - Netty => async IO - Hazelcast => clustered data (may be removed when Akka's clustering feature is mature) - Akka => remote code (not clustered code yet) ● Clustering feature in Akka 2.1 is still experimental, hope Akka 2.2 will be released soon
  • 4. One instance Cluster Akka
  • 5. Why I created Xitrum ● I came to Scala in 2010, from Ruby ● In 2010, Play did not support Scala ● There was Scalatra and Lift, but: - Scalatra did not have many features - Lift was not easy to use (from a Rubyist perspective) => I decided to create something in between: - More featureful than Scalatra - Easier to use than Lift Scalatra <---- Xitrum ----> Lift ● I have used used Xitrum in most of my projects: chat systems, API server for smartphones, realtime web sites etc.
  • 6. Xitrum features ● Async and clustered ● WebSocket, SockJS (like Socket.IO, but easier) ● Routes are collected automatically, like JAX-RS ● Scalate template engine ● i18n based on GNU gettext ● Standalone HTTP(S) server: serves static files very fast - Small files are cached in memory - Big files are sent using NIO’s zero copy ● Many more, see: http://ngocdaothanh.github.com/xitrum/
  • 7. Demo ● Online demo: http://ngocdaothanh.github.com/xitrum/ ● Source code: https://github.com/ngocdaothanh/xitrum-demos I will show you: ● Routes collecting ● Clustering