CSC/ECE 517 Fall 2009/wiki2 17 va: Difference between revisions
(Reformatted a few things, added start to introduction) |
(Organized the paper) |
||
Line 6: | Line 6: | ||
!!!! SOA provides another view of providing functionality based upon services offered in terms of protocols and a specific API. To provide services, platforms rely upon principles and the power that can be expressed through reflection and meta programming. Research and report how these critical concepts relate to and support SOA. | !!!! SOA provides another view of providing functionality based upon services offered in terms of protocols and a specific API. To provide services, platforms rely upon principles and the power that can be expressed through reflection and meta programming. Research and report how these critical concepts relate to and support SOA. | ||
!!!! Reword the following paragraph to "sound better" | |||
Reflection and metaprogramming relate to and support use of a [http://en.wikipedia.org/wiki/Service-oriented_architecture ''Service Oriented Architecture'' 3] (or SOA). The first goal of this article are to provide a simple understanding of reflection, metaprogramming, and SOA's. The next goal is to explain how these concepts are interrelated. The last goal is to examine how reflection and metaprogramming supports SOA's. | |||
== '''Service Oriented Architecture (SOA), Reflection, and Metaprogramming''' == | == '''Service Oriented Architecture (SOA), Reflection, and Metaprogramming''' == | ||
Line 11: | Line 15: | ||
__TOC__ | __TOC__ | ||
=='''An overview of the concepts'''== | |||
=='''Explanation of Service Oriented Architectures'''== | ==='''Explanation of Service Oriented Architectures'''=== | ||
[http://en.wikipedia.org/wiki/Service-oriented_architecture ''Service Oriented Architecture''] (or SOA) is a concept in computing that defines the interaction of different software in terms of protocols and functionality. A SOA can be viewed as containing multiple services which may be linked as desired by protocols. SOA is designed so that each functional unit of software in a system is isolated from each other and provides a service without directly making [http://en.wikipedia.org/wiki/Subroutine subroutine calls] to each other. This may be accomplished with the use of messages [http://en.wikipedia.org/wiki/Service_oriented_architecture 3] | [http://en.wikipedia.org/wiki/Service-oriented_architecture ''Service Oriented Architecture''] (or SOA) is a concept in computing that defines the interaction of different software in terms of protocols and functionality. A SOA can be viewed as containing multiple services which may be linked as desired by protocols. SOA is designed so that each functional unit of software in a system is isolated from each other and provides a service without directly making [http://en.wikipedia.org/wiki/Subroutine subroutine calls] to each other. This may be accomplished with the use of messages [http://en.wikipedia.org/wiki/Service_oriented_architecture 3] | ||
Line 31: | Line 33: | ||
SOA also does not limit the protocol used to transfer the data and a wide variety of technologies can be used including [http://en.wikipedia.org/wiki/SOAP_(protocol) SOAP], [http://en.wikipedia.org/wiki/Representational_State_Transfer REST] and [http://en.wikipedia.org/wiki/Remote_procedure_call RPC]. This is generally left for the programmer of the system. | SOA also does not limit the protocol used to transfer the data and a wide variety of technologies can be used including [http://en.wikipedia.org/wiki/SOAP_(protocol) SOAP], [http://en.wikipedia.org/wiki/Representational_State_Transfer REST] and [http://en.wikipedia.org/wiki/Remote_procedure_call RPC]. This is generally left for the programmer of the system. | ||
==='''Metaprogramming'''=== | |||
==='''Reflection'''=== | |||
Reflection is a specific type of meta-programming and emphasizes on dynamic program modification. The concept of reflection can be used to extend the service being provided by a system in a Service-oriented Architecture by allowing the transfered data to modify the behavior. | |||
=='''How it is all related'''== | |||
=='''Enhancing SOA'''== | =='''Enhancing SOA'''== | ||
Line 39: | Line 49: | ||
#[http://en.wikipedia.org/wiki/Reflection_(computer_science) Reflection] - Programs that modify their own behavior | #[http://en.wikipedia.org/wiki/Reflection_(computer_science) Reflection] - Programs that modify their own behavior | ||
:*'''''Example''': Ruby example of reflection by dynamically adding an instance method | :*'''''Example''': Ruby example of reflection by dynamically adding an instance method |
Revision as of 04:12, 8 October 2009
!!!! I have copied things that help with formatting the page from my prior wiki. Feel free to add in anything that you think may help with formatting from your project.
!!!! Main topic (to keep us on track):
!!!! Note: Delete all the !!!! parts when done. These are notes while developing the wiki.
!!!! SOA provides another view of providing functionality based upon services offered in terms of protocols and a specific API. To provide services, platforms rely upon principles and the power that can be expressed through reflection and meta programming. Research and report how these critical concepts relate to and support SOA.
!!!! Reword the following paragraph to "sound better"
Reflection and metaprogramming relate to and support use of a Service Oriented Architecture 3 (or SOA). The first goal of this article are to provide a simple understanding of reflection, metaprogramming, and SOA's. The next goal is to explain how these concepts are interrelated. The last goal is to examine how reflection and metaprogramming supports SOA's.
Service Oriented Architecture (SOA), Reflection, and Metaprogramming
An overview of the concepts
Explanation of Service Oriented Architectures
Service Oriented Architecture (or SOA) is a concept in computing that defines the interaction of different software in terms of protocols and functionality. A SOA can be viewed as containing multiple services which may be linked as desired by protocols. SOA is designed so that each functional unit of software in a system is isolated from each other and provides a service without directly making subroutine calls to each other. This may be accomplished with the use of messages 3
!!!! If we can, find a way to make the footnote in brackets, without brackets will probably work though. !!!! Did you intend to say "subroutine calls" above? I changed it from calls to subroutine calls because the topics did not appear to match. !!!! It may be a good idea to add a graphical example of a SOA here
The information being used to communicate between services must contain sufficient detail about the characteristic of the data and the data itself and must remain independent of the underlying platform and programming language. SOA does not specify the format to transfer the data, and programmers have generally used XML, it does, however, describe that it must meet the following criterias:
!!!! The two bullets below have been retrieved from wikipedia, need to paraphrase and/or change
- The metadata should come in a form that software systems can use to configure dynamically by discovery and incorporation of defined services, and also to maintain coherence and integrity.
- The metadata should come in a form that system designers can understand and manage with a reasonable expenditure of cost and effort.
SOA also does not limit the protocol used to transfer the data and a wide variety of technologies can be used including SOAP, REST and RPC. This is generally left for the programmer of the system.
Metaprogramming
Reflection
Reflection is a specific type of meta-programming and emphasizes on dynamic program modification. The concept of reflection can be used to extend the service being provided by a system in a Service-oriented Architecture by allowing the transfered data to modify the behavior.
Enhancing SOA
Service-oriented Architecture becomes greatly effective when the underlying programs are able to dynamically adapt to the data received. Two very important concepts support this principles that SOA is build upon:
- Metaprogramming - Programs that write and manipulate other programs
- Reflection - Programs that modify their own behavior
- Example: Ruby example of reflection by dynamically adding an instance method
# Define an instance method len of String to return string length String.class_eval("def len; size; end")
Has the same outcome as
- Example: Ruby example of adding an instance method to a class
class String def len size end end
!!!! How to format
List:
- A
- B
- C
Link:
- Parametric Polymorphism (Ruby) - This language feature can handle a wide variety of inputs without crashing, but unexpected inputs may be processed in unexpected ways, causing the need for greater input testing. Tools have been developed to perform this testing.
class Employee < ActiveRecord::Base validates_confirmation_of :password, :email_address, :on => :create validates_presence_of :name, :sex, :age, :salary, :address validates_inclusion_of :sex, :in => %w(M F), :message => 'must be M or F' validates_inclusion_of :age, :within => 1..60 validates_length_of :salary :allow_nil => false, :within => 50000..120000 validates_length_of :address, :allow_blank => false, :allow_nil => false, :maximum => 500 end
Ruby and Rails also provides Test Unit which should be used to test for this. Polymorphism in Rails makes it very important to perform these checks. Rails has a plugin tarantula, a fuzzy spider. It crawls the rails application, fuzzing inputs and analyzing what comes back. 7
CWE-89: Failure to Preserve SQL Query Structure (aka 'SQL Injection')
Appendix
Vulnerability: Susceptibility to attack. A detailed description can be found here
References
1. http://www.service-architecture.com/web-services/articles/service-oriented_architecture_soa_definition.html - Brief explanation of SOA
2. Thomas, Dave (2006). Programming Ruby, The Pragmatic Programmers' Guide.
3. http://en.wikipedia.org/wiki/Service_oriented_architecture - A very detailed explanation of SOA
4. http://www.javaworld.com/javaworld/jw-06-2005/jw-0613-soa.html - A more easy to understand explanation of SOA
!!!! Remove if we do not have any good external links.
Useful External Links