SlideShare a Scribd company logo
1 of 32
Download to read offline
The 25th Annual European
Smalltalk User Group ConferenceSeptember 4, 2017
HTTP/2 in Cincom Smalltalk ™
SiouX Server
Speaker: Jerry Kott, OSCP
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
HTTP:A Bit of History
• 1965:‘hypertext’ coined byTed Nelson for Xanadu project
• 1989: original HTTP and HTML at CERN (Tim Berners-Lee)
• 1991: HTTPV0.9 - first documented version.

https://www.w3.org/Protocols/HTTP/AsImplemented.html
• 1996: HTTP/1.0 - first version as an RFC 1945

https://tools.ietf.org/html/rfc1945

“This memo provides information for the Internet community. This memo does not
specify an Internet standard of any kind…”
• 1997: HTTP/1.1 standard released as RFC 2068
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
HTTP:A Bit of History
• 1999: HTTP/1.1 updates and improvements as RFC 2616
…15 years…
• 2014: HTTP/1.1 split into six different specification parts,
obsoletes RFC 2616
• 2015: HTTP/2 published as RFC 7540

https://tools.ietf.org/html/rfc7540
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
HTTP/2 Key Points
• Semantically compatible with HTTP/1.1
• Clients and servers negotiate to select version 1.1 or 2
• Fairly rapid adoption rate
• Improved page loading performance, e.g.:
• HTTP header compression
• Server push
• Request pipelining
• Stream multiplexing over a singleTCP connection
• Web browsers support HTTP/2 only overTLS
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
HTTP/2 Adoption Rate
@cincomsmalltalk #ESUG17
HTTP/2 is used by 16.4% of the top 10 million websites.
https://w3techs.com/technologies/details/ce-http2/all/all
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Components of HTTP/2
• Stream
• Message: request or response
• Frame: smallest part of HTTP/2 traffic
• Frame types:
• Control (e.g.: Priority, Header, 

Continuation, …)
• Data
• Frames may be interleaved
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
HTTP/2 in SiouX Server
• Preview was included in Cincom®VisualWorks® 8.2
• Full protocol implementation coming up inVisualWorks 8.3
• Supports both open and secure version.
• Added requirements on Cincom Smalltalk security frameworks
• HTTP/2 overTLS required by web browsers
• TLS cipher suites with AEAD ciphers
• Stream multiplexing, prioritization, dependencies
• Challenging but also kind of fun
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Header Compression
@cincomsmalltalk #ESUG17
HTTP/1.1
POST /http2_test HTTP/1.1

Host: www.examples.org

Content-Type: text/plain
Content-Length: 10
98 bytes
HTTP/2
:method POST

:scheme http

:path /http_test

:authority www.example.org

content-type text/plain

content-length 10
HTTP/2 encoded bytes:

:method POST -> #[131]

:scheme http -> #[134]

:path /http2_test -> #[68 136 98 116 166 177 68 146 161 63]

:authority www.example.org -> #[65 140 241 227 194 229 242 58 107 160 171 158 201 191]

content-type text/plain -> #[95 135 73 124 165 138 232 25 170] 

content-length 10 -> #[92 2 49 48]
39 bytes
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Multiplexing
• Multiple interleaving requests over a singleTCP connection.
• Traffic is broken down into frames representing pieces of virtual HTTP
streams
• A stream represents an HTTP request/response pair
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Multiplexing
• HTTP2ServerMultiplexer in SiouX-Http2 parcel
• HTTP/1.1 socket accept:
-> HttpConnection ~ Process ~ RequestContext
• ManyTCP connections, one process per connection
• HTTP/2 socket accept:
-> HttpConnection ~ Process ~ (upgrade) HTTP2ServerMultiplexer
header frame read from socket:
-> id -> HTTP2ServerStream ~ Process ~ RequestContext
• FewTCP connections, several processes per connection
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Stream Prioritization
• Weight: a stream’s weight determines its processing
priority relative to other streams
• Dependency: a stream may depend on another stream
being processed first
• Web browser support for prioritization is evolving
(Chrome vs. Firefox vs. IE …)
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Stream Prioritization
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Flow Control
• Credit-based system
• A peer advertises resource availability
• Clients and servers must keep track of the amount of resources sent to
the peers
• Highly customizable settings allow the control of memory allocation for
read & write buffers
INITIAL_WINDOW_SIZE
MAX_FRAME_SIZE
…
• Some settings may be negotiated ‘on the fly’ as resource availability
changes
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Server Push
• Replaces inlined resources
• Server pushes them to the client to initiate caching without a round-trip
request/response.
• Consider carefully when to use it (not always beneficial)
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Server Push
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
SiouX HTTP/2 Code Samples
server := Server id: 'MyServer'.
listener := server listenOn: 8000 for: SiouX.HttpsConnection.
server
addSecureListener: listener
certificateFile: 'certificates.pem'
privateKeyFile: 'privatekey-rsa.key'.
listener useHTTP2Protocol.
server start.
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Settings Control
“Configure TLS context to ensure HTTP/2 supported cipher suites and ALPN extension
are present.
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 is a mandatory cipher suite.”
listener tlsContext
suites: (TLSCipherSuite suites: #(tls12 (#ecdhe #(#sha256 #sha384))));
addExtension: Xtreams.TLSAppLayerProtocolNegotiation defaultH2.
version := Protocols.HTTPv20 new.
listener protocolVersions: (Array with: version).
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Settings Control
“Default settings may be changed according to application needs, e.g.:”
version settings
maxConcurrentStreams: 200;
maxFrameSize: 1024 * 32;
…
outputWindowSize: 1024 * 64; “not part of spec, an internal optimization
mechanism”
…
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Configure Server Push
“Server push must be enabled explicitly”
version settings enablePush.
“An HTTP response must receive #preloadLink for each resource to be pushed.
Consider which resources to push carefully. Typically useful only on a first page
load.”
aResponse
contentType: 'text/html';
preloadLink: self path, '/style.css';
preloadLink: self path, '/script.js';
…
contents: '<HTML><BODY>some html</BODY></HTML>’.
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
How About AppeX?
• All SiouX functionality inherent in AppeX
• Potential performance benefits:
• Single Page Application loads HTML only once
• HTTP/2 server push can download CSS and JS into the client as
HTML loads
• After initial load, only data travels between the client and the server
• Perceived performance improvement may be relatively small on the
client BUT
• Much less demand on the server and the network
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Demo: HTTP/2 Compared to HTTP/1.1
• Inspired by akamai http2 demo:
https://http2.akamai.com/demo
• The same ‘application’ is shown in two <iframe> elements
• 400 tiles make up the final image.
• HTTP/1.1: 400 requests on multiple connections
• HTTP/2: 400 requests on a single multiplexed connection
• The only difference is in SiouX listeners’ configuration
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Demo: HTTP/2 Compared to HTTP/1.1
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Demo: HTTP/2 Compared to HTTP/1.1
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Demo: HTTP/2 Compared to HTTP/1.1
• In terms of bandwidth efficiency (network time):
• HTTP/1.1: 6 x 9.95 ~ 60 seconds
• HTTP/2: 1 x 1.5 ~ 1.5 seconds
• HTTP/2 is a clear winner
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
(Some of) HTTP/2 Best Practices
• It’s all about performance
• Don’t concatenate files
• an HTTP/1.1 optimization technique to reduce number of requests.
• It can lead to expensive cache invalidation in the client, actually reducing
performance
• Don’t inline assets
• special case of file concatenation
• use server push instead, if / when appropriate
• Minimize the size of HTTP requests / responses
• Send the minimum amount of data to make your application work
• Use AppeX !
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Issues
• Increased memory demands on the server because of multiplexing
- any server, not SiouX specifically
• Added complexity of secure certificate management andTLS
configuration
• Using server proxies becomes tricky
• e.g.: Apache has to be built from source, explicitly enabling HTTP/2
• The mod_proxy_http2 module is experimental
• Limited debugging with network sniffing tools - traffic is encrypted
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Summary and Conclusion
• HTTP/2 is semantically compatible with HTTP/1.1
• But vastly different in specs and implementation
• Impressive performance gains
• Many optimization options
• Security built in because of browser vendors constraints
• A simple API for SiouX server HTTP/2 configuration
• Continuing work on enhancements and performance
optimization
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Additional Resources
• https://hpbn.co/http2/
• http://httpwg.org/specs/rfc7540.html
• Read this document before using server push:

https://docs.google.com/document/d/
1K0NykTXBbbbTlv60t5MyJvXjqKGsCVNYHyLEXIxYMv0/
edit#heading=h.ke8t5vjw3jh4
• http://www.cincomsmalltalk.com/main/products/demos/http2/
@cincomsmalltalk #ESUG17
Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved.
Contact Us
Suzanne Fortman 

Director of Smalltalk Global Operations

sfortman@cincom.com

@SuzCST (Twitter)
Arden Thomas 

Product Manager

athomas@cincom.com

@ArdenTCST (Twitter)
Jerry Kott

Senior Software Engineer

jkott@cincom.com
@cincomsmalltalk #ESUG17
ThankYou!
Any questions?
Cincom, the Quadrant Logo, Cincom Smalltalk, Cincom ObjectStudio and Cincom VisualWorks
are trademarks or registered trademarks of Cincom Systems, Inc.
©2017 Cincom Systems, Inc.
All Rights Reserved

More Related Content

More from ESUG

Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...ESUG
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsESUG
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6ESUG
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsESUG
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector TuningESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FutureESUG
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the DebuggerESUG
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing ScoreESUG
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptESUG
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsESUG
 
BioSmalltalk
BioSmalltalkBioSmalltalk
BioSmalltalkESUG
 
gt4atproto, A Programmable Environment for Social Media
gt4atproto, A Programmable Environment for Social Mediagt4atproto, A Programmable Environment for Social Media
gt4atproto, A Programmable Environment for Social MediaESUG
 
Roassal3 update
Roassal3 updateRoassal3 update
Roassal3 updateESUG
 
VASER Control: Smart Energy
VASER Control: Smart EnergyVASER Control: Smart Energy
VASER Control: Smart EnergyESUG
 

More from ESUG (20)

Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 
BioSmalltalk
BioSmalltalkBioSmalltalk
BioSmalltalk
 
gt4atproto, A Programmable Environment for Social Media
gt4atproto, A Programmable Environment for Social Mediagt4atproto, A Programmable Environment for Social Media
gt4atproto, A Programmable Environment for Social Media
 
Roassal3 update
Roassal3 updateRoassal3 update
Roassal3 update
 
VASER Control: Smart Energy
VASER Control: Smart EnergyVASER Control: Smart Energy
VASER Control: Smart Energy
 

Recently uploaded

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 

Recently uploaded (20)

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 

HTTP/2 in the Cincom Smalltalk™ SiouX Server

  • 1. The 25th Annual European Smalltalk User Group ConferenceSeptember 4, 2017 HTTP/2 in Cincom Smalltalk ™ SiouX Server Speaker: Jerry Kott, OSCP
  • 2.
  • 3. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. HTTP:A Bit of History • 1965:‘hypertext’ coined byTed Nelson for Xanadu project • 1989: original HTTP and HTML at CERN (Tim Berners-Lee) • 1991: HTTPV0.9 - first documented version.
 https://www.w3.org/Protocols/HTTP/AsImplemented.html • 1996: HTTP/1.0 - first version as an RFC 1945
 https://tools.ietf.org/html/rfc1945
 “This memo provides information for the Internet community. This memo does not specify an Internet standard of any kind…” • 1997: HTTP/1.1 standard released as RFC 2068 @cincomsmalltalk #ESUG17
  • 4. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. HTTP:A Bit of History • 1999: HTTP/1.1 updates and improvements as RFC 2616 …15 years… • 2014: HTTP/1.1 split into six different specification parts, obsoletes RFC 2616 • 2015: HTTP/2 published as RFC 7540
 https://tools.ietf.org/html/rfc7540 @cincomsmalltalk #ESUG17
  • 5. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. HTTP/2 Key Points • Semantically compatible with HTTP/1.1 • Clients and servers negotiate to select version 1.1 or 2 • Fairly rapid adoption rate • Improved page loading performance, e.g.: • HTTP header compression • Server push • Request pipelining • Stream multiplexing over a singleTCP connection • Web browsers support HTTP/2 only overTLS @cincomsmalltalk #ESUG17
  • 6. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. HTTP/2 Adoption Rate @cincomsmalltalk #ESUG17 HTTP/2 is used by 16.4% of the top 10 million websites. https://w3techs.com/technologies/details/ce-http2/all/all
  • 7. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Components of HTTP/2 • Stream • Message: request or response • Frame: smallest part of HTTP/2 traffic • Frame types: • Control (e.g.: Priority, Header, 
 Continuation, …) • Data • Frames may be interleaved @cincomsmalltalk #ESUG17
  • 8. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. HTTP/2 in SiouX Server • Preview was included in Cincom®VisualWorks® 8.2 • Full protocol implementation coming up inVisualWorks 8.3 • Supports both open and secure version. • Added requirements on Cincom Smalltalk security frameworks • HTTP/2 overTLS required by web browsers • TLS cipher suites with AEAD ciphers • Stream multiplexing, prioritization, dependencies • Challenging but also kind of fun @cincomsmalltalk #ESUG17
  • 9. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Header Compression @cincomsmalltalk #ESUG17 HTTP/1.1 POST /http2_test HTTP/1.1
 Host: www.examples.org
 Content-Type: text/plain Content-Length: 10 98 bytes HTTP/2 :method POST
 :scheme http
 :path /http_test
 :authority www.example.org
 content-type text/plain
 content-length 10 HTTP/2 encoded bytes:
 :method POST -> #[131]
 :scheme http -> #[134]
 :path /http2_test -> #[68 136 98 116 166 177 68 146 161 63]
 :authority www.example.org -> #[65 140 241 227 194 229 242 58 107 160 171 158 201 191]
 content-type text/plain -> #[95 135 73 124 165 138 232 25 170] 
 content-length 10 -> #[92 2 49 48] 39 bytes
  • 10. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Multiplexing • Multiple interleaving requests over a singleTCP connection. • Traffic is broken down into frames representing pieces of virtual HTTP streams • A stream represents an HTTP request/response pair @cincomsmalltalk #ESUG17
  • 11. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Multiplexing • HTTP2ServerMultiplexer in SiouX-Http2 parcel • HTTP/1.1 socket accept: -> HttpConnection ~ Process ~ RequestContext • ManyTCP connections, one process per connection • HTTP/2 socket accept: -> HttpConnection ~ Process ~ (upgrade) HTTP2ServerMultiplexer header frame read from socket: -> id -> HTTP2ServerStream ~ Process ~ RequestContext • FewTCP connections, several processes per connection @cincomsmalltalk #ESUG17
  • 12. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Stream Prioritization • Weight: a stream’s weight determines its processing priority relative to other streams • Dependency: a stream may depend on another stream being processed first • Web browser support for prioritization is evolving (Chrome vs. Firefox vs. IE …) @cincomsmalltalk #ESUG17
  • 13. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Stream Prioritization @cincomsmalltalk #ESUG17
  • 14. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Flow Control • Credit-based system • A peer advertises resource availability • Clients and servers must keep track of the amount of resources sent to the peers • Highly customizable settings allow the control of memory allocation for read & write buffers INITIAL_WINDOW_SIZE MAX_FRAME_SIZE … • Some settings may be negotiated ‘on the fly’ as resource availability changes @cincomsmalltalk #ESUG17
  • 15. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Server Push • Replaces inlined resources • Server pushes them to the client to initiate caching without a round-trip request/response. • Consider carefully when to use it (not always beneficial) @cincomsmalltalk #ESUG17
  • 16. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Server Push @cincomsmalltalk #ESUG17
  • 17. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. SiouX HTTP/2 Code Samples server := Server id: 'MyServer'. listener := server listenOn: 8000 for: SiouX.HttpsConnection. server addSecureListener: listener certificateFile: 'certificates.pem' privateKeyFile: 'privatekey-rsa.key'. listener useHTTP2Protocol. server start. @cincomsmalltalk #ESUG17
  • 18. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Settings Control “Configure TLS context to ensure HTTP/2 supported cipher suites and ALPN extension are present. TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 is a mandatory cipher suite.” listener tlsContext suites: (TLSCipherSuite suites: #(tls12 (#ecdhe #(#sha256 #sha384)))); addExtension: Xtreams.TLSAppLayerProtocolNegotiation defaultH2. version := Protocols.HTTPv20 new. listener protocolVersions: (Array with: version). @cincomsmalltalk #ESUG17
  • 19. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Settings Control “Default settings may be changed according to application needs, e.g.:” version settings maxConcurrentStreams: 200; maxFrameSize: 1024 * 32; … outputWindowSize: 1024 * 64; “not part of spec, an internal optimization mechanism” … @cincomsmalltalk #ESUG17
  • 20. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Configure Server Push “Server push must be enabled explicitly” version settings enablePush. “An HTTP response must receive #preloadLink for each resource to be pushed. Consider which resources to push carefully. Typically useful only on a first page load.” aResponse contentType: 'text/html'; preloadLink: self path, '/style.css'; preloadLink: self path, '/script.js'; … contents: '<HTML><BODY>some html</BODY></HTML>’. @cincomsmalltalk #ESUG17
  • 21. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. How About AppeX? • All SiouX functionality inherent in AppeX • Potential performance benefits: • Single Page Application loads HTML only once • HTTP/2 server push can download CSS and JS into the client as HTML loads • After initial load, only data travels between the client and the server • Perceived performance improvement may be relatively small on the client BUT • Much less demand on the server and the network @cincomsmalltalk #ESUG17
  • 22. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Demo: HTTP/2 Compared to HTTP/1.1 • Inspired by akamai http2 demo: https://http2.akamai.com/demo • The same ‘application’ is shown in two <iframe> elements • 400 tiles make up the final image. • HTTP/1.1: 400 requests on multiple connections • HTTP/2: 400 requests on a single multiplexed connection • The only difference is in SiouX listeners’ configuration @cincomsmalltalk #ESUG17
  • 23. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Demo: HTTP/2 Compared to HTTP/1.1 @cincomsmalltalk #ESUG17
  • 24. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Demo: HTTP/2 Compared to HTTP/1.1 @cincomsmalltalk #ESUG17
  • 25. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Demo: HTTP/2 Compared to HTTP/1.1 • In terms of bandwidth efficiency (network time): • HTTP/1.1: 6 x 9.95 ~ 60 seconds • HTTP/2: 1 x 1.5 ~ 1.5 seconds • HTTP/2 is a clear winner @cincomsmalltalk #ESUG17
  • 26. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. (Some of) HTTP/2 Best Practices • It’s all about performance • Don’t concatenate files • an HTTP/1.1 optimization technique to reduce number of requests. • It can lead to expensive cache invalidation in the client, actually reducing performance • Don’t inline assets • special case of file concatenation • use server push instead, if / when appropriate • Minimize the size of HTTP requests / responses • Send the minimum amount of data to make your application work • Use AppeX ! @cincomsmalltalk #ESUG17
  • 27. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Issues • Increased memory demands on the server because of multiplexing - any server, not SiouX specifically • Added complexity of secure certificate management andTLS configuration • Using server proxies becomes tricky • e.g.: Apache has to be built from source, explicitly enabling HTTP/2 • The mod_proxy_http2 module is experimental • Limited debugging with network sniffing tools - traffic is encrypted @cincomsmalltalk #ESUG17
  • 28. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Summary and Conclusion • HTTP/2 is semantically compatible with HTTP/1.1 • But vastly different in specs and implementation • Impressive performance gains • Many optimization options • Security built in because of browser vendors constraints • A simple API for SiouX server HTTP/2 configuration • Continuing work on enhancements and performance optimization @cincomsmalltalk #ESUG17
  • 29. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Additional Resources • https://hpbn.co/http2/ • http://httpwg.org/specs/rfc7540.html • Read this document before using server push:
 https://docs.google.com/document/d/ 1K0NykTXBbbbTlv60t5MyJvXjqKGsCVNYHyLEXIxYMv0/ edit#heading=h.ke8t5vjw3jh4 • http://www.cincomsmalltalk.com/main/products/demos/http2/ @cincomsmalltalk #ESUG17
  • 30. Proprietary & ConfidentialCOMPANY CONFIDENTIAL | ©2017 Cincom Systems, Inc.All Rights Reserved. Contact Us Suzanne Fortman 
 Director of Smalltalk Global Operations
 sfortman@cincom.com
 @SuzCST (Twitter) Arden Thomas 
 Product Manager
 athomas@cincom.com
 @ArdenTCST (Twitter) Jerry Kott
 Senior Software Engineer
 jkott@cincom.com @cincomsmalltalk #ESUG17
  • 32. Cincom, the Quadrant Logo, Cincom Smalltalk, Cincom ObjectStudio and Cincom VisualWorks are trademarks or registered trademarks of Cincom Systems, Inc. ©2017 Cincom Systems, Inc. All Rights Reserved