This eBook includes the following formats, accessible from your Account page after purchase:
EPUB The open industry format known for its reflowable content and usability on supported mobile devices.
MOBI The eBook format compatible with the Amazon Kindle and Amazon Kindle applications.
PDF The popular standard, used most often with the free Adobe® Reader® software.
This eBook requires no passwords or activation to read. We customize your eBook by discretely watermarking it with your name, making it uniquely yours.
Also available in other formats.
Register your product to gain access to bonus material or receive a coupon.
The Complete Guide to Building Highly Scalable, Services-Based Rails Applications
Ruby on Rails deployments are growing, and Rails is increasingly being adopted in larger environments. Today, Rails developers and architects need better ways to interface with legacy systems, move into the cloud, and scale to handle higher volumes and greater complexity. In Service-Oriented Design with Ruby and Rails Paul Dix introduces a powerful, services-based design approach geared toward overcoming all these challenges. Using Dix’s techniques, readers can leverage the full benefits of both Ruby and Rails, while overcoming the difficulties of working with larger codebases and teams.
Dix demonstrates how to integrate multiple components within an enterprise application stack; create services that can easily grow and connect; and design systems that are easier to maintain and upgrade. Key concepts are explained with detailed Ruby code built using open source libraries such as ActiveRecord, Sinatra, Nokogiri, and Typhoeus. The book concludes with coverage of security, scaling, messaging, and interfacing with third-party services.
Service-Oriented Design with Ruby and Rails will help you
About the Author xxi
Chapter 1: Implementing and Consuming Your First Service 1
What’s a Service? 1
Service Requirements 2
The Ruby Tool Set 2
The User Service Implementation 5
Implementing the Client Library 18
Putting It All Together 26
Chapter 2: An Introduction to Service-Oriented Design 27
Use of Service-Oriented Design in the Wild 27
Service-Oriented Design Versus Service-Oriented Architecture Versus
RESTful-Oriented Architecture 28
Making the Case for Service-Oriented Design 29
Chapter 3: Case Study: Social Feed Reader 41
A Typical Rails Application 41
The Rails Social Feed Reader Application 45
Converting to Services 54
Chapter 4: Service and API Design 59
Partitioning Functionality into Separate Services 59
Versioning Services 64
URIs and Interface Design 66
Successful Responses 68
Error Responses 72
Handling Joins 73
API Complexity 75
Chapter 5: Implementing Services 79
The Vote Service 79
Chapter 6: Connecting to Services 107
Blocking I/O, Threading, and Parallelism 107
Multi-threaded Requests 113
Logging for Performance 117
Handling Error Conditions 118
Testing and Mocking Service Calls 119
Requests in Development Environments 121
Chapter 7: Developing Service Client Libraries 123
Parsing Logic 127
Connection and Request Logic 136
Mocks, Stubs, and Tests 143
Chapter 8: Load Balancing and Caching 147
Latency and Throughput 147
Load Balancing 148
Caching with Memcached 155
HTTP Caching 162
Chapter 9: Parsing XML for Legacy Services 167
Chapter 10: Security 185
Chapter 11: Messaging 215
What Is Messaging? 215
RabbitMQ and AMQP 217
Synchronous Reads, Asynchronous Writes 227
The CAP Theorem 230
Data Is the API 234
Chapter 12: Web Hooks and External Services 237
Web Hooks 238
Integrating with External Services 251
Ensuring Performance and Reliability 258
Appendix: RESTful Primer 263
Roy Fielding’s REST 263
REST and Resources 265
HTTP and the Uniform Interface 268
ONE MONTH ACCESS!
Get unlimited 30-day access to thousands of Books & Training Videos about technology, professional development and digital media If you continue your subscription after your 30-day trial, you can receive 30% off a monthly subscription to the Safari Library for up to 12 months.