EMML

From Seo Wiki - Search Engine Optimization and Programming Languages

Jump to: navigation, search

EMML, or Enterprise Mashup Markup Language, is an XML markup language for creating enterprise mashups, which are software applications that consume and mash data from variety of sources, often performing logical or mathematical operations as well as presenting data. Mashed data produced by enterprise mashups are presented in graphical user interfaces as mashlets, widgets, or gadgets. EMML can also be considered a declarative mashup Domain Specific Language (DSL). A mashup DSL eliminates the need for complex, time-consuming, and repeatable procedural programming logic to create enterprise mashups. EMML also provides a declarative language for creating visual tools for enterprise mashups. EMML is an open language specification that is promoted by the Open Mashup Alliance (see below), with the eventual objective of submitting the specification to a recognized industry standards body.[1] The language is free-to-use, including technologies that embed or use it.[2]

I’ve personally examined EMML and can attest that it’s a clean powerful design that includes potent capabilities such as declarative data transformation, advanced procedural logic, parallelism, meta-data and much more.

—Dion Hinchcliffe, Industry Analyst[3]

The primary benefits of EMML are mashup design portability and interoperability of mashup solutions.[4] These benefits are expected to accelerate the adoption of enterprise mashups by creating transferable skills for software developers and reducing vendor lock-in. The introduction of EMML is expected to help accelerate the trend toward the integration of Web-based applications and Service-oriented architecture (SOA) technologies.[5] Bank of America was a high-profile early supporter of EMML.[6] Other prominent early supporters included Hewlett-Packard, Capgemini, Adobe Systems, and Intel.[1]

Contents

EMML History

Raj Krishnamurthy (Chief Architect at JackBe Corporation) and Deepak Alur (VP Engineering at JackBe Corporation) started working on EMML in 2006. Their objective was to enable user-oriented and user-enabled mashups by creating what was then a new type of middleware called an Enterprise Mashup Platform. Raj Krishnamurthy became the chief language designer and implementer of EMML and also led the team to create an Eclipse-based EMML IDE called Mashup Studio.[7] This work evolved into the EMML reference implementation that was donated to the Open Mashup Alliance. Raj Krishnamurthy continues to be one of the key contributors to EMML through the Open Mashup Alliance.

EMML and Open Mashup Alliance

The Open Mashup Alliance (OMA) was launched to promote enterprise mashup interoperability and portability. The OMA is developing EMML as an industry specification that is available under a Creative Commons Attribution No Derivatives license.[8] The license means that EMML users are allowed to copy and distribute EMML. However, EMML can not be modified by users and the ownership of EMML by the OMA must be made clear in any redistribution.[9] The OMA Web site provides the EMML specification [10], the EMML schema[11], a reference runtime implementation capable of running EMML scripts[10], sample EMML mashup scripts[10], and technical documentation.[12]

The eventual objective of the OMA is to submit the EMML specification and any other OMA specifications to a recognized industry standards body.[1]

EMML Features

EMML language provides a rich set of high-level mashup-domain vocabulary to consume and mash a variety of Web data-sources in flexible ways. EMML provides a uniform syntax to invoke heterogeneous service styles: REST, WSDL, RSS/ATOM, RDBMS, and POJO. The EMML language also provides ability to mix diverse data formats: XML, JSON, JDBC, JavaObjects, and primitive types.

High-level EMML language features include[13]:

  • Filter and sort data coming from heterogeneous services
  • Join data across heterogeneous services and data formats
  • Group and aggregate data using assorted functions
  • Annotate original service data to enrich its semantic meaning
  • Merge multiple data streams into consolidated datasets
  • Split datasets to select individual data fields
  • Embedded scripting support for JavaScript, JRuby,Groovy, XQuery
  • Web clipping to scrape data from HTML pages
  • Conditional statements - If/Then/Else, While, ForEach
  • Parallel syntax for concurrent processing

EMML is primarily a XML-based declarative language, but also provides ability to encode complex logic using embedded scripting engines. XPath is the expression language used in EMML.

Directinvoke statement

directinvoke[14] provides ability to invoke and consume variety of data services. These data services may be REST, RSS/ATOM, or SOAP services. directinvoke also supports Web clipping by allowing HTML pages to be specified as service endpoints. HTTP GET, POST, PUT, and DELETE protocols are supported in directinvoke. HTTP Header and cookie support is also available thus providing capability to consume a wide variety of REST/SOAP Web services. It is possible to use directinvoke with a proxy server.

Code sample of passing attributes as parameters to a service:

<directinvoke endpoint="http://www.myCompany.com/rest-services/getItems" 
 
    method="GET" outputvariable="$result" query="items=all" 
 
    appID="67GYH30N25" /> 
 
<directinvoke endpoint="http://www.svcsltd.com/getReservation" 
 
    method="GET" outputvariable="$news" xmlns:sc="http://www.svcltd.com/" 
 
    sc:date="20070515" sc:nights="3"/>

Filter statement

The filter[15] statement filters the content of a variable using an XPath expression and places the result in a new variable.

Code sample for filtering west-coast customers using region data-item:

<filter inputvariable="$queryResult"    
 
filterexpr="/customers[region='West']"    outputvariable="$westCoastOnly"/>

Sort statement

The sort[16] statement sorts the content of a document-type variable or variable fragment based on key expressions and places the result in another variable.

Code sample that sorts tickets based on created date and customer:

<sort inputvariable="$troubleTickets" 
 
  sortexpr="ticket" 
 
  sortkeys="xs:date(created) descending, customer ascending" 
 
  outputvariable="$troubleTickets"/>

Groupby statement

groupby[17] provides the ability to group and aggregate data sets. Standard XPath aggregation operations can be used and there is an extension mechanism for adding user-defined functions. Nested Grouping of hierarchical data sets are also supported. There is a Having clause to filter Group attributes.

Code sample that groups books by genre and computes total copies for each genre:

<group by="$catalog//book/genre" outputvariable="$groupResult"> 
 
<res:genre name="{$group_key}" copiessold="{sum(copiessold)}"/> 
 
</group>

Merge statement

merge[18] provides ability to combine various data sources including RSS/ATOM feeds, XML, JSON payload formats. The merge feature is similar to SQL UNION functionality but merges hierarchical document structures.

Code sample that merges Yahoo! News, Financial News, and Reuters feeds:

<merge inputvariables="$YahooRSS, $FinancialNewsRss, $ReutersRSS" 
 
  outputvariable="$NewsAggregate"/>

Annotate statement

annotate[19] provides ability to enrich the semantic meaning of source service data with microformat-like elements/attributes. These data annotations can be used by mashlets or gadgets to provide richer visual user interfaces.

Code sample for annotating vendor payload with geo-coordinates:

<annotate variable="$vendors" expr="/vendor/site" > 
 
element geo:lat { $georesult//y:Latitude/string() }, 
 
element geo:long { $georesult//y:Longitude/string() } 
 
</annotate>

Join statement

The join[20] statement defines how disparate, hierarchical data formats are joined and is comparable to inner joins for relational databases.

Code sample where output variable contains a <res:recommendations> element with a repeating set of <res:movie> children, which are the repeating items. Each <res:movie> contains a <res:movietitle> child with data from the variable named movies and <res:rating> and <res:comment> children with data from the variable named reviews:

<join outputvariable="$joinResult" 
 
  joincondition="$movies/movie/@id = $reviews/review/movie/title"> 
 
  <select name="res:recommendations"> 
 
      <res:movie> 
 
        <res:movietitle>{$movies/title}</res:movietitle> 
 
        <res:rating>{$reviews/rating}</res:rating> 
 
        <res:comment>{$reviews/comment}</res:comment> 
 
      </res:movie> 
 
  </select> 
 
</join>

Scripting in EMML

EMML is a declarative language, but provides programmatic scripting[21] extensions for performing complex mashup logic. JavaScript, JRuby, Groovy, POJO, XQuery scripting environments are supported. Data flows seamlessly between EMML and scripting environments.

Code sample where JavaScript snippet is used to extract authentication token that is required for subsequent calls "result" variable that gets propagated to JavaScript environment:

<script type="text/javascript">
 
<![CDATA[
            var r = new String(result)
 
            var ar = r.split("=");
 
            auth = ar[ar.length-1];
 
            auth = auth.slice(0, -1)
 
            ]]>
 </script>

See also

Further reading

References

  1. 1.0 1.1 1.2 "Enterprise mashup proponents start organizing". http://blogs.zdnet.com/service-oriented/?p=2972. 
  2. "OMA FAQs". http://www.openmashup.org/faq/#4. 
  3. "Creating a unified model for enterprise mashups". http://blogs.zdnet.com/Hinchcliffe/?p=872. 
  4. "OMA FAQs". http://www.openmashup.org/faq/#2. 
  5. "Where Is The Future of SOA Headed? Where The Web Goes". http://www.ebizq.net/blogs/enterprise/2009/09/where_is_soa_heading_where_the.php. 
  6. "Why Bank of America Joined the Open Mashup Alliance". http://adtmag.com/articles/2009/09/25/why-bank-of-america-joined-open-mashup-alliance.aspx. 
  7. "JackBe announces free enterprise mashup software". http://www.ebizq.net/news/10503.html. 
  8. "OMA FAQs". http://www.openmashup.org/faq/#3. 
  9. "Creative Commons Attribution No Derivatives License Overview". http://creativecommons.org/licenses/by-nd/3.0/. 
  10. 10.0 10.1 10.2 "OMA Download Agreement Page". http://www.openmashup.org/download/agreement.html. 
  11. "EMML Schema". http://www.openmashup.org/schemas/v1.0/EMMLSpec.xsd. 
  12. "EMML Technical Documentation". http://www.openmashup.org/omadocs/v1.0/index.html. 
  13. "EMML Technical Documentation". http://www.openmashup.org/omadocs/v1.0/index.html/. 
  14. "EMML Documentation Directinvoke chapter". http://www.openmashup.org/omadocs/v1.0/emml/directinvokeRefCmd.html. 
  15. "EMML Documentation Filter chapter". http://www.openmashup.org/omadocs/v1.0/emml/filterRefCmd.html. 
  16. "EMML Documentation Sort chapter". http://www.openmashup.org/omadocs/v1.0/emml/sortRefCmd.html. 
  17. "EMML Documentation Groupby chapter". http://www.openmashup.org/omadocs/v1.0/emml/groupRefCmd.html. 
  18. "EMML Documentation Merge chapter". http://www.openmashup.org/omadocs/v1.0/emml/mergeRefCmd.html. 
  19. "EMML Documentation Annotate chapter". http://www.openmashup.org/omadocs/v1.0/emml/annotateRefCmd.html. 
  20. "EMML Documentation Join chapter". http://www.openmashup.org/omadocs/v1.0/emml/joinRefCmd.html. 
  21. "EMML Documentation Scripting chapter". http://www.openmashup.org/omadocs/v1.0/emml/scriptRefCmd.html. 

External links

Personal tools

Served in 0.802 secs.