SlideShare una empresa de Scribd logo
1 de 10
Lift のチュートリアルを改造
して
Twitter 連携チャットを作る
Scala 勉強会第 9 回 in 渋谷
鹿島和郎(かしまかずお)
自己紹介
• 鹿島和郎(かしまかずお)
• 今日は時間があまりないので省略。
Agenda
• Chat App demo
• Programs used
– Lift
– Dispatch
• Code reading
• Related Technologies
– OAuth
– Comet
Chat App demo
• Authentication (OAuth)
• Callback
• Chat (Comet)
• Known issues
This app uses…
• Lift
– Web framework
– View first
– http://liftweb.net/
• Databinder Dispatch
– Library for http and http services
– Written in Scala
– http://dispatch.databinder.net/About
Code reading
• Basics
– index.html & OAuthTest.scala
– Boot.scala
– TwitterCallback.scala
• Comet
– index.html & Chat.scala
• Model
– User.scala
OAuth
• Players
– Provider (Twitter)
– Consumer (app)
– User (human)
• Steps
– The owner of the app registers it on dev.twitter.com.
– The user approves the app to use his resource via
API.
– The app gets an access token.
– The app uses the access token to use the API.
• http://www.atmarkit.co.jp/fsecurity/special/106oa
uth/oauth02.html
Comet
• Traditional web apps (pull)
– Request & response
– Need real time?
→ A typical approach is Ajax polling.
• Comet (push)
– Server sends data when it’s ready.
– How? → Several approaches
Comet (cont.)
• Implementation models
– Streaming
– Long polling (★ 今回はこっち、のはず )
• Server side
– Different challenges, approaches
→ Out of scope of this presentation
• 参考
– Wikipediaのエントリ
– Comet の正しい使い方:奥さん( Cyboze
Labs )
Comet (cont.)
• Implementation models
– Streaming
– Long polling (★ 今回はこっち、のはず )
• Server side
– Different challenges, approaches
→ Out of scope of this presentation
• 参考
– Wikipediaのエントリ
– Comet の正しい使い方:奥さん( Cyboze
Labs )

Más contenido relacionado

Destacado

横浜オープンデータソリューション発展委員会について
横浜オープンデータソリューション発展委員会について横浜オープンデータソリューション発展委員会について
横浜オープンデータソリューション発展委員会について裕樹 杉浦
 
Pres IDE09116017
Pres IDE09116017Pres IDE09116017
Pres IDE09116017GRECIA77
 
「多⽂化共⽣社会形成における地⽅⾃治体の役割 ―県/市レベルの移⺠政策と実践についての⽇タイ対話」
「多⽂化共⽣社会形成における地⽅⾃治体の役割 ―県/市レベルの移⺠政策と実践についての⽇タイ対話」「多⽂化共⽣社会形成における地⽅⾃治体の役割 ―県/市レベルの移⺠政策と実践についての⽇タイ対話」
「多⽂化共⽣社会形成における地⽅⾃治体の役割 ―県/市レベルの移⺠政策と実践についての⽇タイ対話」裕樹 杉浦
 
Compressor Station Heat Recovery & Zsi Technology
Compressor Station Heat Recovery & Zsi TechnologyCompressor Station Heat Recovery & Zsi Technology
Compressor Station Heat Recovery & Zsi Technologydcousino
 
第5回scala勉強会in渋谷
第5回scala勉強会in渋谷第5回scala勉強会in渋谷
第5回scala勉強会in渋谷k4200
 
Zero Stage Introduction
Zero Stage IntroductionZero Stage Introduction
Zero Stage Introductiondcousino
 

Destacado (6)

横浜オープンデータソリューション発展委員会について
横浜オープンデータソリューション発展委員会について横浜オープンデータソリューション発展委員会について
横浜オープンデータソリューション発展委員会について
 
Pres IDE09116017
Pres IDE09116017Pres IDE09116017
Pres IDE09116017
 
「多⽂化共⽣社会形成における地⽅⾃治体の役割 ―県/市レベルの移⺠政策と実践についての⽇タイ対話」
「多⽂化共⽣社会形成における地⽅⾃治体の役割 ―県/市レベルの移⺠政策と実践についての⽇タイ対話」「多⽂化共⽣社会形成における地⽅⾃治体の役割 ―県/市レベルの移⺠政策と実践についての⽇タイ対話」
「多⽂化共⽣社会形成における地⽅⾃治体の役割 ―県/市レベルの移⺠政策と実践についての⽇タイ対話」
 
Compressor Station Heat Recovery & Zsi Technology
Compressor Station Heat Recovery & Zsi TechnologyCompressor Station Heat Recovery & Zsi Technology
Compressor Station Heat Recovery & Zsi Technology
 
第5回scala勉強会in渋谷
第5回scala勉強会in渋谷第5回scala勉強会in渋谷
第5回scala勉強会in渋谷
 
Zero Stage Introduction
Zero Stage IntroductionZero Stage Introduction
Zero Stage Introduction
 

Similar a Lift のチュートリアルを改造して Twitter 連携チャットを作る - Scala 勉強会第 9 回 in 渋谷

Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGuillaume Laforge
 
Cloud Services Powered by IBM SoftLayer and NetflixOSS
Cloud Services Powered by IBM SoftLayer and NetflixOSSCloud Services Powered by IBM SoftLayer and NetflixOSS
Cloud Services Powered by IBM SoftLayer and NetflixOSSaspyker
 
Delivering Developer Tools at Scale
Delivering Developer Tools at ScaleDelivering Developer Tools at Scale
Delivering Developer Tools at ScaleOracle Developers
 
Create Salesforce online IDE in 30 minutes
Create Salesforce online IDE in 30 minutesCreate Salesforce online IDE in 30 minutes
Create Salesforce online IDE in 30 minutesJitendra Zaa
 
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignalITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignalITCamp
 
DEV117 - Unleash the Power of the AppDev Pack and Node.js in Domino
DEV117 - Unleash the Power of the AppDev Pack and Node.js in DominoDEV117 - Unleash the Power of the AppDev Pack and Node.js in Domino
DEV117 - Unleash the Power of the AppDev Pack and Node.js in DominoHeiko Voigt
 
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignalBuilding modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignalAlessandro Pilotti
 
Don Thorp & Marshall Culpepper: Advanced Titanium Development for Android
Don Thorp & Marshall Culpepper: Advanced Titanium Development for AndroidDon Thorp & Marshall Culpepper: Advanced Titanium Development for Android
Don Thorp & Marshall Culpepper: Advanced Titanium Development for AndroidAxway Appcelerator
 
Ruby on Rails Penetration Testing
Ruby on Rails Penetration TestingRuby on Rails Penetration Testing
Ruby on Rails Penetration Testing3S Labs
 
Enabling .NET Apps with Monitoring and Management Using Steeltoe
Enabling .NET Apps with Monitoring and Management Using SteeltoeEnabling .NET Apps with Monitoring and Management Using Steeltoe
Enabling .NET Apps with Monitoring and Management Using SteeltoeVMware Tanzu
 
APIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadAPIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadSoftware Guru
 
01/2009 - Portral development with liferay
01/2009 - Portral development with liferay01/2009 - Portral development with liferay
01/2009 - Portral development with liferaydaveayan
 
Operating a High Velocity Large Organization with Spring Cloud Microservices
Operating a High Velocity Large Organization with Spring Cloud MicroservicesOperating a High Velocity Large Organization with Spring Cloud Microservices
Operating a High Velocity Large Organization with Spring Cloud MicroservicesNoriaki Tatsumi
 
Building intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQueryBuilding intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQueryAlek Davis
 
Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17Vinay Kumar
 
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015WaveMaker, Inc.
 

Similar a Lift のチュートリアルを改造して Twitter 連携チャットを作る - Scala 勉強会第 9 回 in 渋谷 (20)

Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
 
Cloud Services Powered by IBM SoftLayer and NetflixOSS
Cloud Services Powered by IBM SoftLayer and NetflixOSSCloud Services Powered by IBM SoftLayer and NetflixOSS
Cloud Services Powered by IBM SoftLayer and NetflixOSS
 
Delivering Developer Tools at Scale
Delivering Developer Tools at ScaleDelivering Developer Tools at Scale
Delivering Developer Tools at Scale
 
Create Salesforce online IDE in 30 minutes
Create Salesforce online IDE in 30 minutesCreate Salesforce online IDE in 30 minutes
Create Salesforce online IDE in 30 minutes
 
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignalITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
 
DEV117 - Unleash the Power of the AppDev Pack and Node.js in Domino
DEV117 - Unleash the Power of the AppDev Pack and Node.js in DominoDEV117 - Unleash the Power of the AppDev Pack and Node.js in Domino
DEV117 - Unleash the Power of the AppDev Pack and Node.js in Domino
 
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignalBuilding modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
 
Don Thorp & Marshall Culpepper: Advanced Titanium Development for Android
Don Thorp & Marshall Culpepper: Advanced Titanium Development for AndroidDon Thorp & Marshall Culpepper: Advanced Titanium Development for Android
Don Thorp & Marshall Culpepper: Advanced Titanium Development for Android
 
Ruby on Rails Penetration Testing
Ruby on Rails Penetration TestingRuby on Rails Penetration Testing
Ruby on Rails Penetration Testing
 
Meetup callback
Meetup callbackMeetup callback
Meetup callback
 
Enabling .NET Apps with Monitoring and Management Using Steeltoe
Enabling .NET Apps with Monitoring and Management Using SteeltoeEnabling .NET Apps with Monitoring and Management Using Steeltoe
Enabling .NET Apps with Monitoring and Management Using Steeltoe
 
APIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadAPIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidad
 
SGCE 2015 REST APIs
SGCE 2015 REST APIsSGCE 2015 REST APIs
SGCE 2015 REST APIs
 
01/2009 - Portral development with liferay
01/2009 - Portral development with liferay01/2009 - Portral development with liferay
01/2009 - Portral development with liferay
 
Operating a High Velocity Large Organization with Spring Cloud Microservices
Operating a High Velocity Large Organization with Spring Cloud MicroservicesOperating a High Velocity Large Organization with Spring Cloud Microservices
Operating a High Velocity Large Organization with Spring Cloud Microservices
 
Building intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQueryBuilding intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQuery
 
Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17
 
Rhodes
RhodesRhodes
Rhodes
 
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015
 
Swagger code motion talk
Swagger code motion talkSwagger code motion talk
Swagger code motion talk
 

Más de k4200

Play meetup-2-dev-best-practices
Play meetup-2-dev-best-practicesPlay meetup-2-dev-best-practices
Play meetup-2-dev-best-practicesk4200
 
sbt 0.10 for beginners?
sbt 0.10 for beginners?sbt 0.10 for beginners?
sbt 0.10 for beginners?k4200
 
Lifthub (rpscala #31)
Lifthub (rpscala #31)Lifthub (rpscala #31)
Lifthub (rpscala #31)k4200
 
Lifthub (#rpscala 26)
Lifthub (#rpscala 26)Lifthub (#rpscala 26)
Lifthub (#rpscala 26)k4200
 
Scala勉強会 in 渋谷 2010→2011(鹿島)
Scala勉強会 in 渋谷 2010→2011(鹿島)Scala勉強会 in 渋谷 2010→2011(鹿島)
Scala勉強会 in 渋谷 2010→2011(鹿島)k4200
 
Grass
GrassGrass
Grassk4200
 
第4回scala勉強会in渋谷
第4回scala勉強会in渋谷第4回scala勉強会in渋谷
第4回scala勉強会in渋谷k4200
 

Más de k4200 (7)

Play meetup-2-dev-best-practices
Play meetup-2-dev-best-practicesPlay meetup-2-dev-best-practices
Play meetup-2-dev-best-practices
 
sbt 0.10 for beginners?
sbt 0.10 for beginners?sbt 0.10 for beginners?
sbt 0.10 for beginners?
 
Lifthub (rpscala #31)
Lifthub (rpscala #31)Lifthub (rpscala #31)
Lifthub (rpscala #31)
 
Lifthub (#rpscala 26)
Lifthub (#rpscala 26)Lifthub (#rpscala 26)
Lifthub (#rpscala 26)
 
Scala勉強会 in 渋谷 2010→2011(鹿島)
Scala勉強会 in 渋谷 2010→2011(鹿島)Scala勉強会 in 渋谷 2010→2011(鹿島)
Scala勉強会 in 渋谷 2010→2011(鹿島)
 
Grass
GrassGrass
Grass
 
第4回scala勉強会in渋谷
第4回scala勉強会in渋谷第4回scala勉強会in渋谷
第4回scala勉強会in渋谷
 

Último

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 

Último (20)

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 

Lift のチュートリアルを改造して Twitter 連携チャットを作る - Scala 勉強会第 9 回 in 渋谷

  • 1. Lift のチュートリアルを改造 して Twitter 連携チャットを作る Scala 勉強会第 9 回 in 渋谷 鹿島和郎(かしまかずお)
  • 3. Agenda • Chat App demo • Programs used – Lift – Dispatch • Code reading • Related Technologies – OAuth – Comet
  • 4. Chat App demo • Authentication (OAuth) • Callback • Chat (Comet) • Known issues
  • 5. This app uses… • Lift – Web framework – View first – http://liftweb.net/ • Databinder Dispatch – Library for http and http services – Written in Scala – http://dispatch.databinder.net/About
  • 6. Code reading • Basics – index.html & OAuthTest.scala – Boot.scala – TwitterCallback.scala • Comet – index.html & Chat.scala • Model – User.scala
  • 7. OAuth • Players – Provider (Twitter) – Consumer (app) – User (human) • Steps – The owner of the app registers it on dev.twitter.com. – The user approves the app to use his resource via API. – The app gets an access token. – The app uses the access token to use the API. • http://www.atmarkit.co.jp/fsecurity/special/106oa uth/oauth02.html
  • 8. Comet • Traditional web apps (pull) – Request & response – Need real time? → A typical approach is Ajax polling. • Comet (push) – Server sends data when it’s ready. – How? → Several approaches
  • 9. Comet (cont.) • Implementation models – Streaming – Long polling (★ 今回はこっち、のはず ) • Server side – Different challenges, approaches → Out of scope of this presentation • 参考 – Wikipediaのエントリ – Comet の正しい使い方:奥さん( Cyboze Labs )
  • 10. Comet (cont.) • Implementation models – Streaming – Long polling (★ 今回はこっち、のはず ) • Server side – Different challenges, approaches → Out of scope of this presentation • 参考 – Wikipediaのエントリ – Comet の正しい使い方:奥さん( Cyboze Labs )