concept web service in category ruby

appears as: web services, web service
Ruby in Practice

This is an excerpt from Manning's book Ruby in Practice.

One of the greatest assets of Ruby is its ability to scale small. As a software developer, you have learned about the difficulties of scaling large: applications with millions of lines of code, handling terabytes of data and serving billions of hits a day, taking advantage of multicore architectures and server farms. The rest of this book is about working with big services: messaging, web services, databases, and so on. Scaling up and scaling out are tough challenges that excite the imagination, but they’re not all that software can do for you. We thought it would be prudent to take a chapter and show you how Ruby can help you out doing everyday “stuff.”

Throughout this book, we show you ways of integrating Ruby with different applications and services. Some scenarios depend on a particular protocol or architecture, such as using Lightweight Directory Access Protocol (LDAP), sharing data through a relational database, or moving messages around with WebSphere MQ (WMQ). In this chapter, we’ll explore the web architecture and look at how we can use web services across language, platform, and application boundaries.

To this end, we’ll focus on Service Oriented Architecture (SOA) with Ruby. SOA is not a particular product, technology, or protocol—it’s an architecture for building services with the intent to reuse them in different contexts and combine them into larger applications. In this chapter, we’re going to choose common protocols and message formats and discuss three common styles for building web services: plain HTTP, REST, and SOAP.

Besides being the largest collection of useless information, personal opinions, and short video clips, the web is also a large-scale system built from resources. Each page is a resource identified by its URL. We use links to navigate from one resource to another, and forms to operate on those resources. Applying these same principles, we can build web services that are simple for both people and applications to use, and we can wire them together to create larger applications.