舉報

會員
Hands-On Reactive Programming with Clojure
Konrad Szydlo Leonardo Borges 著
更新時間:2021-07-02 14:04:35
開會員,本書免費讀 >
ReactiveProgrammingiscentraltomanyconcurrentsystems,andcanhelpmaketheprocessofdevelopinghighlyconcurrent,event-driven,andasynchronousapplicationssimplerandlesserror-prone.ThisbookwillallowyoutoexploreReactiveProgramminginClojure1.9andhelpyougettogripswithsomeofitsnewfeaturessuchastransducers,readerconditionals,additionalstringfunctions,directlinking,andsocketservers.Hands-OnReactiveProgrammingwithClojurestartsbyintroducingyoutoFunctionalReactiveProgramming(FRP)anditsformulations,aswellasshowingyouhowitinspiredCompositionalEventSystems(CES).ItthenguidesyouinunderstandingReactiveProgrammingaswellaslearninghowtodevelopyourabilitytoworkwithtime-varyingvaluesthankstoexamplesofreactiveapplicationsimplementedindifferentframeworks.You'llalsogaininsightintosomeinterestingReactivedesignpatternssuchasthesimplecomponent,circuitbreaker,request-response,andmultiple-masterreplication.Finally,thebookintroducesmicroservices-basedarchitectureinClojureandcloseswithexamplesofunittestingframeworks.Bytheendofthebook,youwillhavegainedalltheknowledgeyouneedtocreateapplicationsusingdifferentReactiveProgrammingapproaches.
最新章節
- Leave a review - let other readers know what you think
- Other Books You May Enjoy
- Further reading
- Summary
- Monads
- Gathering stats about ages
品牌:中圖公司
上架時間:2021-07-02 12:33:15
出版社:Packt Publishing
本書數字版權由中圖公司提供,并由其授權上海閱文信息技術有限公司制作發行
- Leave a review - let other readers know what you think 更新時間:2021-07-02 14:04:35
- Other Books You May Enjoy
- Further reading
- Summary
- Monads
- Gathering stats about ages
- Applicative functors
- Finding the average of ages
- The option functor
- Functors
- The semantics of map
- Appendix - The Algebra of Library Design
- Further reading
- Summary
- Promises
- Futures
- Futures and promises in Clojure
- Constant vars
- Private vars
- Var bindings
- Vars
- commute
- alter
- ref-set
- Software Transactional Memory
- Mutating refs
- Dereferencing refs
- Refs
- send-off
- send
- Mutating agents
- Dereferencing agents
- Agents
- compare-and-set!
- swap!
- reset!
- Mutating atoms
- Dereferencing atoms
- Atoms
- Coordination
- Synchronization
- Classifying constructs
- The Clojure approach to concurrency
- Other problems with locks
- Race conditions
- Livelock
- Starvation
- Deadlock
- The traditional solution to the problem with states
- Phantom reads
- Unrepeatable reads
- Lost updates
- Common problems with states
- State identity and value
- Concurrency or parallelism
- Introduction to concurrency
- Concurrency Utilities in Clojure
- Further reading
- Summary
- The should-be-a macro
- The should-throw macro
- The should= and should== macros
- The should-contain macro
- The Speclj framework
- The just macro
- The contains macro
- Checking collections
- Checking for exceptions
- Top-down testing
- The facts macro
- The fact macro
- The Midje framework
- The expectations framework
- The are macro
- The is macro
- The clojure.test framework
- Clojure unit testing frameworks
- Non-functional testing
- Functional testing
- Testing approaches
- Why testing is important
- Testing Reactive Apps
- Further reading
- Summary
- The Swagger UI
- The DELETE Card API
- The UPDATE Card API
- The GET Cards API
- The GET Card API
- Compojure HTTP API
- The Card API
- Coercion with the schema
- Database operations with Toucan
- Setting up the project structure
- A Clojure RESTful service
- Services messaging
- Application overview
- RESTful microservices in action
- DevOps
- Services communication
- Services contracts
- Build dependencies
- Service separation
- Service granularity
- Service boundaries
- Attitudes towards microservices
- Common pitfalls
- The CQRS communication pattern
- Event-driven communication
- Communication between services
- Cross-cutting concerns
- Failure isolation
- Deployment
- Team building and structure
- Separate data storage
- Domain Driven Design
- Microservices best practices
- When to use microservices
- Disadvantages of microservices
- Scalability
- Advantages of microservices
- An introduction to microservices
- Reactive Microservices
- Further reading
- Summary
- Exercises
- Putting it all together
- Combining the AWS Observables
- Creating AWS Observables
- Setting up the dashboard project
- Running the AWS stub server
- Designing the solution
- The describeDBInstances endpoint
- Relational Database Service
- The describeInstances endpoint
- Elastic Compute Cloud Service
- The describeStackResources endpoint
- The describeStacks endpoint
- CloudFormation
- AWS resources dashboard
- Infrastructure automation
- Amazon Services use case
- A Reactive API to Amazon Web Services
- Further reading
- Summary
- Futures and blocking IO
- The movies example revisited
- Combinators and event handlers
- Creating futures
- Imminent – a composable futures library for Clojure
- Fetching data in parallel
- Clojure futures
- A New Approach to Futures
- Further reading
- Summary
- Exercises
- Application's parser
- Utility functions
- Remaining components
- Life cycle and component local state
- Components overview
- The board state
- Creating an agile board with Om
- Intercomponent communication
- Identity
- Filling in the blanks
- Query expressions
- Om components
- Managing application state
- Application components
- Setting up the Contacts project
- Building a simple Contacts application with Om
- ClojureScript and Om
- Lessons from functional programming
- Enter React.js
- The problem with complex web UIs
- The UI as a Function
- Further reading
- Summary
- Reagi and other CES frameworks
- Working with the active keys stream
- Modeling user input as event streams
- Putting it all together
- Game entities
- Setting up the project
- Building a Simple ClojureScript Game with Reagi
- Further reading
- Summary
- CES versus core.async
- A respondent application
- Exercise 5.2
- Exercise 5.1
- Exercises
- Implementing behaviors
- Implementing event streams
- Implementing tokens
- Designing the public API
- Clojure or ClojureScript?
- A minimal CES framework
- Creating Your Own CES Framework with core.async
- Further reading
- Summary
- Transducers and core.async
- Transducers
- Sliding buffer
- Dropping buffer
- Fixed buffer
- Backpressure
- Error handling
- Implementing the application code
- Rewriting the stock market application with core.async
- The Communicating Sequential Processes paper
- The core.async library
- Asynchronous programming and concurrency
- Introduction to core.async
- Summary
- Observable rolling averages
- Removing incidental complexity with RxClojure
- Identifying problems with our current approach
- Rolling averages
- Building a stock market monitoring application
- Asynchronous Programming and Networking
- Further reading
- Summary
- Backpressure strategies
- Sample
- Backpressure
- Retry
- Catch
- OnError
- Error handling
- One more flatmap for the road
- flatmap and friends
- Manipulating observables
- Custom observables
- Creating observables
- Observer – an iterator's dual
- The observer pattern revisited
- A Look at Reactive Extensions
- Further reading
- Summary
- Complex GUIs and animations
- Asynchronous programming and networking
- Applications of FRP
- Arrowized FRP
- Asynchronous data flow
- First-order FRP
- Implementation challenges
- Signals and events
- Higher-order FRP
- Functional Reactive Programming
- The Observer design pattern
- The most widely used reactive program
- Object-oriented Reactive Programming
- Dataflow programming
- A bit of history
- Exercise 1.1
- Making it reactive
- More colors
- The concept of time in RxJS
- A taste of Reactive Programming
- What is Reactive Programming?
- Reviews
- Get in touch
- Conventions used
- Download the color images
- Download the example code files
- To get the most out of this book
- What this book covers
- Who this book is for
- Preface
- Packt is searching for authors like you
- About the reviewer
- About the authors
- Contributors
- Packt.com
- Why subscribe?
- About Packt
- Hands-On Reactive Programming with Clojure Second Edition
- Copyright and Credits
- Title Page
- coverpage
- coverpage
- Title Page
- Copyright and Credits
- Hands-On Reactive Programming with Clojure Second Edition
- About Packt
- Why subscribe?
- Packt.com
- Contributors
- About the authors
- About the reviewer
- Packt is searching for authors like you
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Download the color images
- Conventions used
- Get in touch
- Reviews
- What is Reactive Programming?
- A taste of Reactive Programming
- The concept of time in RxJS
- More colors
- Making it reactive
- Exercise 1.1
- A bit of history
- Dataflow programming
- Object-oriented Reactive Programming
- The most widely used reactive program
- The Observer design pattern
- Functional Reactive Programming
- Higher-order FRP
- Signals and events
- Implementation challenges
- First-order FRP
- Asynchronous data flow
- Arrowized FRP
- Applications of FRP
- Asynchronous programming and networking
- Complex GUIs and animations
- Summary
- Further reading
- A Look at Reactive Extensions
- The observer pattern revisited
- Observer – an iterator's dual
- Creating observables
- Custom observables
- Manipulating observables
- flatmap and friends
- One more flatmap for the road
- Error handling
- OnError
- Catch
- Retry
- Backpressure
- Sample
- Backpressure strategies
- Summary
- Further reading
- Asynchronous Programming and Networking
- Building a stock market monitoring application
- Rolling averages
- Identifying problems with our current approach
- Removing incidental complexity with RxClojure
- Observable rolling averages
- Summary
- Introduction to core.async
- Asynchronous programming and concurrency
- The core.async library
- The Communicating Sequential Processes paper
- Rewriting the stock market application with core.async
- Implementing the application code
- Error handling
- Backpressure
- Fixed buffer
- Dropping buffer
- Sliding buffer
- Transducers
- Transducers and core.async
- Summary
- Further reading
- Creating Your Own CES Framework with core.async
- A minimal CES framework
- Clojure or ClojureScript?
- Designing the public API
- Implementing tokens
- Implementing event streams
- Implementing behaviors
- Exercises
- Exercise 5.1
- Exercise 5.2
- A respondent application
- CES versus core.async
- Summary
- Further reading
- Building a Simple ClojureScript Game with Reagi
- Setting up the project
- Game entities
- Putting it all together
- Modeling user input as event streams
- Working with the active keys stream
- Reagi and other CES frameworks
- Summary
- Further reading
- The UI as a Function
- The problem with complex web UIs
- Enter React.js
- Lessons from functional programming
- ClojureScript and Om
- Building a simple Contacts application with Om
- Setting up the Contacts project
- Application components
- Managing application state
- Om components
- Query expressions
- Filling in the blanks
- Identity
- Intercomponent communication
- Creating an agile board with Om
- The board state
- Components overview
- Life cycle and component local state
- Remaining components
- Utility functions
- Application's parser
- Exercises
- Summary
- Further reading
- A New Approach to Futures
- Clojure futures
- Fetching data in parallel
- Imminent – a composable futures library for Clojure
- Creating futures
- Combinators and event handlers
- The movies example revisited
- Futures and blocking IO
- Summary
- Further reading
- A Reactive API to Amazon Web Services
- Amazon Services use case
- Infrastructure automation
- AWS resources dashboard
- CloudFormation
- The describeStacks endpoint
- The describeStackResources endpoint
- Elastic Compute Cloud Service
- The describeInstances endpoint
- Relational Database Service
- The describeDBInstances endpoint
- Designing the solution
- Running the AWS stub server
- Setting up the dashboard project
- Creating AWS Observables
- Combining the AWS Observables
- Putting it all together
- Exercises
- Summary
- Further reading
- Reactive Microservices
- An introduction to microservices
- Advantages of microservices
- Scalability
- Disadvantages of microservices
- When to use microservices
- Microservices best practices
- Domain Driven Design
- Separate data storage
- Team building and structure
- Deployment
- Failure isolation
- Cross-cutting concerns
- Communication between services
- Event-driven communication
- The CQRS communication pattern
- Common pitfalls
- Attitudes towards microservices
- Service boundaries
- Service granularity
- Service separation
- Build dependencies
- Services contracts
- Services communication
- DevOps
- RESTful microservices in action
- Application overview
- Services messaging
- A Clojure RESTful service
- Setting up the project structure
- Database operations with Toucan
- Coercion with the schema
- The Card API
- Compojure HTTP API
- The GET Card API
- The GET Cards API
- The UPDATE Card API
- The DELETE Card API
- The Swagger UI
- Summary
- Further reading
- Testing Reactive Apps
- Why testing is important
- Testing approaches
- Functional testing
- Non-functional testing
- Clojure unit testing frameworks
- The clojure.test framework
- The is macro
- The are macro
- The expectations framework
- The Midje framework
- The fact macro
- The facts macro
- Top-down testing
- Checking for exceptions
- Checking collections
- The contains macro
- The just macro
- The Speclj framework
- The should-contain macro
- The should= and should== macros
- The should-throw macro
- The should-be-a macro
- Summary
- Further reading
- Concurrency Utilities in Clojure
- Introduction to concurrency
- Concurrency or parallelism
- State identity and value
- Common problems with states
- Lost updates
- Unrepeatable reads
- Phantom reads
- The traditional solution to the problem with states
- Deadlock
- Starvation
- Livelock
- Race conditions
- Other problems with locks
- The Clojure approach to concurrency
- Classifying constructs
- Synchronization
- Coordination
- Atoms
- Dereferencing atoms
- Mutating atoms
- reset!
- swap!
- compare-and-set!
- Agents
- Dereferencing agents
- Mutating agents
- send
- send-off
- Refs
- Dereferencing refs
- Mutating refs
- Software Transactional Memory
- ref-set
- alter
- commute
- Vars
- Var bindings
- Private vars
- Constant vars
- Futures and promises in Clojure
- Futures
- Promises
- Summary
- Further reading
- Appendix - The Algebra of Library Design
- The semantics of map
- Functors
- The option functor
- Finding the average of ages
- Applicative functors
- Gathering stats about ages
- Monads
- Summary
- Further reading
- Other Books You May Enjoy
- Leave a review - let other readers know what you think 更新時間:2021-07-02 14:04:35