soa with ruby

Download Soa With Ruby

If you can't read please download the document

Upload: zakmandhro

Post on 21-Jun-2015

8.098 views

Category:

Technology


3 download

DESCRIPTION

Service-Oriented Architecture with Ruby. Covers open-source libraries that make web services possible on Ruby.

TRANSCRIPT

  • 1. SOA with Ruby erubycon July 18, 2007 Zak MandhroSenior Manager BearingPoint, Inc Content of this document is covered under the Creative Commons Attribution 3.0 license with the exception of BearingPoint copyrighted template, logo and trademark.

2. Agenda

  • Introduction to SOA
  • Discuss benefits of SOA
  • Review SOA-related Ruby libraries
  • Discuss use-cases for SOA with Ruby

3. What is Service-Oriented Architecture?

  • Choose the BEST answer:
  • A. A paradigm shift in software development
  • B. A way to integrated heterogeneous systems
  • C. A new name for distributed computing
  • D. The most hyped and overused buzzword of this industry

4. Definitions of SOA

  • A paradigm fororganizing and utilizing distributed capabilities... [A] uniform means to offer, discover, interact with and use capabilities to produce desired effects... -OASIS[1]
  • An approach to building software as a set of autonomous, reusable and interoperable units of functionality using open standards.- Zak Mandhro

[1] http://en.wikipedia.org/wiki/Service-oriented_architecture 5. Characteristics of SOA

  • Based on open standards
  • Interoperable
  • Autonomous
  • Reusable
  • Reliable
  • Discoverable
  • Loosely-Coupled
  • Stateless
  • Composable
  • Manageable
  • Secure

6. Core Components of SOA

  • SOAP : Simple Object Access Protocol
  • WSDL : Web Services Description Language
  • UDDI : Universal Discovery, Definition and Integration
  • BPEL : Business Process Execution Language
  • ESB : Enterprise Service Bus
  • WS-* : Web Services Standards
  • Foundation:XML and HTTP

7. Standards Galore Aka: WS death star http://roadmap.cbdiforum.com/reports/protocols/ 8. Benefits of SOA

  • Improve long-term value of software assets
  • Improve quality through modularity and testability
  • Reduce development time with composition and reusability
  • Leverage heterogeneous development environments
  • Avoid vendor and platform lock-in
  • Integrate with ERPs and Enterprise infrastructure software

9. Enter Ruby 10. Benefits ofRuby

  • Less code = Improved productivity
  • Meta-programming = Better APIs
  • Dynamic behavior = No stubs!

11. SOA-Related Ruby Libraries

  • Web Services Interoperability Basic Profile Version 1.0 *
  • Standard
  • XML 1.0
  • SOAP 1.1
  • WSDL 1.1
  • UDDI V2

* Source: http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html 12. SOA-Related Ruby Libraries

  • Web Services Interoperability Basic Profile Version 1.0 *
  • Standard Ruby Library
  • XML 1.0 REXML,others
  • SOAP 1.1 SOAP4R, AWS
  • WSDL 1.1 WSDL4R, AWS
  • UDDI V2 UDDI4R

* Source: http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html 13. Library Maturity Grade Scale

  • Criteria Grade
    • Code A: Stable, mostly usable as is B: Beta, may require tweaking C: Alpha, will need fixing
    • DocumentationA: Detailed, with examples B: Plenty of Ruby docs (RDOC) C: Learn from source code
    • Testing A: More than 60% coverage B: More than 30% coverage C: Less than 30% coverage

Grades are informational only, and represent nothing more than my evaluation and personal opinion. 14. Ruby XML Libraries

  • Name :REXML
    • Pros: Most popular. Comes standard with Ruby.
    • Cons: A bit complex. Native Ruby, slower.
  • Name: libxml-Ruby
    • Pros: Faster, binds to C library.
    • Cons: Also complex. Binary dependency.
  • Other Libraries:
    • ROXML (RubyForge) binds Ruby classes to XML
    • XML::Simple and XML::Smart provide simpler APIs
    • Rails 'to_xml' method builds XML from models
    • Builder::XmlMarkup provides builder-style XML creation

REXML Score Code: A Doc: A Tests: A libxml-R Score Code: B Doc: B Tests: B 15. SOAP 1.1 with Ruby

  • Project Name:SOAP4R
  • Purpose:Ruby library for Simple Object Access Protocol 1.1
  • Features
    • Inter-operable web services clients
    • Standalone SOAP server
    • SOAP with attachments
    • Basic authentication and SSL
    • RPC-encoded style
    • Document-literal style

SOAP4R Score Code: A Doc: C Tests: A 16. WSDL for Ruby

  • Project Name:WSDL4R
  • Purpose:Generate Ru by code from Web Services Descriptions (WSDL)
  • Features
    • Packaged with SOAP4R
    • Dynamic Web Services clients (no stubs!)
    • WSDL from Ruby web services
    • Ruby classes from XML schemas (XSD)
    • Command-line tools wsdl2ruby and xsd2ruby

Maturity Score Code: B Doc: C Tests: B 17. UDDI for Ruby

  • Project Name:UDDI4R
  • Purpose:Dynamic discovery and binding of web services
  • UDDI Version 2.0 Client
  • Features
    • All UDDI Version 2.0 inquiry operations
    • Built on ROXML
    • Disclaimer: I am the lead developer for UDDI4R

Maturity Score Code: B Doc: B Tests: A 18. Web Services for Rails

  • Project Name:Action Web Services
  • Purpose:Simple web services provider
  • Designed for building APIs over Ruby on Rails applications
  • Features
    • RPC-Encoded web services only
    • Dynamic WSDL at runtime
    • Packaged with Ruby on Rails (for now)

Maturity Score Code: A Doc: B Tests: A 19. What's Missing

  • WS-I Basic Profile 1.1
    • Newer versions of standards
  • WS-I Security Profile 1.0
    • WSS4R is work-in-process library
  • Better documentation
    • SOAP4R and WSDL4R need tutorials
  • Important WS-* Standards
    • Can be built on existingfoundationlibraries

20. Use cases for SOA with Ruby

  • Ruby can be aproductiveway to:
  • Build web applications over web services
  • Write web services tests with minimal code
  • Write custom web services monitoring and management
  • Integrate ERPs, COTS and custom applications
  • Write SOA glue-code, e.g. custom transformation
  • Perform programmatic web services orchestration
  • Develop basic web services

21. Questions and Answers My blog:http://mandhro.com UDDI4R:http://uddi4r.rubyforge.org SOAP4R & WSDL4R:http://dev.ctor.org/soap4r REXML:http://www.germane-software.com/software/rexml/ libxml-Ruby:http://libxml.rubyforge.org