JavaScript并发编程(影印版 英文版)

JavaScript并发编程(影印版 英文版)
分享
扫描下方二维码分享到微信
打开微信,点击右上角”+“,
使用”扫一扫“即可将网页分享到朋友圈。
作者: [加]
2017-04
版次: 1
ISBN: 9787564170769
定价: 69.00
装帧: 平装
开本: 16开
纸张: 胶版纸
页数: 267页
字数: 353千字
正文语种: 英语
2人买过
  •   JavaScript已经具备了并发能力,这也解释了为什么这门语言至今仍然屹立于现代web开发的前沿阵地。《JavaScript并发编程(影印版 英文版)》将帮助你深入JavaScript并发编程的世界,演示如何应用其核心原理、关键技术以及工具来应对各种复杂的开发难题。围绕并发编程的三个核心要素:并发、同步和保护,你将学会如何编写高效、富于变化的JavaScript程序,从而提高用户体验。
      书中通过采用各种开发方法,带领你将这些原理应用于实践。从JavaScriptpromises、webworkers、生成器到函数式编程技术,所有这些知识都将对你的应用程序性能产生实实在在的影响。除此之外,还进一步讨论了NodeJS并发编程。在成长为Web开发人员的道路上,《JavaScript并发编程(影印版 英文版)》将助你一臂之力。 Preface
    Chapter 1: Why JavaScript Concurrency?
    Synchronous JavaScript
    Synchronicity is easy to understand
    Asynchronous is inevitable
    Asynchronous browsers
    Types of concurrency
    Asynchronous actions
    Parallel actions
    JavaScript concurrency principles: Parallelize, Synchronize,
    Conserve
    Parallelize
    Synchronize
    The Promise API
    Conserve
    Summary

    Chapter 2: The JavaScript Execution Model
    Everything is a task
    Meet the players
    The Execution environment
    Event loops
    Task queues
    Execution contexts
    Maintaining execution state
    Job queues
    Creating tasks using timers
    Using setTimeout()
    Using setlnterval()
    Responding to DOM events
    Event targets
    Managing event frequency
    Responding to network events
    Making requests
    Coordinating requests
    Concurrency challenges with this model
    Limited opportunity for parallelism
    Synchronization through callbacks
    Summary

    Chapter 3: Synchronizing with Promises
    Promise terminology
    Promise
    State
    Executor
    Resolver
    Rejector
    Thenable
    Resolving and rejecting promises
    Resolving promises
    Rejecting promises
    Empty promises
    Reacting to promises
    Resolution job queues
    Using promised data
    Error callbacks
    Always reacting
    Resolving other promises
    Promise-like objects
    Building callback chains
    Promises only change state once
    Immutable promises
    Many then callbacks, many promises
    Passing promises around
    Synchronizing several promises
    Waiting on promises
    Cancelling promises
    Promises without executors
    Summary

    Chapter 4: Lazy Evaluation with Generators
    Call stacks and memory allocation
    Bookmarking function contexts
    Sequences instead of arrays
    Creating generators and yielding values
    Generator function syntax
    Yielding values
    Iterating over generators
    Infinite sequences
    No end in sight
    Alternating sequences
    Deferring to other generators
    Selecting a strategy
    Interweaving generators
    Passing data to generators
    Reusing generators
    Lightweight map/reduce
    Coroutines
    Creating coroutine functions
    Handling DOM events
    Handling promised values
    Summary

    Chapter 5: Working with Workers
    What are workers?
    OS threads
    Event targets
    True parallelism
    Types of workers
    Dedicated workers
    Sub-workers
    Shared workers
    Worker environments
    What's available, what isn't?
    Loading scripts
    Communicating with workers
    Posting messages
    Message serialization
    Receiving messages from workers
    Sharing application state
    Sharing memory
    Fetching resources
    Communicating between pages
    Performing sub-tasks with sub-workers
    Dividing work into tasks
    A word of caution
    Error handling in web workers
    Error condition checking
    Exception handling
    Summary

    Chapter 6: Practical Parallelism
    Functional programming
    Data in, data out
    Immutability
    Referential transparency and time
    Do we need to go parallel?
    How big is the data?
    Hardware concurrency capabilities
    Creating tasks and assigning work
    Candidate problems
    Embarrassingly parallel
    Searching collections
    Mapping and reducing
    Keeping the DOM responsive
    Bottom halves
    Translating DOM manipulation
    Translating DOM events
    Summary

    Chapter 7: Abstracting Concurrency
    Writing concurrent code
    Hiding the concurrency mechanism
    Without concurrency
    Worker communication with promises
    Helper functions
    Extending postMessage0
    Synchronizing worker results
    Lazy workers
    Reducing overhead
    Generating values in workers
    Lazy worker chains
    Using Parallel.js
    How it works
    Spawning workers
    Mapping and reducing
    Worker pools
    Allocating pools
    Scheduling jobs
    Summary

    Chapter 8: Evented IO with NodeJS
    Single threaded IO
    IO is slow
    IO events
    Multi-threading challenges
    More connections, more problems
    Deploying to the Internet
    The C10K problem
    Lightweight event handlers
    Evented network IO
    Handling HTTP requests
    Streaming responses
    Proxy network requests
    Evented file IO
    Reading from files
    Writing to files
    Streaming reads and writes
    Summary

    Chapter 9: Advanced NodeJS Concurrency
    Coroutines with Co
    Generating promises
    Awaiting values
    Resolving values
    Asynchronous dependencies
    Wrapping coroutines
    Child Processes
    Blocking the event loop
    Forking processes
    Spawning external processes
    Inter-process communication
    Process Clusters
    Challenges with process management
    Abstracting process pools
    Server clusters
    Proxying requests
    Facilitating micro-services
    Informed load balancing
    Summary

    Chapter 10: Building a Concurrent Application
    Getting started
    Concurrency first
    Retrofitting concurrency
    Application types
    Requirements
    The overall goal
    The API
    The UI
    Building the API
    The HTTP server and routing
    Co-routines as handlers
    The create chat handler
    The join chat handler
    The load chat handler
    The send message handler.
    Static handlers
    Building the UI
    Talking to the API
    Implementing the HTML
    DOM events and manipulation
    Adding an API worker
    Additions and improvements
    Clustering the API
    Cleaning up chats
    Asynchronous entry points
    Who's typing?
    Leaving chats
    Polling timeouts
    Summary
    Index
  • 内容简介:
      JavaScript已经具备了并发能力,这也解释了为什么这门语言至今仍然屹立于现代web开发的前沿阵地。《JavaScript并发编程(影印版 英文版)》将帮助你深入JavaScript并发编程的世界,演示如何应用其核心原理、关键技术以及工具来应对各种复杂的开发难题。围绕并发编程的三个核心要素:并发、同步和保护,你将学会如何编写高效、富于变化的JavaScript程序,从而提高用户体验。
      书中通过采用各种开发方法,带领你将这些原理应用于实践。从JavaScriptpromises、webworkers、生成器到函数式编程技术,所有这些知识都将对你的应用程序性能产生实实在在的影响。除此之外,还进一步讨论了NodeJS并发编程。在成长为Web开发人员的道路上,《JavaScript并发编程(影印版 英文版)》将助你一臂之力。
  • 目录:
    Preface
    Chapter 1: Why JavaScript Concurrency?
    Synchronous JavaScript
    Synchronicity is easy to understand
    Asynchronous is inevitable
    Asynchronous browsers
    Types of concurrency
    Asynchronous actions
    Parallel actions
    JavaScript concurrency principles: Parallelize, Synchronize,
    Conserve
    Parallelize
    Synchronize
    The Promise API
    Conserve
    Summary

    Chapter 2: The JavaScript Execution Model
    Everything is a task
    Meet the players
    The Execution environment
    Event loops
    Task queues
    Execution contexts
    Maintaining execution state
    Job queues
    Creating tasks using timers
    Using setTimeout()
    Using setlnterval()
    Responding to DOM events
    Event targets
    Managing event frequency
    Responding to network events
    Making requests
    Coordinating requests
    Concurrency challenges with this model
    Limited opportunity for parallelism
    Synchronization through callbacks
    Summary

    Chapter 3: Synchronizing with Promises
    Promise terminology
    Promise
    State
    Executor
    Resolver
    Rejector
    Thenable
    Resolving and rejecting promises
    Resolving promises
    Rejecting promises
    Empty promises
    Reacting to promises
    Resolution job queues
    Using promised data
    Error callbacks
    Always reacting
    Resolving other promises
    Promise-like objects
    Building callback chains
    Promises only change state once
    Immutable promises
    Many then callbacks, many promises
    Passing promises around
    Synchronizing several promises
    Waiting on promises
    Cancelling promises
    Promises without executors
    Summary

    Chapter 4: Lazy Evaluation with Generators
    Call stacks and memory allocation
    Bookmarking function contexts
    Sequences instead of arrays
    Creating generators and yielding values
    Generator function syntax
    Yielding values
    Iterating over generators
    Infinite sequences
    No end in sight
    Alternating sequences
    Deferring to other generators
    Selecting a strategy
    Interweaving generators
    Passing data to generators
    Reusing generators
    Lightweight map/reduce
    Coroutines
    Creating coroutine functions
    Handling DOM events
    Handling promised values
    Summary

    Chapter 5: Working with Workers
    What are workers?
    OS threads
    Event targets
    True parallelism
    Types of workers
    Dedicated workers
    Sub-workers
    Shared workers
    Worker environments
    What's available, what isn't?
    Loading scripts
    Communicating with workers
    Posting messages
    Message serialization
    Receiving messages from workers
    Sharing application state
    Sharing memory
    Fetching resources
    Communicating between pages
    Performing sub-tasks with sub-workers
    Dividing work into tasks
    A word of caution
    Error handling in web workers
    Error condition checking
    Exception handling
    Summary

    Chapter 6: Practical Parallelism
    Functional programming
    Data in, data out
    Immutability
    Referential transparency and time
    Do we need to go parallel?
    How big is the data?
    Hardware concurrency capabilities
    Creating tasks and assigning work
    Candidate problems
    Embarrassingly parallel
    Searching collections
    Mapping and reducing
    Keeping the DOM responsive
    Bottom halves
    Translating DOM manipulation
    Translating DOM events
    Summary

    Chapter 7: Abstracting Concurrency
    Writing concurrent code
    Hiding the concurrency mechanism
    Without concurrency
    Worker communication with promises
    Helper functions
    Extending postMessage0
    Synchronizing worker results
    Lazy workers
    Reducing overhead
    Generating values in workers
    Lazy worker chains
    Using Parallel.js
    How it works
    Spawning workers
    Mapping and reducing
    Worker pools
    Allocating pools
    Scheduling jobs
    Summary

    Chapter 8: Evented IO with NodeJS
    Single threaded IO
    IO is slow
    IO events
    Multi-threading challenges
    More connections, more problems
    Deploying to the Internet
    The C10K problem
    Lightweight event handlers
    Evented network IO
    Handling HTTP requests
    Streaming responses
    Proxy network requests
    Evented file IO
    Reading from files
    Writing to files
    Streaming reads and writes
    Summary

    Chapter 9: Advanced NodeJS Concurrency
    Coroutines with Co
    Generating promises
    Awaiting values
    Resolving values
    Asynchronous dependencies
    Wrapping coroutines
    Child Processes
    Blocking the event loop
    Forking processes
    Spawning external processes
    Inter-process communication
    Process Clusters
    Challenges with process management
    Abstracting process pools
    Server clusters
    Proxying requests
    Facilitating micro-services
    Informed load balancing
    Summary

    Chapter 10: Building a Concurrent Application
    Getting started
    Concurrency first
    Retrofitting concurrency
    Application types
    Requirements
    The overall goal
    The API
    The UI
    Building the API
    The HTTP server and routing
    Co-routines as handlers
    The create chat handler
    The join chat handler
    The load chat handler
    The send message handler.
    Static handlers
    Building the UI
    Talking to the API
    Implementing the HTML
    DOM events and manipulation
    Adding an API worker
    Additions and improvements
    Clustering the API
    Cleaning up chats
    Asynchronous entry points
    Who's typing?
    Leaving chats
    Polling timeouts
    Summary
    Index
查看详情
12
相关图书 / 更多
JavaScript并发编程(影印版 英文版)
Java研发自测入门与进阶
林宁、魏兆玉
JavaScript并发编程(影印版 英文版)
Java语言程序设计(2023年版)全国高等教育自学考试指导委员会
全国高等教育自学考试指导委员会
JavaScript并发编程(影印版 英文版)
Java项目开发实战(微视频版)
陈强
JavaScript并发编程(影印版 英文版)
Java+OpenCV案例佳作选
姚利民
JavaScript并发编程(影印版 英文版)
Java核心编程技术(第4版微课版新世纪应用型高等教育软件专业系列规划教材)
张屹、蔡木生 编
JavaScript并发编程(影印版 英文版)
Java Web及其框架技术
陈振兴
JavaScript并发编程(影印版 英文版)
JavaScript多线程编程实践
(美)托马斯 亨特二世(Thomas Hunter II),(加拿大)布莱恩 英格利什(Bryan English)
JavaScript并发编程(影印版 英文版)
Java开发坑点解析:从根因分析到最佳实践
朱晔
JavaScript并发编程(影印版 英文版)
Java面向对象程序设计(题库·微课视频版)
梁胜彬 主编 渠慎明 白晨希 马华蔚 甘志华 程素营 副主编
JavaScript并发编程(影印版 英文版)
Java核心技术速学版(第3版)
(美)凯·S.霍斯特曼(Cay S. Horstmann)
JavaScript并发编程(影印版 英文版)
Java程序设计(微课版新世纪应用型高等教育计算机类课程规划教材)
李月辉、李慧 编
JavaScript并发编程(影印版 英文版)
Java到Kotlin:代码重构指南
(英)邓肯·麦格雷戈(Duncan McGregor)
您可能感兴趣 / 更多
JavaScript并发编程(影印版 英文版)
重返冰河时代:发现史前世界
[加]彼得·L.斯托克著,陈虹、刘吉颖、陈冉译
JavaScript并发编程(影印版 英文版)
假如你是一座城市(奇想国童书)
[加]京·麦克莱尔 著 [意]弗兰切斯卡·桑纳 绘;董海雅/译
JavaScript并发编程(影印版 英文版)
人物设定创意宝库:消极特质词汇速查,塑造招人喜欢的有缺陷的人物
[加]安杰拉·阿克曼 后浪
JavaScript并发编程(影印版 英文版)
虫虫女孩:一个真实的故事
[加]索菲娅·斯潘塞,[美]玛格丽特
JavaScript并发编程(影印版 英文版)
外婆的菜园
[加]乔丹·斯科特
JavaScript并发编程(影印版 英文版)
美丽的小鸟森林鱼童书
[加]苏珊娜·德尔·瑞佐 著;王甜甜、吕海涛 译
JavaScript并发编程(影印版 英文版)
森林的故事(吉竹伸介插图本)/可可爱爱的世界名著
[加]西顿 著;祁和平、蒲隆、应中元 译
JavaScript并发编程(影印版 英文版)
“没话找话”指南世界500强企业沟通顾问、从业30年的沟通障碍学博士说给社交别扭人的破冰实操话术
[加]克萝尔·弗来明(Carol Fleming) 著
JavaScript并发编程(影印版 英文版)
叶嘉莹读诵纳兰词全集下卷 叶嘉莹等著中信出版
[加]叶嘉莹 编
JavaScript并发编程(影印版 英文版)
线粒体与医学未来
[加]李诺恩 著;逯军 译
JavaScript并发编程(影印版 英文版)
菜园小侦探
[加]卡彤
JavaScript并发编程(影印版 英文版)
加拿大史 外国历史 [加]查尔斯·g. d.罗伯茨 新华正版
[加]查尔斯·g. d.罗伯茨