SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
Streams API
09/12/2015
youenn/calvaris
What is it?
• Enabling I/O processing
• Read chunks asynchronously
• Write chunks asynchronously
• Pipe from a stream to another
• Automatic transformations
• Any kind of chunk
• Strings
• ArrayBuffers
• Potatoes
• Any JSValue cocktail
What is it good for?
• Get me this video segment ASAP
• Without streams API: download it, then read it
• With the streams API + MSE: start downloading it and pipe it
to MSE
• Using SourceBuffer.appendStream
• Get me this WebSocket-like connection on HTTP
• ReadableStream/WritableStream to receive/send messages
• With HTTP/2, just one TCP/IP connection for both WebSocket-
like channels and regular HTTP content
• Any I/O use-case actually…
• Wrapping of all data sources in a single clean model
• HTTP, WebRTC, file system
What is in the spec?
• Stable
• ReadableStream
• Except pipe operations (related to WritableStream)
• Beta
• WritableStream
• Experimental
• TransformStream
• ReadableByteArrayStream
• May be almost merged with ReadableStream
What it is good for/bad for,
internals?
• Promise based
• Async is good but
• Still a bit expensive
• Use it for arrays, objects
• Probably not to pass one byte after one byte
Where will it be?
• Fetch API
• Retrieve data progressively
• Send data progressively
• MSE API
• Append stream
• WebRTC
• Plan to use it
ReadableStream API remarks
• ReadableStream : locked, cancel, getReader,
pipeThrough, pipeTo, tee.
• Underlying source : start, pull, cancel.
• Strategy : highWaterMark, size
• Controller: enqueue, close, error, desiredSize
• Reader : closed, cancel, read and releaseLock
How is it working?
httpResponseBody.pipeThrough(decom pressorTransform )
.pipeThrough(ignoreNonIm ageFilesTransform )
.pipeTo(m ediaG allery);
Where is it?
• Chrome
• Shipped
• ReadableStream tied to the Fetch API response
• Ongoing
• ReadableStream created by scripts
• ReadableStream for progressive uploads using fetch
• Mozilla
• Will start 25/12/2015 (roughly)
• IE
• Support of an earlier version of stream/XHR as producer
• WebKit
• ReadableStream fully implemented
• pipeTo to be broken by the spec
• WritableStream fully implemented
Implementation Story
First Approach – Initial steps
• C++ implementation
• Regular WebIDL to bind API with JavaScriptCore
• Needed improved promise binding code
• Initial prototype supporting byte arrays
• Nicely working
• Not too complex
First Approach – second steps
• Support of any JavaScript value
• WebIDL
• Starting to add special cases in the binding generator
• Adding a lot of JS code in WebCore/bindings/js
• Storing JS values, making them not collectable
• Calling JS functions
• Handling of asynchronous behavior, JS promises
• Overall conclusion
• Code difficult to relate with the specification
• Difficult to keep proper reference counting
• Templates to add further specialization for byte array
Second Approach – JS Builtins
• JS Builtin is a JavaScriptCore feature
• Introduced a few years ago
• Promise code is mostly JS builtin
• Enable JS Builtin into WebCore
• Integrate it with WebIDL binding generator
• Streams API implementation
• WebIDL code
• JavaScript code
• Some limited C++ code
• 80 lines
• Except for automatically generated code
JS Builtins tied to WebIDL
• WebIDL
• JavaScript built-in
JS Builtins calling C++ methods
• Private keyword
JS Builtins misc
• Conditional compilation
• @conditional
• Constructor as JS built-in
• @assert
• JS built-in functions (helper routines) attached to the
global object
• @internal
JS Builtins build
• Update CMakeLists.txt
• Add IDL file in WebCore_NON_SVG_IDL_FILES
• Add JS file(s) in WebCore_BUILTINS_SOURCES
• 1 file for WebIDL tied routines (stored in the prototype)
• 0/1/+ files for helper routines (stored in the global object)
• Update Source/WebCore/bindings/js/WebCoreBuiltins.h
and Source/WebCore/bindings/js/WebCoreBuiltins.cpp
• When adding a new JS built-in file
• To be automated soon hopefully
Overall experience
• Easier to write JS code then to write C++ binding code
• No more crashes, no more memory leaks, no more ref-
counting cycles
• Performances is not really an issue
• Apple made measurements on the Promise implementation
and saw some improvements
• Everything is nice, except…
• No JS built-in code debugger
• Back to console.log(“potato 1”);
• JS builtin security issues
Security issues
• JS builtins run in the same world with the same
GlobalObject as user scripts
• Modifying a prototype or a user object may affect JS built-in
code
• First possibility: JS built-in code may break
• What if mediaDevices is overridden by user scripts?
• What if mediaDevices prototype is changed.
Security issues – leaking information
Security issues – current rules
• Do not use functions under the control of the user
operations.push(…)
operations.@push(...)
• Do not use prototype of objects under the control of the user
function processValue(promise) {
promise.then(…)
}
function processValue(promise) {
promise.@then(…) // ok but it may break
}
function processValue(promise) {
@Promise.prototype. @then.@call(…) // ok but so unreadable
}
• Beware of Promise
• Might want to use InternalPromise if you are doing chaining
Security issues – we need something
better
• So easy to fall into that trap
• Not so easy to find the holes
• How can we improve the situation?
• Testing tool to catch these errors
• JS builtin check style?
• JS proxy object in Debug mode to control how are accessed objects
• Sanitizers
• Should we change the infrastructure?
• Run the built-ins in a more secure environment
• Chrome is doing that in a completely separate world
• Cannot pass promises, JS objects.... Between the worlds
• Input most welcome
Tentative conclusion
• Streams API is
• Very maintainable
• Fast enough (more study needed)
• But
• Potential security issues
• We fixed the ones we know of
• Need to improve JS built-in tooling
• Think about JS built-ins when adding WebCore/JSC
specific code
• Like in WebCore/bindings/js

Contenu connexe

Tendances

OpenNebula in a Multiuser Environment
OpenNebula in a Multiuser EnvironmentOpenNebula in a Multiuser Environment
OpenNebula in a Multiuser EnvironmentNETWAYS
 
Introduction of eBPF - 時下最夯的Linux Technology
Introduction of eBPF - 時下最夯的Linux Technology Introduction of eBPF - 時下最夯的Linux Technology
Introduction of eBPF - 時下最夯的Linux Technology Jace Liang
 
The Beam Vision for Portability: "Write once run anywhere"
The Beam Vision for Portability: "Write once run anywhere"The Beam Vision for Portability: "Write once run anywhere"
The Beam Vision for Portability: "Write once run anywhere"Knoldus Inc.
 
Kubernetes CRI containerd integration by Lantao Liu (Google)
Kubernetes CRI containerd integration by Lantao Liu (Google)Kubernetes CRI containerd integration by Lantao Liu (Google)
Kubernetes CRI containerd integration by Lantao Liu (Google)Docker, Inc.
 
End-to-End Reactive Data Access Using R2DBC with RSocket and Proteus
End-to-End Reactive Data Access Using R2DBC with RSocket and ProteusEnd-to-End Reactive Data Access Using R2DBC with RSocket and Proteus
End-to-End Reactive Data Access Using R2DBC with RSocket and ProteusVMware Tanzu
 
gRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at SquaregRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at SquareApigee | Google Cloud
 
Angular v2 et plus : le futur du développement d'applications en entreprise
Angular v2 et plus : le futur du développement d'applications en entrepriseAngular v2 et plus : le futur du développement d'applications en entreprise
Angular v2 et plus : le futur du développement d'applications en entrepriseLINAGORA
 
2017 Microservices Practitioner Virtual Summit: The Mechanics of Deploying En...
2017 Microservices Practitioner Virtual Summit: The Mechanics of Deploying En...2017 Microservices Practitioner Virtual Summit: The Mechanics of Deploying En...
2017 Microservices Practitioner Virtual Summit: The Mechanics of Deploying En...Ambassador Labs
 
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...Srijan Technologies
 
Netty @Apple: Large Scale Deployment/Connectivity
Netty @Apple: Large Scale Deployment/ConnectivityNetty @Apple: Large Scale Deployment/Connectivity
Netty @Apple: Large Scale Deployment/ConnectivityC4Media
 
REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC!REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC!QAware GmbH
 
Leveraging the Power of containerd Events - Evan Hazlett
Leveraging the Power of containerd Events - Evan HazlettLeveraging the Power of containerd Events - Evan Hazlett
Leveraging the Power of containerd Events - Evan HazlettDocker, Inc.
 
TDC2017 | São Paulo - Trilha Containers How we figured out we had a SRE team ...
TDC2017 | São Paulo - Trilha Containers How we figured out we had a SRE team ...TDC2017 | São Paulo - Trilha Containers How we figured out we had a SRE team ...
TDC2017 | São Paulo - Trilha Containers How we figured out we had a SRE team ...tdc-globalcode
 
[Draft] Fast Prototyping with DPDK and eBPF in Containernet
[Draft] Fast Prototyping with DPDK and eBPF in Containernet[Draft] Fast Prototyping with DPDK and eBPF in Containernet
[Draft] Fast Prototyping with DPDK and eBPF in ContainernetAndrew Wang
 
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostusta
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostustaVincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostusta
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostustaVincitOy
 
KubeCon EU 2016: "rktnetes": what's new with container runtimes and Kubernetes
KubeCon EU 2016: "rktnetes": what's new with container runtimes and KubernetesKubeCon EU 2016: "rktnetes": what's new with container runtimes and Kubernetes
KubeCon EU 2016: "rktnetes": what's new with container runtimes and KubernetesKubeAcademy
 
K8s storage-glusterfs-20180210
K8s storage-glusterfs-20180210K8s storage-glusterfs-20180210
K8s storage-glusterfs-20180210Che-Chia Chang
 
Oslo Vancouver Project Update
Oslo Vancouver Project UpdateOslo Vancouver Project Update
Oslo Vancouver Project UpdateBen Nemec
 

Tendances (20)

OpenNebula in a Multiuser Environment
OpenNebula in a Multiuser EnvironmentOpenNebula in a Multiuser Environment
OpenNebula in a Multiuser Environment
 
Introduction of eBPF - 時下最夯的Linux Technology
Introduction of eBPF - 時下最夯的Linux Technology Introduction of eBPF - 時下最夯的Linux Technology
Introduction of eBPF - 時下最夯的Linux Technology
 
The Beam Vision for Portability: "Write once run anywhere"
The Beam Vision for Portability: "Write once run anywhere"The Beam Vision for Portability: "Write once run anywhere"
The Beam Vision for Portability: "Write once run anywhere"
 
Kubernetes CRI containerd integration by Lantao Liu (Google)
Kubernetes CRI containerd integration by Lantao Liu (Google)Kubernetes CRI containerd integration by Lantao Liu (Google)
Kubernetes CRI containerd integration by Lantao Liu (Google)
 
End-to-End Reactive Data Access Using R2DBC with RSocket and Proteus
End-to-End Reactive Data Access Using R2DBC with RSocket and ProteusEnd-to-End Reactive Data Access Using R2DBC with RSocket and Proteus
End-to-End Reactive Data Access Using R2DBC with RSocket and Proteus
 
gRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at SquaregRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at Square
 
Angular v2 et plus : le futur du développement d'applications en entreprise
Angular v2 et plus : le futur du développement d'applications en entrepriseAngular v2 et plus : le futur du développement d'applications en entreprise
Angular v2 et plus : le futur du développement d'applications en entreprise
 
2017 Microservices Practitioner Virtual Summit: The Mechanics of Deploying En...
2017 Microservices Practitioner Virtual Summit: The Mechanics of Deploying En...2017 Microservices Practitioner Virtual Summit: The Mechanics of Deploying En...
2017 Microservices Practitioner Virtual Summit: The Mechanics of Deploying En...
 
Breaking down a monolith
Breaking down a monolithBreaking down a monolith
Breaking down a monolith
 
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...
 
Netty @Apple: Large Scale Deployment/Connectivity
Netty @Apple: Large Scale Deployment/ConnectivityNetty @Apple: Large Scale Deployment/Connectivity
Netty @Apple: Large Scale Deployment/Connectivity
 
REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC!REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC!
 
CRI, OCI, and CRI-O
CRI, OCI, and CRI-OCRI, OCI, and CRI-O
CRI, OCI, and CRI-O
 
Leveraging the Power of containerd Events - Evan Hazlett
Leveraging the Power of containerd Events - Evan HazlettLeveraging the Power of containerd Events - Evan Hazlett
Leveraging the Power of containerd Events - Evan Hazlett
 
TDC2017 | São Paulo - Trilha Containers How we figured out we had a SRE team ...
TDC2017 | São Paulo - Trilha Containers How we figured out we had a SRE team ...TDC2017 | São Paulo - Trilha Containers How we figured out we had a SRE team ...
TDC2017 | São Paulo - Trilha Containers How we figured out we had a SRE team ...
 
[Draft] Fast Prototyping with DPDK and eBPF in Containernet
[Draft] Fast Prototyping with DPDK and eBPF in Containernet[Draft] Fast Prototyping with DPDK and eBPF in Containernet
[Draft] Fast Prototyping with DPDK and eBPF in Containernet
 
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostusta
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostustaVincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostusta
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostusta
 
KubeCon EU 2016: "rktnetes": what's new with container runtimes and Kubernetes
KubeCon EU 2016: "rktnetes": what's new with container runtimes and KubernetesKubeCon EU 2016: "rktnetes": what's new with container runtimes and Kubernetes
KubeCon EU 2016: "rktnetes": what's new with container runtimes and Kubernetes
 
K8s storage-glusterfs-20180210
K8s storage-glusterfs-20180210K8s storage-glusterfs-20180210
K8s storage-glusterfs-20180210
 
Oslo Vancouver Project Update
Oslo Vancouver Project UpdateOslo Vancouver Project Update
Oslo Vancouver Project Update
 

En vedette

Releasing the People's Data
Releasing the People's DataReleasing the People's Data
Releasing the People's DataOpen Data @ CTIC
 
Akirachix Engaging Women
Akirachix Engaging WomenAkirachix Engaging Women
Akirachix Engaging WomenWeb Gathering
 
Week 5 Whats The Big Idea - Emma Dicks
Week 5 Whats The Big Idea -  Emma DicksWeek 5 Whats The Big Idea -  Emma Dicks
Week 5 Whats The Big Idea - Emma DicksUCT Upstarts
 
OpenAIRE at the EC Consultation Workshop "Skills and Human Resources for e-In...
OpenAIRE at the EC Consultation Workshop "Skills and Human Resources for e-In...OpenAIRE at the EC Consultation Workshop "Skills and Human Resources for e-In...
OpenAIRE at the EC Consultation Workshop "Skills and Human Resources for e-In...OpenAIRE
 
In just five years 2011
In just five years 2011In just five years 2011
In just five years 2011VeracityMedia
 
Разработка под iPhone для начинающих
Разработка под iPhone для начинающихРазработка под iPhone для начинающих
Разработка под iPhone для начинающихtabtabus
 
Regional Newsletter (Winter 2014/15)
Regional Newsletter (Winter 2014/15)Regional Newsletter (Winter 2014/15)
Regional Newsletter (Winter 2014/15)ENPI FLEG
 
OCRFeeder (FOSDEM 2010)
OCRFeeder (FOSDEM 2010)OCRFeeder (FOSDEM 2010)
OCRFeeder (FOSDEM 2010)Igalia
 
InnovAction Lab 2015 - New Editions
InnovAction Lab 2015 - New EditionsInnovAction Lab 2015 - New Editions
InnovAction Lab 2015 - New EditionsCodemotion
 
Combining archetypes with FHIR in future-proof health information systems
Combining archetypes with FHIR in future-proof health information systemsCombining archetypes with FHIR in future-proof health information systems
Combining archetypes with FHIR in future-proof health information systemsyampeku
 
Creative Business Cup Competition Manual
Creative Business Cup Competition Manual Creative Business Cup Competition Manual
Creative Business Cup Competition Manual Startupi
 
Social Change Through Innovation as part of "Social Enterprise as an Agent of...
Social Change Through Innovation as part of "Social Enterprise as an Agent of...Social Change Through Innovation as part of "Social Enterprise as an Agent of...
Social Change Through Innovation as part of "Social Enterprise as an Agent of...Juan Sebastian Vasquez
 
Tut21-115-GauravKishore-FDS-Final
Tut21-115-GauravKishore-FDS-FinalTut21-115-GauravKishore-FDS-Final
Tut21-115-GauravKishore-FDS-FinalBolt Zhang
 

En vedette (20)

Active International
Active InternationalActive International
Active International
 
Releasing the People's Data
Releasing the People's DataReleasing the People's Data
Releasing the People's Data
 
Akirachix Engaging Women
Akirachix Engaging WomenAkirachix Engaging Women
Akirachix Engaging Women
 
Week 5 Whats The Big Idea - Emma Dicks
Week 5 Whats The Big Idea -  Emma DicksWeek 5 Whats The Big Idea -  Emma Dicks
Week 5 Whats The Big Idea - Emma Dicks
 
OpenAIRE at the EC Consultation Workshop "Skills and Human Resources for e-In...
OpenAIRE at the EC Consultation Workshop "Skills and Human Resources for e-In...OpenAIRE at the EC Consultation Workshop "Skills and Human Resources for e-In...
OpenAIRE at the EC Consultation Workshop "Skills and Human Resources for e-In...
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Quasar - Credentials
Quasar - CredentialsQuasar - Credentials
Quasar - Credentials
 
In just five years 2011
In just five years 2011In just five years 2011
In just five years 2011
 
DCU School of Physical Sciences
DCU School of Physical SciencesDCU School of Physical Sciences
DCU School of Physical Sciences
 
Euskal Valley v9
Euskal Valley v9Euskal Valley v9
Euskal Valley v9
 
Разработка под iPhone для начинающих
Разработка под iPhone для начинающихРазработка под iPhone для начинающих
Разработка под iPhone для начинающих
 
Rendezvény Navigátor Magazin Május
Rendezvény Navigátor Magazin MájusRendezvény Navigátor Magazin Május
Rendezvény Navigátor Magazin Május
 
MMD_Vision 2015
MMD_Vision 2015MMD_Vision 2015
MMD_Vision 2015
 
Regional Newsletter (Winter 2014/15)
Regional Newsletter (Winter 2014/15)Regional Newsletter (Winter 2014/15)
Regional Newsletter (Winter 2014/15)
 
OCRFeeder (FOSDEM 2010)
OCRFeeder (FOSDEM 2010)OCRFeeder (FOSDEM 2010)
OCRFeeder (FOSDEM 2010)
 
InnovAction Lab 2015 - New Editions
InnovAction Lab 2015 - New EditionsInnovAction Lab 2015 - New Editions
InnovAction Lab 2015 - New Editions
 
Combining archetypes with FHIR in future-proof health information systems
Combining archetypes with FHIR in future-proof health information systemsCombining archetypes with FHIR in future-proof health information systems
Combining archetypes with FHIR in future-proof health information systems
 
Creative Business Cup Competition Manual
Creative Business Cup Competition Manual Creative Business Cup Competition Manual
Creative Business Cup Competition Manual
 
Social Change Through Innovation as part of "Social Enterprise as an Agent of...
Social Change Through Innovation as part of "Social Enterprise as an Agent of...Social Change Through Innovation as part of "Social Enterprise as an Agent of...
Social Change Through Innovation as part of "Social Enterprise as an Agent of...
 
Tut21-115-GauravKishore-FDS-Final
Tut21-115-GauravKishore-FDS-FinalTut21-115-GauravKishore-FDS-Final
Tut21-115-GauravKishore-FDS-Final
 

Similaire à Streams API (Web Engines Hackfest 2015)

Android lessons you won't learn in school
Android lessons you won't learn in schoolAndroid lessons you won't learn in school
Android lessons you won't learn in schoolMichael Galpin
 
External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1) External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1) Volkan Özçelik
 
Progressive Enhancement using WSGI
Progressive Enhancement using WSGIProgressive Enhancement using WSGI
Progressive Enhancement using WSGIMatthew Wilkes
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Henry S
 
Azure Functions Real World Examples
Azure Functions Real World Examples Azure Functions Real World Examples
Azure Functions Real World Examples Yochay Kiriaty
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesAmazon Web Services
 
External JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesExternal JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesVolkan Özçelik
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQLKonstantin Gredeskoul
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Volkan Özçelik
 
01/2009 - Portral development with liferay
01/2009 - Portral development with liferay01/2009 - Portral development with liferay
01/2009 - Portral development with liferaydaveayan
 
A brief intro to nodejs
A brief intro to nodejsA brief intro to nodejs
A brief intro to nodejsJay Liu
 
Middleware in Golang: InVision's Rye
Middleware in Golang: InVision's RyeMiddleware in Golang: InVision's Rye
Middleware in Golang: InVision's RyeCale Hoopes
 
Tech Talk on Cloud Computing
Tech Talk on Cloud ComputingTech Talk on Cloud Computing
Tech Talk on Cloud ComputingITviec
 
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»DataArt
 
Surrogate dependencies (in node js) v1.0
Surrogate dependencies  (in node js)  v1.0Surrogate dependencies  (in node js)  v1.0
Surrogate dependencies (in node js) v1.0Dinis Cruz
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsTaylor Lovett
 
Tuenti Release Workflow
Tuenti Release WorkflowTuenti Release Workflow
Tuenti Release WorkflowTuenti
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescueMarko Heijnen
 

Similaire à Streams API (Web Engines Hackfest 2015) (20)

WebDev Crash Course
WebDev Crash CourseWebDev Crash Course
WebDev Crash Course
 
Android lessons you won't learn in school
Android lessons you won't learn in schoolAndroid lessons you won't learn in school
Android lessons you won't learn in school
 
External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1) External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1)
 
Progressive Enhancement using WSGI
Progressive Enhancement using WSGIProgressive Enhancement using WSGI
Progressive Enhancement using WSGI
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
 
Azure Functions Real World Examples
Azure Functions Real World Examples Azure Functions Real World Examples
Azure Functions Real World Examples
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
External JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesExternal JavaScript Widget Development Best Practices
External JavaScript Widget Development Best Practices
 
Windows 8 Apps and the Outside World
Windows 8 Apps and the Outside WorldWindows 8 Apps and the Outside World
Windows 8 Apps and the Outside World
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012
 
01/2009 - Portral development with liferay
01/2009 - Portral development with liferay01/2009 - Portral development with liferay
01/2009 - Portral development with liferay
 
A brief intro to nodejs
A brief intro to nodejsA brief intro to nodejs
A brief intro to nodejs
 
Middleware in Golang: InVision's Rye
Middleware in Golang: InVision's RyeMiddleware in Golang: InVision's Rye
Middleware in Golang: InVision's Rye
 
Tech Talk on Cloud Computing
Tech Talk on Cloud ComputingTech Talk on Cloud Computing
Tech Talk on Cloud Computing
 
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
 
Surrogate dependencies (in node js) v1.0
Surrogate dependencies  (in node js)  v1.0Surrogate dependencies  (in node js)  v1.0
Surrogate dependencies (in node js) v1.0
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
 
Tuenti Release Workflow
Tuenti Release WorkflowTuenti Release Workflow
Tuenti Release Workflow
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescue
 

Plus de Igalia

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Building End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEBuilding End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEIgalia
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Automated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesAutomated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesIgalia
 
Embedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceEmbedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceIgalia
 
Optimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfOptimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfIgalia
 
Running JS via WASM faster with JIT
Running JS via WASM      faster with JITRunning JS via WASM      faster with JIT
Running JS via WASM faster with JITIgalia
 
To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!Igalia
 
Implementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerImplementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerIgalia
 
8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in MesaIgalia
 
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIntroducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIgalia
 
2023 in Chimera Linux
2023 in Chimera                    Linux2023 in Chimera                    Linux
2023 in Chimera LinuxIgalia
 
Building a Linux distro with LLVM
Building a Linux distro        with LLVMBuilding a Linux distro        with LLVM
Building a Linux distro with LLVMIgalia
 
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsturnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsIgalia
 
Graphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesGraphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesIgalia
 
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSDelegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSIgalia
 
MessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webMessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webIgalia
 
Replacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersReplacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersIgalia
 
I'm not an AMD expert, but...
I'm not an AMD expert, but...I'm not an AMD expert, but...
I'm not an AMD expert, but...Igalia
 
Status of Vulkan on Raspberry
Status of Vulkan on RaspberryStatus of Vulkan on Raspberry
Status of Vulkan on RaspberryIgalia
 

Plus de Igalia (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Building End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEBuilding End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPE
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Automated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesAutomated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded Devices
 
Embedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceEmbedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to Maintenance
 
Optimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfOptimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdf
 
Running JS via WASM faster with JIT
Running JS via WASM      faster with JITRunning JS via WASM      faster with JIT
Running JS via WASM faster with JIT
 
To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!
 
Implementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerImplementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamer
 
8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa
 
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIntroducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
 
2023 in Chimera Linux
2023 in Chimera                    Linux2023 in Chimera                    Linux
2023 in Chimera Linux
 
Building a Linux distro with LLVM
Building a Linux distro        with LLVMBuilding a Linux distro        with LLVM
Building a Linux distro with LLVM
 
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsturnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
 
Graphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesGraphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devices
 
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSDelegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
 
MessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webMessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the web
 
Replacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersReplacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shaders
 
I'm not an AMD expert, but...
I'm not an AMD expert, but...I'm not an AMD expert, but...
I'm not an AMD expert, but...
 
Status of Vulkan on Raspberry
Status of Vulkan on RaspberryStatus of Vulkan on Raspberry
Status of Vulkan on Raspberry
 

Dernier

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
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
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Dernier (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
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...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Streams API (Web Engines Hackfest 2015)

  • 2. What is it? • Enabling I/O processing • Read chunks asynchronously • Write chunks asynchronously • Pipe from a stream to another • Automatic transformations • Any kind of chunk • Strings • ArrayBuffers • Potatoes • Any JSValue cocktail
  • 3. What is it good for? • Get me this video segment ASAP • Without streams API: download it, then read it • With the streams API + MSE: start downloading it and pipe it to MSE • Using SourceBuffer.appendStream • Get me this WebSocket-like connection on HTTP • ReadableStream/WritableStream to receive/send messages • With HTTP/2, just one TCP/IP connection for both WebSocket- like channels and regular HTTP content • Any I/O use-case actually… • Wrapping of all data sources in a single clean model • HTTP, WebRTC, file system
  • 4. What is in the spec? • Stable • ReadableStream • Except pipe operations (related to WritableStream) • Beta • WritableStream • Experimental • TransformStream • ReadableByteArrayStream • May be almost merged with ReadableStream
  • 5. What it is good for/bad for, internals? • Promise based • Async is good but • Still a bit expensive • Use it for arrays, objects • Probably not to pass one byte after one byte
  • 6. Where will it be? • Fetch API • Retrieve data progressively • Send data progressively • MSE API • Append stream • WebRTC • Plan to use it
  • 7. ReadableStream API remarks • ReadableStream : locked, cancel, getReader, pipeThrough, pipeTo, tee. • Underlying source : start, pull, cancel. • Strategy : highWaterMark, size • Controller: enqueue, close, error, desiredSize • Reader : closed, cancel, read and releaseLock
  • 8. How is it working? httpResponseBody.pipeThrough(decom pressorTransform ) .pipeThrough(ignoreNonIm ageFilesTransform ) .pipeTo(m ediaG allery);
  • 9. Where is it? • Chrome • Shipped • ReadableStream tied to the Fetch API response • Ongoing • ReadableStream created by scripts • ReadableStream for progressive uploads using fetch • Mozilla • Will start 25/12/2015 (roughly) • IE • Support of an earlier version of stream/XHR as producer • WebKit • ReadableStream fully implemented • pipeTo to be broken by the spec • WritableStream fully implemented
  • 11. First Approach – Initial steps • C++ implementation • Regular WebIDL to bind API with JavaScriptCore • Needed improved promise binding code • Initial prototype supporting byte arrays • Nicely working • Not too complex
  • 12. First Approach – second steps • Support of any JavaScript value • WebIDL • Starting to add special cases in the binding generator • Adding a lot of JS code in WebCore/bindings/js • Storing JS values, making them not collectable • Calling JS functions • Handling of asynchronous behavior, JS promises • Overall conclusion • Code difficult to relate with the specification • Difficult to keep proper reference counting • Templates to add further specialization for byte array
  • 13. Second Approach – JS Builtins • JS Builtin is a JavaScriptCore feature • Introduced a few years ago • Promise code is mostly JS builtin • Enable JS Builtin into WebCore • Integrate it with WebIDL binding generator • Streams API implementation • WebIDL code • JavaScript code • Some limited C++ code • 80 lines • Except for automatically generated code
  • 14. JS Builtins tied to WebIDL • WebIDL • JavaScript built-in
  • 15. JS Builtins calling C++ methods • Private keyword
  • 16. JS Builtins misc • Conditional compilation • @conditional • Constructor as JS built-in • @assert • JS built-in functions (helper routines) attached to the global object • @internal
  • 17. JS Builtins build • Update CMakeLists.txt • Add IDL file in WebCore_NON_SVG_IDL_FILES • Add JS file(s) in WebCore_BUILTINS_SOURCES • 1 file for WebIDL tied routines (stored in the prototype) • 0/1/+ files for helper routines (stored in the global object) • Update Source/WebCore/bindings/js/WebCoreBuiltins.h and Source/WebCore/bindings/js/WebCoreBuiltins.cpp • When adding a new JS built-in file • To be automated soon hopefully
  • 18. Overall experience • Easier to write JS code then to write C++ binding code • No more crashes, no more memory leaks, no more ref- counting cycles • Performances is not really an issue • Apple made measurements on the Promise implementation and saw some improvements • Everything is nice, except… • No JS built-in code debugger • Back to console.log(“potato 1”); • JS builtin security issues
  • 19. Security issues • JS builtins run in the same world with the same GlobalObject as user scripts • Modifying a prototype or a user object may affect JS built-in code • First possibility: JS built-in code may break • What if mediaDevices is overridden by user scripts? • What if mediaDevices prototype is changed.
  • 20. Security issues – leaking information
  • 21. Security issues – current rules • Do not use functions under the control of the user operations.push(…) operations.@push(...) • Do not use prototype of objects under the control of the user function processValue(promise) { promise.then(…) } function processValue(promise) { promise.@then(…) // ok but it may break } function processValue(promise) { @Promise.prototype. @then.@call(…) // ok but so unreadable } • Beware of Promise • Might want to use InternalPromise if you are doing chaining
  • 22. Security issues – we need something better • So easy to fall into that trap • Not so easy to find the holes • How can we improve the situation? • Testing tool to catch these errors • JS builtin check style? • JS proxy object in Debug mode to control how are accessed objects • Sanitizers • Should we change the infrastructure? • Run the built-ins in a more secure environment • Chrome is doing that in a completely separate world • Cannot pass promises, JS objects.... Between the worlds • Input most welcome
  • 23. Tentative conclusion • Streams API is • Very maintainable • Fast enough (more study needed) • But • Potential security issues • We fixed the ones we know of • Need to improve JS built-in tooling • Think about JS built-ins when adding WebCore/JSC specific code • Like in WebCore/bindings/js