SlideShare a Scribd company logo
1 of 38
Download to read offline
Corey Clark PhD
Daniel Montgomery
Web Dev Platform
Cross
Platform
Cross
Browser
HTML5
WebGL
Web
Socket
Web
Worker
Hardware
Acceleration
Optimized
Communication
Channel
Parallel
Processing
JaHOVA OS
Kernel
Internal APIs
Threading
Network
Graphics
Web
Workers
Web
Sockets
WebGL
Web Workers and Multithreading
§  Parallel Execution
§  Communicates
through Message
§  Executes in
Isolated Thread
● No Access To
●  DOM, Window
●  Document, Parent
●  No Shared Memory
● But You Do Have…
●  XHR / WebSockets
●  Navigator,Location
●  setTimeout/setInterval
●  App Cache, importScript
Time to Create First Worker
•  Varies depending on Worker Size
•  Can take a second to start
•  Initialize at beginning with a startup routine
Web Worker Variations
● Inline vs. External
●  BlobBuilder
●  Inline only supported by FF and Chrome
●  No difference in performance
● Dynamic
●  Method determined at run time from JSON
string
●  Altered and changed by user at run time
Nested Shared
Worker
Nested Worker
Main Thread
Nested Worker
Nested Worker
Window Window
iframe
Shared Worker
Platform Support
● Chrome/Firefox/Safari
●  Chrome/Safari supports Shared Only
●  Firefox supports Nested Only
● Android – (via Firefox and Opera Browser)
● iOS
● IE 10
Command
Module
Internal APIs
Thread
Thread Core
Instruction
Module
Thread
Thread /
iframe
Thread /
iframe
…
Thread
Controller
ThreadThread
Pool
Thread
Manager
Shared
Memory
What is WebGL?
OpengGL ES 2.0
WebGL
The Basics Sample API/Libraries
● JavaScript Wrapper
for OpenGL ES 2.0
● Programmable
Graphics Pipeline
(GLSL)
● Hardware
Acceleration
● SpiderGL
● Copperlicht
● CubicVR
● Gladius
WebGL Hardware Test
Verts Polys Draw FPS CPU RAM Video OS
858,750 485,292 654 30 2.2GHz
Intel i7
Quad
Core
4GB AMD
Radeon
6750M
1GB
OSX
634,179 353,386 483 30 2.53GH
z Intel
Core 2
Duo
4GB NVIDIA
9800+
1GB
Windows
7
590,898 333,924 450 33.33 2.53GH
z Intel
Core 2
Duo
8GB NVIDIA
GeForce
9600M
GT
512MB
OSX
Chrome
Browser vs Browser
Browser Verts Polys Draw Calls
Chrome 590,898 333,924 450
Aurora 426,773 241,174 325
WebKit Nightly 393,948 222,624 300
Safari 295,473 166,974 225
Firefox 262,648 148,424 200
WebGL Tid Bits
Tips Up and coming
● DebugContex
● WebGL Inspector
● requestAnimFrame
● BMP Support
● No IE Support with out
plugins and Hackery
● WebGL Running in
Web Worker
● Swapping Memory
Buffer rather than
copy
+ +
Web Sockets
● Full Duplex Communication
● No HTTP overhead
● Has Secure Transport Protocol
● Cross Origin Communication
● Very Simple Client Side API
●  Socket.onmessage = function(){}
●  Socket.onopen = function(){}
●  Socket.open(), Socket.send(), Socket.close()
Nitty Gritty
● 2 Bytes Overhead Per Message
●  XHR ~871 Bytes
● Constant Connection
●  No need to re-establish connection (COMET)
● Connecting to Non Browser Applications
(via Proxy/Server)
●  Byte Arrays
●  Bit Shifting
Daniel Montgomery
WebSocket Server Side
● Standard HTTP Request/
Response model performs
poorly for high number of
users
● Server Needs
●  Thread or Non
Blocking IO Design
●  High concurrency at
Low Performance cost
● Existing Servers
●  Node.js
●  Jetty (Java)
●  Ruby (Event
Machine)
●  Python (Twisted)
● Google V8 Engine
● JavaScript
● Event Driven
● Event Loop with Callbacks
● Non-Blocking
● Native C++ Bindings
● Fast!!
FEATURES
• WebSocket Server
• Socket.IO
• Kaazing Gateway
• TCP Server
• File Server
• MySQL, MongoDB,
NoSQL
Modules (NPM)
• Well Kept After
• Documented
• Quick Response
• Use existing Git
• npm dependencies
• Fast!
• (“Hello World!” in 1 minute)
Free!!!
FEATURES
Other hosting options…
http://no.de
eSession
("Omega"["gunner"
, "pilot"]);
http://heroku.com
http://nodejitsu.com
http://cloudno.de
JaHOVA OS Server Module
●  Connect to Multiple Applications on
same server
●  Remote Stream Functions
●  User Creation on the fly
●  Support for Multiple Connection Types
●  TCP
●  WebSockets
●  Socket.IO and Express node.js modules
JOSSM: Breakdown
●  Multiple Sessions
●  Multiple Session Types
●  Defined in a single line!
●  Streamed Sessions, Modules, and
Functions
●  Easily add and connect users to
multiple sessions
handler.createSession("Omega", "", ["gunner", "pilot"]);
JOSSM: Session Breakdown
●  Session Specific Properties
●  On Events
●  Open
●  Close
●  Message
●  Error
●  Multiple Modules
●  Remote Module Requests
Engine Architecture
● Dynamic Nested/Shared Web Worker
●  Thread Controller
●  Shared Memory Pool
● Custom Event Management System
● Available Engines
●  Akihabara (2D)
●  Effect Game (2D)
●  Isogenic Engine
●  Johmoho
3rd Party
Extensions
Application
JaHOVA OS
Kernel Internal APIs
Resource and
Schedule Manager
Module
Instruction
Module
Command
Module
Threading
Network
DOM
Graphics
…
Resource and Schedule Manager Module
Event Manager
Event
Manager
Interface
Event Object
Event
Event
…
Event Object
Event
Event
……
Subscriber
Callback
Subscriber
Callback
Subscriber
Callback
Subscriber
Callback
Core
Manager
Command
Module
Resource and
Schedule Manager
Module
Instruction Module
Router
Route
Resource
Instruction Q
Resource
Instruction Q
Resource
Instruction Q
Add Request
…
…
Event
Manager
Core
Manager
Command Module
Resource
Dispatcher
Resource
Dispatcher
Resource
Dispatcher
Engine Demonstration
● WebGL, WebSockets, Web Workers
● HTML5 Audio
● Thread Controller
●  Networking and Physics
● Node.js
●  JaHOVA OS Server Module
●  WebSocket - SocketIO
● Developed in under a week
Final Thoughts
● Initialize Threads at Startup
● Initialization Timing
●  Serialize for dependencies and registration
● Careful with Debuggers and Web Workers
● See more at
●  http://jahovaos.com : Descriptions and Blog
●  http://demo.jahovaos.com : Code
● Expo Floor 2-4 on Wed @ DeVry Booth

More Related Content

What's hot

ClubAJAX Basics - Server Communication
ClubAJAX Basics - Server CommunicationClubAJAX Basics - Server Communication
ClubAJAX Basics - Server CommunicationMike Wilcox
 
PHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentPHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentIrfan Maulana
 
MongoDB MEAN Stack Webinar October 7, 2015
MongoDB MEAN Stack Webinar October 7, 2015MongoDB MEAN Stack Webinar October 7, 2015
MongoDB MEAN Stack Webinar October 7, 2015Valeri Karpov
 
Testing Single Page Webapp
Testing Single Page WebappTesting Single Page Webapp
Testing Single Page WebappAkshay Mathur
 
Isomorphic web application
Isomorphic web applicationIsomorphic web application
Isomorphic web applicationOliver N
 
Drupal, Android and iPhone
Drupal, Android and iPhoneDrupal, Android and iPhone
Drupal, Android and iPhoneAlexandru Badiu
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and meJason Casden
 
The Dark Side of Single Page Applications
The Dark Side of Single Page ApplicationsThe Dark Side of Single Page Applications
The Dark Side of Single Page ApplicationsDor Kalev
 
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, DhakaJavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, DhakaNurul Ferdous
 
Node.js In The Enterprise - A Primer
Node.js In The Enterprise - A PrimerNode.js In The Enterprise - A Primer
Node.js In The Enterprise - A PrimerNaveen S.R
 
MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013Valeri Karpov
 
Nodejs - Building a RESTful API
Nodejs - Building a RESTful APINodejs - Building a RESTful API
Nodejs - Building a RESTful APISang Cù
 
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of Javascript[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of JavascriptIrfan Maulana
 
LinkedIn Mobile: How do we do it?
LinkedIn Mobile: How do we do it?LinkedIn Mobile: How do we do it?
LinkedIn Mobile: How do we do it?phegaro
 
TDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDBTDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDBValeri Karpov
 
10 things you should know about django
10 things you should know about django10 things you should know about django
10 things you should know about djangoAdieu
 

What's hot (20)

ClubAJAX Basics - Server Communication
ClubAJAX Basics - Server CommunicationClubAJAX Basics - Server Communication
ClubAJAX Basics - Server Communication
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
PHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentPHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web Development
 
MongoDB MEAN Stack Webinar October 7, 2015
MongoDB MEAN Stack Webinar October 7, 2015MongoDB MEAN Stack Webinar October 7, 2015
MongoDB MEAN Stack Webinar October 7, 2015
 
Testing Single Page Webapp
Testing Single Page WebappTesting Single Page Webapp
Testing Single Page Webapp
 
Isomorphic web application
Isomorphic web applicationIsomorphic web application
Isomorphic web application
 
Drupal, Android and iPhone
Drupal, Android and iPhoneDrupal, Android and iPhone
Drupal, Android and iPhone
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and me
 
The Dark Side of Single Page Applications
The Dark Side of Single Page ApplicationsThe Dark Side of Single Page Applications
The Dark Side of Single Page Applications
 
Blazor
BlazorBlazor
Blazor
 
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, DhakaJavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
 
20120306 dublin js
20120306 dublin js20120306 dublin js
20120306 dublin js
 
Node.js In The Enterprise - A Primer
Node.js In The Enterprise - A PrimerNode.js In The Enterprise - A Primer
Node.js In The Enterprise - A Primer
 
MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013
 
Nodejs - Building a RESTful API
Nodejs - Building a RESTful APINodejs - Building a RESTful API
Nodejs - Building a RESTful API
 
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of Javascript[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
 
LinkedIn Mobile: How do we do it?
LinkedIn Mobile: How do we do it?LinkedIn Mobile: How do we do it?
LinkedIn Mobile: How do we do it?
 
TDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDBTDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDB
 
Flash And Dom
Flash And DomFlash And Dom
Flash And Dom
 
10 things you should know about django
10 things you should know about django10 things you should know about django
10 things you should know about django
 

Similar to Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScript To Connect Native and Browser-Based Games

Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsAndrew Ferrier
 
Introduction to node.js aka NodeJS
Introduction to node.js aka NodeJSIntroduction to node.js aka NodeJS
Introduction to node.js aka NodeJSJITENDRA KUMAR PATEL
 
Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?Izzet Mustafaiev
 
You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)Igalia
 
Ustream Techtalks: Google Chrome Developer Tools
Ustream Techtalks: Google Chrome Developer ToolsUstream Techtalks: Google Chrome Developer Tools
Ustream Techtalks: Google Chrome Developer ToolsMáté Nádasdi
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and ResourcesRon Reiter
 
JavascriptMVC: Another choice of web framework
JavascriptMVC: Another choice of web frameworkJavascriptMVC: Another choice of web framework
JavascriptMVC: Another choice of web frameworkAlive Kuo
 
Node.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleNode.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleDmytro Semenov
 
Frost - W3C Mobile Ajax Workshop 2007
Frost - W3C Mobile Ajax Workshop 2007Frost - W3C Mobile Ajax Workshop 2007
Frost - W3C Mobile Ajax Workshop 2007Rocco Georgi
 
A 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developersA 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developersMark Leusink
 
Gwt overview & getting started
Gwt overview & getting startedGwt overview & getting started
Gwt overview & getting startedBinh Bui
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...WebStackAcademy
 
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5David Voyles
 
GWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO ToolsGWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO Toolsbarciszewski
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Conference
 

Similar to Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScript To Connect Native and Browser-Based Games (20)

Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web Applications
 
Introduction to node.js aka NodeJS
Introduction to node.js aka NodeJSIntroduction to node.js aka NodeJS
Introduction to node.js aka NodeJS
 
Full stack development
Full stack developmentFull stack development
Full stack development
 
Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?
 
You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)
 
Node
NodeNode
Node
 
Next.js with drupal, the good parts
Next.js with drupal, the good partsNext.js with drupal, the good parts
Next.js with drupal, the good parts
 
Ustream Techtalks: Google Chrome Developer Tools
Ustream Techtalks: Google Chrome Developer ToolsUstream Techtalks: Google Chrome Developer Tools
Ustream Techtalks: Google Chrome Developer Tools
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and Resources
 
JavascriptMVC: Another choice of web framework
JavascriptMVC: Another choice of web frameworkJavascriptMVC: Another choice of web framework
JavascriptMVC: Another choice of web framework
 
Node.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleNode.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scale
 
Frost - W3C Mobile Ajax Workshop 2007
Frost - W3C Mobile Ajax Workshop 2007Frost - W3C Mobile Ajax Workshop 2007
Frost - W3C Mobile Ajax Workshop 2007
 
A 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developersA 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developers
 
20120802 timisoara
20120802 timisoara20120802 timisoara
20120802 timisoara
 
Gwt overview & getting started
Gwt overview & getting startedGwt overview & getting started
Gwt overview & getting started
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
 
18_Node.js.ppt
18_Node.js.ppt18_Node.js.ppt
18_Node.js.ppt
 
GWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO ToolsGWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO Tools
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
 

Recently uploaded

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 

Recently uploaded (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 

Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScript To Connect Native and Browser-Based Games

  • 4. Web Workers and Multithreading §  Parallel Execution §  Communicates through Message §  Executes in Isolated Thread ● No Access To ●  DOM, Window ●  Document, Parent ●  No Shared Memory ● But You Do Have… ●  XHR / WebSockets ●  Navigator,Location ●  setTimeout/setInterval ●  App Cache, importScript
  • 5.
  • 6. Time to Create First Worker •  Varies depending on Worker Size •  Can take a second to start •  Initialize at beginning with a startup routine
  • 7.
  • 8.
  • 9.
  • 10. Web Worker Variations ● Inline vs. External ●  BlobBuilder ●  Inline only supported by FF and Chrome ●  No difference in performance ● Dynamic ●  Method determined at run time from JSON string ●  Altered and changed by user at run time
  • 11. Nested Shared Worker Nested Worker Main Thread Nested Worker Nested Worker Window Window iframe Shared Worker
  • 12. Platform Support ● Chrome/Firefox/Safari ●  Chrome/Safari supports Shared Only ●  Firefox supports Nested Only ● Android – (via Firefox and Opera Browser) ● iOS ● IE 10
  • 13. Command Module Internal APIs Thread Thread Core Instruction Module Thread Thread / iframe Thread / iframe … Thread Controller ThreadThread Pool Thread Manager Shared Memory
  • 14.
  • 16. WebGL The Basics Sample API/Libraries ● JavaScript Wrapper for OpenGL ES 2.0 ● Programmable Graphics Pipeline (GLSL) ● Hardware Acceleration ● SpiderGL ● Copperlicht ● CubicVR ● Gladius
  • 17.
  • 18. WebGL Hardware Test Verts Polys Draw FPS CPU RAM Video OS 858,750 485,292 654 30 2.2GHz Intel i7 Quad Core 4GB AMD Radeon 6750M 1GB OSX 634,179 353,386 483 30 2.53GH z Intel Core 2 Duo 4GB NVIDIA 9800+ 1GB Windows 7 590,898 333,924 450 33.33 2.53GH z Intel Core 2 Duo 8GB NVIDIA GeForce 9600M GT 512MB OSX Chrome
  • 19. Browser vs Browser Browser Verts Polys Draw Calls Chrome 590,898 333,924 450 Aurora 426,773 241,174 325 WebKit Nightly 393,948 222,624 300 Safari 295,473 166,974 225 Firefox 262,648 148,424 200
  • 20. WebGL Tid Bits Tips Up and coming ● DebugContex ● WebGL Inspector ● requestAnimFrame ● BMP Support ● No IE Support with out plugins and Hackery ● WebGL Running in Web Worker ● Swapping Memory Buffer rather than copy
  • 21. + +
  • 22. Web Sockets ● Full Duplex Communication ● No HTTP overhead ● Has Secure Transport Protocol ● Cross Origin Communication ● Very Simple Client Side API ●  Socket.onmessage = function(){} ●  Socket.onopen = function(){} ●  Socket.open(), Socket.send(), Socket.close()
  • 23. Nitty Gritty ● 2 Bytes Overhead Per Message ●  XHR ~871 Bytes ● Constant Connection ●  No need to re-establish connection (COMET) ● Connecting to Non Browser Applications (via Proxy/Server) ●  Byte Arrays ●  Bit Shifting
  • 25. WebSocket Server Side ● Standard HTTP Request/ Response model performs poorly for high number of users ● Server Needs ●  Thread or Non Blocking IO Design ●  High concurrency at Low Performance cost ● Existing Servers ●  Node.js ●  Jetty (Java) ●  Ruby (Event Machine) ●  Python (Twisted)
  • 26. ● Google V8 Engine ● JavaScript ● Event Driven ● Event Loop with Callbacks ● Non-Blocking ● Native C++ Bindings ● Fast!! FEATURES • WebSocket Server • Socket.IO • Kaazing Gateway • TCP Server • File Server • MySQL, MongoDB, NoSQL Modules (NPM)
  • 27. • Well Kept After • Documented • Quick Response • Use existing Git • npm dependencies • Fast! • (“Hello World!” in 1 minute) Free!!! FEATURES
  • 28. Other hosting options… http://no.de eSession ("Omega"["gunner" , "pilot"]); http://heroku.com http://nodejitsu.com http://cloudno.de
  • 29. JaHOVA OS Server Module ●  Connect to Multiple Applications on same server ●  Remote Stream Functions ●  User Creation on the fly ●  Support for Multiple Connection Types ●  TCP ●  WebSockets ●  Socket.IO and Express node.js modules
  • 30. JOSSM: Breakdown ●  Multiple Sessions ●  Multiple Session Types ●  Defined in a single line! ●  Streamed Sessions, Modules, and Functions ●  Easily add and connect users to multiple sessions handler.createSession("Omega", "", ["gunner", "pilot"]);
  • 31. JOSSM: Session Breakdown ●  Session Specific Properties ●  On Events ●  Open ●  Close ●  Message ●  Error ●  Multiple Modules ●  Remote Module Requests
  • 32. Engine Architecture ● Dynamic Nested/Shared Web Worker ●  Thread Controller ●  Shared Memory Pool ● Custom Event Management System ● Available Engines ●  Akihabara (2D) ●  Effect Game (2D) ●  Isogenic Engine ●  Johmoho
  • 33. 3rd Party Extensions Application JaHOVA OS Kernel Internal APIs Resource and Schedule Manager Module Instruction Module Command Module Threading Network DOM Graphics …
  • 34. Resource and Schedule Manager Module Event Manager Event Manager Interface Event Object Event Event … Event Object Event Event …… Subscriber Callback Subscriber Callback Subscriber Callback Subscriber Callback Core Manager Command Module
  • 35. Resource and Schedule Manager Module Instruction Module Router Route Resource Instruction Q Resource Instruction Q Resource Instruction Q Add Request … … Event Manager Core Manager Command Module Resource Dispatcher Resource Dispatcher Resource Dispatcher
  • 36. Engine Demonstration ● WebGL, WebSockets, Web Workers ● HTML5 Audio ● Thread Controller ●  Networking and Physics ● Node.js ●  JaHOVA OS Server Module ●  WebSocket - SocketIO ● Developed in under a week
  • 37.
  • 38. Final Thoughts ● Initialize Threads at Startup ● Initialization Timing ●  Serialize for dependencies and registration ● Careful with Debuggers and Web Workers ● See more at ●  http://jahovaos.com : Descriptions and Blog ●  http://demo.jahovaos.com : Code ● Expo Floor 2-4 on Wed @ DeVry Booth