SlideShare uma empresa Scribd logo
1 de 54
Baixar para ler offline
Streaming Service upon
   Flex and Rails




RhemaTech
We work in Rhematech Inc.




RhemaTech
We provide live Streaming
   service over Internet on web




RhemaTech
100+ concurrent channels




RhemaTech
50000+ concurrent audience
   per channel




RhemaTech
Short demo
   (todo)




RhemaTech
System Structure




RhemaTech
Encoder/Audience UI    Flex


             Event Management
                  System
                                   Rails
            Channel Management
                  System



               Media Server       Java/C++

RhemaTech
Main Challenges :
   Cost and Scalability




RhemaTech
We choose Flex and Rails
   because of




RhemaTech
COST




RhemaTech
We were used to be .NET
   users




RhemaTech
We suffered from high
   development and
   deployment cost



RhemaTech
It fails to respond dynamic
   requirements




RhemaTech
We did take Silverlight into
   consideration




RhemaTech
Not popular enough




RhemaTech
Poor designer support




RhemaTech
No alternatives for media
   server




RhemaTech
Flex and Rails save us




RhemaTech
Serve multimedia on web




RhemaTech
Rich user interaction




RhemaTech
Run over standard protocols




RhemaTech
Low development and
   deployment cost




RhemaTech
Good looking




RhemaTech
Service on mobile device
   (in the future)




RhemaTech
Lessons we learned




RhemaTech
#1. Be RESTful




RhemaTech
Consistent API design




RhemaTech
Consistent error handling




RhemaTech
Easier to extend and modify




RhemaTech
Always return errors in
   JSON/XML with 200 Ok




RhemaTech
flash.net.URLLoader does not
   handle HTTP error code well




RhemaTech
remove
   protect_from_forgery
   from environment.rb



RhemaTech
#2. Use JSON instead of XML




RhemaTech
Less Traffic
   (quite important for large
   service)



RhemaTech
Easier to parse complex
   response




RhemaTech
Rails JSON Gotcha




RhemaTech
Rails does not unescape
   unicode while decoding




RhemaTech
Fixed in Rails 2.3




RhemaTech
#3. Flash uses different
   session for file uploading on
   non-IE browsers



RhemaTech
Flash uses its http socket for
   file uploading on non-IE
   browsers



RhemaTech
Work Around -
   Session Migration




RhemaTech
#4. Handle Browser
   onbeforeunload event.




RhemaTech
Flash does not close
   NetConnection until you
   close all browser windows!



RhemaTech
#5. Create a controller to
   deliver debug .swf file in
   development mode.



RhemaTech
route.rb

     map.connect '/encoder.swf',
        :controller => “debugquot;,
        :action => quot;encoderquot;
        if RAILS_ENV == ‘development'




RhemaTech
debug_controller.rb

    def encoder
     send_file(path_to_debug_swf, options)
    end




RhemaTech
Makes debug and trace with
   rails much easier




RhemaTech
#6. Pick right video codec




RhemaTech
H263 vs. VP6 vs. H264




RhemaTech
H.263
   Pros: Flash Player build-in
   Cons: Poor quality



RhemaTech
VP6
   Pros: Good video quality
   Cons: Expensive



RhemaTech
H264
   Pros: Good Quality
   Cons: 2~6s more latency



RhemaTech
Questions?




RhemaTech

Mais conteúdo relacionado

Mais procurados

How Browser and server works
How Browser and server worksHow Browser and server works
How Browser and server works
Web Developer
 

Mais procurados (6)

Camunda BPM 7.2: Connectors, Data, Scripting (English)
Camunda BPM 7.2: Connectors, Data, Scripting (English)Camunda BPM 7.2: Connectors, Data, Scripting (English)
Camunda BPM 7.2: Connectors, Data, Scripting (English)
 
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy ApplicationsAdrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
 
Magento 2: A technical overview
Magento 2: A technical overviewMagento 2: A technical overview
Magento 2: A technical overview
 
How Browser and server works
How Browser and server worksHow Browser and server works
How Browser and server works
 
Webspheremqtrainingonline
WebspheremqtrainingonlineWebspheremqtrainingonline
Webspheremqtrainingonline
 
Introduction - The Hack Session
Introduction - The Hack SessionIntroduction - The Hack Session
Introduction - The Hack Session
 

Destaque (17)

Rich User Interaction with SVG
Rich User Interaction with SVGRich User Interaction with SVG
Rich User Interaction with SVG
 
P1a.10 You're in charge
P1a.10 You're in chargeP1a.10 You're in charge
P1a.10 You're in charge
 
German AS
German ASGerman AS
German AS
 
INTENTO
INTENTOINTENTO
INTENTO
 
20061207: UK Federation 101
20061207: UK Federation 10120061207: UK Federation 101
20061207: UK Federation 101
 
Porque Perros odian hallowen (pourquoi les chiens détestent Halloween)
Porque Perros odian hallowen (pourquoi les chiens détestent Halloween)Porque Perros odian hallowen (pourquoi les chiens détestent Halloween)
Porque Perros odian hallowen (pourquoi les chiens détestent Halloween)
 
Social Software
Social SoftwareSocial Software
Social Software
 
Qualitrak
QualitrakQualitrak
Qualitrak
 
My Chrismas Holiday
My Chrismas HolidayMy Chrismas Holiday
My Chrismas Holiday
 
Sportiev
SportievSportiev
Sportiev
 
ITC e-choupal
ITC e-choupalITC e-choupal
ITC e-choupal
 
Projects Working In Rural India
Projects Working In Rural IndiaProjects Working In Rural India
Projects Working In Rural India
 
Vendor Selection And Interaction
Vendor Selection And InteractionVendor Selection And Interaction
Vendor Selection And Interaction
 
Ratio Analysis
Ratio AnalysisRatio Analysis
Ratio Analysis
 
Supply Chain Management
Supply Chain ManagementSupply Chain Management
Supply Chain Management
 
Cost Of Capital
Cost Of CapitalCost Of Capital
Cost Of Capital
 
Demand Forecasting
Demand ForecastingDemand Forecasting
Demand Forecasting
 

Semelhante a Streaming Service on Flex and Rails

Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010
arif44
 
Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8
Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8
Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8
helpsoft01
 
Rpc, Rmi And Webservices 2
Rpc, Rmi And Webservices 2Rpc, Rmi And Webservices 2
Rpc, Rmi And Webservices 2
groupe0D
 

Semelhante a Streaming Service on Flex and Rails (20)

Platform as a Runtime - PaaR QCON 2024 - Final
Platform as a Runtime - PaaR QCON 2024 - FinalPlatform as a Runtime - PaaR QCON 2024 - Final
Platform as a Runtime - PaaR QCON 2024 - Final
 
T2 Web Framework
T2 Web FrameworkT2 Web Framework
T2 Web Framework
 
unit1 part 1 sem4 php.docx
unit1 part 1 sem4 php.docxunit1 part 1 sem4 php.docx
unit1 part 1 sem4 php.docx
 
Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010
 
Ajax World West
Ajax World WestAjax World West
Ajax World West
 
Rebaca's Video Delivery Expertise Overview
Rebaca's Video Delivery Expertise OverviewRebaca's Video Delivery Expertise Overview
Rebaca's Video Delivery Expertise Overview
 
ReproNow—Save Time Reproducing and Triaging Security Bugs
ReproNow—Save Time Reproducing and Triaging Security BugsReproNow—Save Time Reproducing and Triaging Security Bugs
ReproNow—Save Time Reproducing and Triaging Security Bugs
 
Si so product 1 day technical
Si so product 1 day technicalSi so product 1 day technical
Si so product 1 day technical
 
Node Summit 2016: Web App Architectures
Node Summit 2016:  Web App ArchitecturesNode Summit 2016:  Web App Architectures
Node Summit 2016: Web App Architectures
 
Deploying Microservices using AWS Fargate (CON315-R1) - AWS re:Invent 2018
Deploying Microservices using AWS Fargate (CON315-R1) - AWS re:Invent 2018Deploying Microservices using AWS Fargate (CON315-R1) - AWS re:Invent 2018
Deploying Microservices using AWS Fargate (CON315-R1) - AWS re:Invent 2018
 
Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8
Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8
Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8
 
Rpc, Rmi And Webservices 2
Rpc, Rmi And Webservices 2Rpc, Rmi And Webservices 2
Rpc, Rmi And Webservices 2
 
The Good, The Bad, and The Avro (Graham Stirling, Saxo Bank and David Navalho...
The Good, The Bad, and The Avro (Graham Stirling, Saxo Bank and David Navalho...The Good, The Bad, and The Avro (Graham Stirling, Saxo Bank and David Navalho...
The Good, The Bad, and The Avro (Graham Stirling, Saxo Bank and David Navalho...
 
Understanding and Developing Web Services: For DBAs and Database Developers
Understanding and Developing Web Services: For DBAs and Database DevelopersUnderstanding and Developing Web Services: For DBAs and Database Developers
Understanding and Developing Web Services: For DBAs and Database Developers
 
Understanding and Developing Web Services - For DBAs and Developers
Understanding and Developing Web Services - For DBAs and DevelopersUnderstanding and Developing Web Services - For DBAs and Developers
Understanding and Developing Web Services - For DBAs and Developers
 
Breaking free from monoliths: revolutionizing development with Livewire and S...
Breaking free from monoliths: revolutionizing development with Livewire and S...Breaking free from monoliths: revolutionizing development with Livewire and S...
Breaking free from monoliths: revolutionizing development with Livewire and S...
 
Java EE Introduction Course
Java EE Introduction CourseJava EE Introduction Course
Java EE Introduction Course
 
Webdevelopment
WebdevelopmentWebdevelopment
Webdevelopment
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Choosing the right Rich Internet Application technology path
Choosing the right Rich Internet Application technology pathChoosing the right Rich Internet Application technology path
Choosing the right Rich Internet Application technology path
 

Último

Último (20)

Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 

Streaming Service on Flex and Rails