eBook Excerpt

Functional and Reactive Domain Modeling

Debasish Ghosh, Software Engineer, data Artisans

Audience: Architects, Managers

Technical level: Introductory

Perhaps the biggest challenge a developer faces is understanding the problems that a software system needs to solve. Domain modeling is a technique for creating a conceptual map of a problem space such as a business system or a scientific application, so that the developer can write the software more efficiently. The domain model doesn't present a solution to the problem, but instead describes the attributes, roles, and relationships of the entities involved, along with the constraints of the system.

Reactive application design, which uses functional programming principles along with asynchronous non-blocking communication, promises to be a potent pattern for developing performant systems that are relatively easy to manage, maintain and evolve. Typically we call such models "reactive" because they are more responsive both to user requests and to system loads. But designing and implementing such models requires a different way of thinking. Because the core behaviors are implemented using pure functions, you can reason about the domain model just like mathematics, so your model becomes verifiable and robust.

Functional and Reactive Domain Modeling teaches you how to think of the domain model in terms of pure functions and how to compose them to build larger abstractions. You will start with the basics of functional programming and gradually progress to the advanced concepts and patterns that you need to know to implement complex domain models. The book demonstrates how advanced FP patterns like algebraic data types, typeclass based design, and isolation of side-effects can make your model compose for readability and verifiability. On the subject of reactive modeling, the book focuses on higher order concurrency patterns like actors and futures. It uses the Akka framework as the reference implementation and demonstrates how advanced architectural patterns like event sourcing and CQRS can be put to great use in implementing scalable models. You will learn techniques that are radically different from the standard RDBMS based applications that are based on mutation of records. You'll also pick up important patterns like using asynchronous messaging for interaction based on non blocking concurrency and model persistence, which delivers the speed of in-memory processing along with suitable guarantees of reliability.

The free sample PDF available here includes chapter 1. All registrants qualify for a Lightbend discount and will save 40% off the price of the full Functional and Reactive Domain Modeling (all formats) as it becomes available by referencing promotional code TSGOSH2. If you are interested in purchasing the full book get it here. Offer only valid at manning.com.

Grab your copy

Please enter your information to receive your E-book chapter(s) of Functional and Reactive Domain Modeling and be signed up for the Lightbend Newsletter. Once you've entered your information and submitted the form, the PDF will be emailed to your address.

*Required: The information you provide will be used in accordance with the terms of our privacy policy. **Required Opt-In: I would like to receive the monthly newsletter, educational resources (white papers, ebooks, webinars, reports), and event information via email. You can unsubscribe at anytime or manage your email preferences here.

ABOUT AUTHOR(S)

Debasish Ghosh, Software Engineer, data Artisans

About Lightbend

Lightbend (Twitter: @Lightbend) provides the leading Reactive application development platform for building distributed systems. Based on a message-driven runtime, these distributed systems, which include microservices and streaming fast data applications, can effortlessly scale on multi-core and cloud architectures. Many of the most admired brands around the globe are transforming their businesses with our platform, engaging billions of users every day through software that is changing the world. For more information on Lightbend, visit: lightbend.com