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

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Último (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

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 )