中图网文创礼盒,买2个减5元
欢迎光临中图网 请 | 注册
> >>
JavaScript并发编程-(影印版)

JavaScript并发编程-(影印版)

出版社:东南大学出版社出版时间:2017-04-01
开本: 32开 页数: 267
中 图 价:¥51.8(7.5折) 定价  ¥69.0 登录后可看到会员价
加入购物车 收藏
运费6元,满69元免运费
?快递不能达地区使用邮政小包,运费14元起
云南、广西、海南、新疆、青海、西藏六省,部分地区快递不可达
本类五星书更多>

JavaScript并发编程-(影印版) 版权信息

JavaScript并发编程-(影印版) 本书特色

JavaScript已经具备了并发能力,这也解释了为 什么这门语言至今仍然屹立于现代web开发的前沿阵 地。亚当·布达奇编*的《JavaScript并发编程(影 印版)(英文版)》将帮助你深入JavaScript并发编程 的世界,演示如何应用其核心原理、关键技术以及工 具来应对各种复杂的开发难题。围绕并发编程的三个 核心要素:并发、同步和保护,你将学会如何编写* 高效、*富于变化的JavaScript程序,从而提高用户 体验。
书中通过采用各种开发方法,带领你将这些原理 应用于实践。从JavaScript promises、web workers、生成器到函数式编程技术,所有这些知识 都将对你的应用程序性能产生实实在在的影响。除此 之外,还进一步讨论了NodeJS并发编程。在成长为* **的Web开发人员的道路上,本书将助你一臂之力 。

JavaScript并发编程-(影印版) 内容简介

JavaScript已经具备了并发能力,这也解释了为什么这门语言至今仍然屹立于现代web开发的前沿阵地。本书将帮助你深入JavaScript并发编程的世界,演示如何应用其核心原理、关键技术以及工具来应对各种复杂的开发难题。围绕并发编程的三个核心要素:并发、同步和保护(conservation),你将学会如何编写更高效、更富于变化的JavaScript程序,提高用户体验。

JavaScript并发编程-(影印版) 目录

Preface Chapter 1: Why JavaScript Concurrency?Synchronous JavaScriptSynchronicity is easy to understandAsynchronous is inevitableAsynchronous browsersTypes of concurrencyAsynchronous actionsParallel actionsJavaScript concurrency principles: Parallelize, Synchronize,ConserveParallelizeSynchronizeThe Promise APIConserveSummary Chapter 2: The JavaScript Execution ModelEverything is a taskMeet the playersThe Execution environmentEvent loopsTask queuesExecution contextsMaintaining execution stateJob queuesCreating tasks using timersUsing setTimeout()Using setlnterval()Responding to DOM eventsEvent targetsManaging event frequencyResponding to network eventsMaking requestsCoordinating requestsConcurrency challenges with this modelLimited opportunity for parallelismSynchronization through callbacksSummary Chapter 3: Synchronizing with PromisesPromise terminologyPromiseStateExecutorResolverRejectorThenableResolving and rejecting promisesResolving promisesRejecting promisesEmpty promisesReacting to promisesResolution job queuesUsing promised dataError callbacksAlways reactingResolving other promisesPromise-like objectsBuilding callback chainsPromises only change state onceImmutable promisesMany then callbacks, many promisesPassing promises aroundSynchronizing several promisesWaiting on promisesCancelling promisesPromises without executorsSummary Chapter 4: Lazy Evaluation with GeneratorsCall stacks and memory allocationBookmarking function contextsSequences instead of arraysCreating generators and yielding valuesGenerator function syntaxYielding valuesIterating over generatorsInfinite sequencesNo end in sightAlternating sequencesDeferring to other generatorsSelecting a strategyInterweaving generatorsPassing data to generatorsReusing generatorsLightweight map/reduceCoroutinesCreating coroutine functionsHandling DOM eventsHandling promised valuesSummary Chapter 5: Working with WorkersWhat are workers?OS threadsEvent targetsTrue parallelismTypes of workersDedicated workersSub-workersShared workersWorker environmentsWhat's available, what isn't?Loading scriptsCommunicating with workersPosting messagesMessage serializationReceiving messages from workersSharing application stateSharing memoryFetching resourcesCommunicating between pagesPerforming sub-tasks with sub-workersDividing work into tasksA word of cautionError handling in web workersError condition checkingException handlingSummary Chapter 6: Practical ParallelismFunctional programmingData in, data outImmutabilityReferential transparency and timeDo we need to go parallel?How big is the data?Hardware concurrency capabilitiesCreating tasks and assigning workCandidate problemsEmbarrassingly parallelSearching collectionsMapping and reducingKeeping the DOM responsiveBottom halvesTranslating DOM manipulationTranslating DOM eventsSummary Chapter 7: Abstracting ConcurrencyWriting concurrent codeHiding the concurrency mechanismWithout concurrencyWorker communication with promisesHelper functionsExtending postMessage0Synchronizing worker resultsLazy workersReducing overheadGenerating values in workersLazy worker chainsUsing Parallel.jsHow it worksSpawning workersMapping and reducingWorker poolsAllocating poolsScheduling jobsSummary Chapter 8: Evented IO with NodeJSSingle threaded IOIO is slowIO eventsMulti-threading challengesMore connections, more problemsDeploying to the InternetThe C10K problemLightweight event handlersEvented network IOHandling HTTP requestsStreaming responsesProxy network requestsEvented file IOReading from filesWriting to filesStreaming reads and writesSummary Chapter 9: Advanced NodeJS ConcurrencyCoroutines with CoGenerating promisesAwaiting valuesResolving valuesAsynchronous dependenciesWrapping coroutinesChild ProcessesBlocking the event loopForking processesSpawning external processesInter-process communicationProcess ClustersChallenges with process managementAbstracting process poolsServer clustersProxying requestsFacilitating micro-servicesInformed load balancingSummary Chapter 10: Building a Concurrent ApplicationGetting startedConcurrency firstRetrofitting concurrencyApplication typesRequirementsThe overall goalThe APIThe UIBuilding the APIThe HTTP server and routingCo-routines as handlersThe create chat handlerThe join chat handlerThe load chat handlerThe send message handler.Static handlersBuilding the UITalking to the APIImplementing the HTMLDOM events and manipulationAdding an API workerAdditions and improvementsClustering the APICleaning up chatsAsynchronous entry pointsWho's typing?Leaving chatsPolling timeoutsSummary Index
展开全部
商品评论(0条)
暂无评论……
书友推荐
编辑推荐
返回顶部
中图网
在线客服