corey clark phd daniel montgomery web dev platform cross
play

Corey Clark PhD Daniel Montgomery Web Dev Platform Cross Cross - PowerPoint PPT Presentation

Corey Clark PhD Daniel Montgomery Web Dev Platform Cross Cross Platform Browser HTML5 Web Web WebGL Socket Worker Optimized Parallel Hardware Communication Acceleration Processing Channel Web Workers JaHOVA OS Internal APIs


  1. Corey Clark PhD Daniel Montgomery

  2. Web Dev Platform Cross Cross Platform Browser HTML5 Web Web WebGL Socket Worker Optimized Parallel Hardware Communication Acceleration Processing Channel

  3. Web Workers JaHOVA OS Internal APIs Web Threading Sockets Kernel Network WebGL Graphics

  4. Web Workers and Multithreading ● No Access To Parallel Execution § ● DOM, Window Communicates § ● Document, Parent through Message ● No Shared Memory Executes in § ● But You Do Have… Isolated Thread ● XHR / WebSockets ● Navigator,Location ● setTimeout/setInterval ● App Cache, importScript

  5. Time to Create First Worker • Varies depending on Worker Size • Can take a second to start • Initialize at beginning with a startup routine

  6. 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

  7. Nested Shared Main Thread Shared Worker Worker Window Window Nested Worker Nested Worker iframe Nested Worker

  8. Platform Support ● Chrome/Firefox/Safari ● Chrome/Safari supports Shared Only ● Firefox supports Nested Only ● Android – (via Firefox and Opera Browser) ● iOS ● IE 10

  9. Internal APIs Command Module Thread Core Thread Instruction Manager Module Thread / Thread iframe Thread Controller Thread … Thread Thread Thread / Pool Shared iframe Memory

  10. What is WebGL? OpengGL ES 2.0

  11. WebGL The Basics Sample API/Libraries ● JavaScript Wrapper ● SpiderGL for OpenGL ES 2.0 ● Copperlicht ● Programmable ● CubicVR Graphics Pipeline ● Gladius (GLSL) ● Hardware Acceleration

  12. WebGL Hardware Test Chrome Verts Polys Draw FPS CPU RAM Video OS 858,750 485,292 654 30 2.2GHz 4GB AMD OSX Intel i7 Radeon Quad 6750M Core 1GB 634,179 353,386 483 30 2.53GH 4GB NVIDIA Windows z Intel 9800+ 7 Core 2 1GB Duo 590,898 333,924 450 33.33 2.53GH 8GB NVIDIA OSX z Intel GeForce Core 2 9600M Duo GT 512MB

  13. 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

  14. WebGL Tid Bits Tips Up and coming ● DebugContex ● WebGL Running in Web Worker ● WebGL Inspector ● Swapping Memory ● requestAnimFrame Buffer rather than ● BMP Support copy ● No IE Support with out plugins and Hackery

  15. + +

  16. 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()

  17. 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

  18. Daniel Montgomery

  19. ● 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) ●

  20. FEATURES Modules (NPM) ● Google V8 Engine • WebSocket Server ● JavaScript • Socket.IO ● Event Driven • Kaazing Gateway ● Event Loop with Callbacks • TCP Server ● Non-Blocking • File Server ● Native C++ Bindings • MySQL, MongoDB, ● Fast!! NoSQL

  21. FEATURES • Well Kept After • Documented • Quick Response • Use existing Git • npm dependencies • Fast! • (“Hello World!” in 1 minute) Free!!!

  22. Other hosting options… http://no.de http://nodejitsu.com eSession ("Omega"["gunner" , "pilot"]); http://heroku.com http://cloudno.de

  23. 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

  24. 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"]);

  25. JOSSM: Session Breakdown ● Session Specific Properties ● On Events Open ● Close ● Message ● Error ● ● Multiple Modules ● Remote Module Requests

  26. 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

  27. Application JaHOVA OS Kernel Internal APIs 3 rd Party Command Threading Extensions Module Network Resource and Schedule Manager Graphics Module … Instruction DOM Module

  28. Resource and Schedule Manager Module Event Manager Subscriber Event Object Callback Event … Core Subscriber Event Manager Callback Event … Manager Subscriber Event Object Interface Callback Event Command Module … Subscriber Event Callback

  29. Instruction Module Command Module Add Request Resource and Schedule Manager Router Module Route Core Manager Resource Instruction Q Resource Dispatcher Resource Instruction Q Resource Event Dispatcher … Manager Resource … Instruction Q Resource Dispatcher

  30. 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

  31. 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

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend