1 option
Service-oriented design with Ruby and Rails
- Format:
- Book
- Author/Creator:
- Dix, Paul, Author.
- Series:
- Addison-Wesley professional Ruby series Service-oriented design with Ruby and Rails
- Language:
- English
- Subjects (All):
- Ruby on rails (Electronic resource).
- Web services--Design.
- Web services.
- Service-oriented architecture (Computer science).
- Web sites.
- Physical Description:
- 1 online resource : ill.
- Edition:
- 1st edition
- Place of Publication:
- [Place of publication not identified] Addison Wesley 2011
- Language Note:
- English
- System Details:
- text file
- Summary:
- 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 Build highly scalable, Ruby-based service architectures that operate smoothly in the cloud or with legacy systems Scale Rails systems to handle more requests, larger development teams, and more complex code bases Master new best practices for designing and creating services in Ruby Use Ruby to glue together services written in any language Use Ruby libraries to build and consume RESTful Web services Use Ruby JSON parsers to quickly represent resources from HTTP services Write lightweight, well-designed API wrappers around internal or external services Discover powerful non-Rails frameworks that simplify Ruby service implementation Implement standards-based enterprise messaging with Advanced Message Queuing Protocol (AMQP) Optimize performance with load balancing and caching Provide for security and authentication
- Contents:
- Cover
- Contents
- Foreword
- Preface
- Acknowledgments
- About the Author
- 1 Implementing and Consuming Your First Service
- What's a Service?
- Service Requirements
- The Ruby Tool Set
- Sinatra
- ActiveRecord
- JSON
- Typhoeus
- Rspec
- The User Service Implementation
- Using GET
- POSTing a User
- PUTing a User
- Deleting a User
- Verifying a User
- Implementing the Client Library
- Finding a User
- Creating a User
- Updating a User
- Destroying a User
- Putting It All Together
- Conclusion
- 2 An Introduction to Service-Oriented Design
- Use of Service-Oriented Design in the Wild
- Service-Oriented Design Versus Service-Oriented Architecture Versus RESTful-Oriented Architecture
- Making the Case for Service-Oriented Design
- Isolation
- Robustness
- Scalability
- Agility
- Interoperability
- Reuse
- 3 Case Study: Social Feed Reader
- A Typical Rails Application
- The Rails Social Feed Reader Application
- Features
- Current Setup
- Converting to Services
- Segmenting into Services
- Breaking Up the Application into Services
- 4 Service and API Design
- Partitioning Functionality into Separate Services
- Partitioning on Iteration Speed
- Partitioning on Logical Function
- Partitioning on Read/Write Frequencies
- Partitioning on Join Frequency
- Versioning Services
- Including a Version in URIs
- Using Accept Headers for Versioning
- URIs and Interface Design
- Successful Responses
- HTTP Status Codes
- HTTP Caching
- Successful Response Bodies
- Error Responses
- Error Response Bodies
- Handling Joins
- Storing References
- Joining at the Highest Level
- Beware of Call Depth
- API Complexity
- Atomic APIs
- Multi-Gets
- Multiple Models
- 5 Implementing Services
- The Vote Service.
- A Multi-Get Interface
- The Vote Interface
- API Design Guidelines
- Models
- Rails
- Rails 2.3 Routes
- Rails 3 Routes
- The Rails Controller
- Rack
- 6 Connecting to Services
- Blocking I/O, Threading, and Parallelism
- Asynchronous I/O
- Multi-threading
- Making Single Requests
- Making Simultaneous Requests
- Multi-threaded Requests
- JRuby
- Logging for Performance
- Handling Error Conditions
- Testing and Mocking Service Calls
- Requests in Development Environments
- 7 Developing Service Client Libraries
- Packaging
- Jeweler
- Building and Deploying a Library
- Parsing Logic
- The JSON Gem
- YAJL Ruby
- Wrapping Parsed Results
- ActiveModel
- Validations
- Serialization
- Connection and Request Logic
- Data Reads
- Data Writes
- Mocks, Stubs, and Tests
- 8 Load Balancing and Caching
- Latency and Throughput
- Load Balancing
- Load Balancing Algorithms
- Implementing Load Balancing
- Caching with Memcached
- The Memcached Client and ActiveRecord
- Time-Based Expiration
- Manual Expiration
- Generational Cache Keys
- Expiration-Based Caching
- Validation-Based Caching
- Implementing HTTP Caching
- 9 Parsing XML for Legacy Services
- XML
- REXML
- Nokogiri
- SOAP
- Exploring Web Services with a WSDL File
- Making Requests
- 10 Security
- Authentication
- HTTP Authentication
- Signing Requests
- SSL for Authentication
- Authentication for Rails Applications
- Authorization
- Firewalls
- An RBAC Authorization Service
- Encryption
- SSL for Encryption
- Public/Private Key Pairs for Encryption
- 11 Messaging
- What Is Messaging?
- Synchronous Versus Asynchronous Messaging
- Queues
- Message Formats
- RabbitMQ and AMQP
- Queues in RabbitMQ.
- Exchanges and Bindings
- Durability and Persistence
- Client Libraries
- Synchronous Reads, Asynchronous Writes
- HTTP-Based Reads
- Messaging-Based Writes
- The CAP Theorem
- Eventual Consistency
- Designing Around Consistency
- Data Is the API
- Operations on Fields
- Modifications to Field Operations
- 12 Web Hooks and External Services
- Web Hooks
- PubSubHubbub
- Receiving Web Hooks
- Providing Web Hooks
- Strategies for Dealing with Failure
- OAuth
- Implementing an OAuth Consumer
- Implementing an OAuth Provider
- Integrating with External Services
- Consuming Data
- Pushing Data
- The Request Lifecycle
- Worker Processes
- Ensuring Performance and Reliability
- Segregating Queues
- Metrics
- Throttling and Quotas
- Appendix RESTful Primer
- Roy Fielding's REST
- Constraints
- Architectural Elements
- Architectural Views
- REST and Resources
- URIs and Addressability
- Representations
- HTTP and the Uniform Interface
- HTTP Methods
- HTTP Headers
- Index.
- Notes:
- Bibliographic Level Mode of Issuance: Monograph
- Description based on publisher supplied metadata and other sources.
- ISBN:
- 9786612739118
- 9781282739116
- 1282739115
- 9780132480277
- 0132480271
- OCLC:
- 1027142986
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.