blob: d9d79916d4c75e653825e43bbf05f13709271e94 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="SMILA/Documentation/HowTo/Howto integrate a component in SMILA,SMILA/Development Guidelines/Declarative Services,SMILA/Development Guidelines/How to integrate the HelloWorld webservice as a Pipelet,SMILA/Development Guidelines/How to write a Pipelet,SMILA/Development Guidelines/How to write a Worker,SMILA/Documentation/Bundle org.eclipse.smila.processing.pipelets,SMILA/Documentation/Bundle org.eclipse.smila.processing.pipelets.xmlprocessing,SMILA/Documentation/HowTo/How to add a new Data Source to the importing framework,SMILA/Documentation/JobManager,SMILA/Documentation/Pipelets,SMILA/Documentation/WorkerManager" />
<link rel="shortcut icon" href="http://wiki.eclipse.org/SMILA/favicon.ico" />
<link rel="search" type="application/opensearchdescription+xml" href="http://wiki.eclipse.org/opensearch_desc.php" title="Eclipsepedia (English)" />
<link rel="alternate" type="application/rss+xml" title="Eclipsepedia RSS Feed" href="http://wiki.eclipse.org/index.php?title=Special:Recentchanges&amp;feed=rss" />
<link rel="alternate" type="application/atom+xml" title="Eclipsepedia Atom Feed" href="http://wiki.eclipse.org/index.php?title=Special:Recentchanges&amp;feed=atom" />
<title>SMILA/Documentation/HowTo/Howto integrate a component in SMILA - Eclipsepedia</title>
<style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "http://wiki.eclipse.org/skins/eclipsenova/novaWide.css?116"; /*]]>*/</style>
<link rel="stylesheet" type="text/css" media="print" href="http://wiki.eclipse.org/skins/eclipsenova/eclipsenovaPrint.css?116" />
<link rel="stylesheet" type="text/css" media="handheld" href="http://wiki.eclipse.org/skins/eclipsenova/handheld.css?116" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/header.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/tabs.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/visual.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/layout.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/footer.css" media="screen" />
<!--[if IE]><link rel="stylesheet" type="text/css" href="/skins/eclipsenova/IEpngfix.css" media="screen" /><![endif]-->
<!--[if lt IE 5.5000]><style type="text/css">@import "/skins/eclipsenova/IE50Fixes.css?116";</style> <![endif]-->
<!--[if IE 5.5000]><style type="text/css">@import "/skins/eclipsenova/IE55Fixes.css?116";</style><![endif]-->
<!--[if IE 6]><style type="text/css">@import "/skins/eclipsenova/IE60Fixes.css?116";</style><![endif]-->
<!--[if IE 7]><style type="text/css">@import "/skins/eclipsenova/IE70Fixes.css?116";</style><![endif]-->
<!--[if lt IE 7]><script type="text/javascript" src="/skins/common/IEFixes.js?116"></script>
<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
<script type= "text/javascript">/*<![CDATA[*/
var skin = "eclipsenova";
var stylepath = "/skins";
var wgArticlePath = "/$1";
var wgScriptPath = "";
var wgScript = "/index.php";
var wgServer = "http://wiki.eclipse.org";
var wgCanonicalNamespace = "";
var wgCanonicalSpecialPageName = false;
var wgNamespaceNumber = 0;
var wgPageName = "SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA";
var wgTitle = "SMILA/Documentation/HowTo/Howto integrate a component in SMILA";
var wgAction = "view";
var wgRestrictionEdit = [];
var wgRestrictionMove = [];
var wgArticleId = "15994";
var wgIsArticle = true;
var wgUserName = null;
var wgUserGroups = null;
var wgUserLanguage = "en";
var wgContentLanguage = "en";
var wgBreakFrames = false;
var wgCurRevisionId = "319756";
var wgVersion = "1.12.0";
var wgEnableAPI = true;
var wgEnableWriteAPI = false;
/*]]>*/</script>
<script type="text/javascript" src="http://wiki.eclipse.org/skins/common/wikibits.js?116"><!-- wikibits js --></script>
<!-- Performance mods similar to those for bug 166401 -->
<script type="text/javascript" src="http://wiki.eclipse.org/index.php?title=-&amp;action=raw&amp;gen=js&amp;useskin=eclipsenova"><!-- site js --></script>
<!-- Head Scripts -->
<script type="text/javascript" src="http://wiki.eclipse.org/skins/common/ajax.js?116"></script>
<link rel="stylesheet" type="text/css" href="Howto_integrate_a_component_in_SMILA.html" /> </head>
<body class="mediawiki ns-0 ltr page-SMILA_Documentation_HowTo_Howto_integrate_a_component_in_SMILA">
<div id="globalWrapper">
<div id="column-one">
<!-- Eclipse Additions for the Top Nav start here M. Ward-->
<div id="header">
<div id="header-graphic">
<img src="http://wiki.eclipse.org/skins/eclipsenova/eclipse.png" alt="Eclipse Wiki">
</div>
<!-- Pulled 101409 Mward -->
<div class="portlet" id="p-personal">
<div class="pBody">
<ul>
<li id="pt-login"><a href="http://wiki.eclipse.org/index.php?title=Special:Userlogin&amp;returnto=SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA">Log in</a></li>
</ul>
</div>
</div>
<div id="header-icons">
<div id="sites">
<ul id="sitesUL">
<li><a href="http://www.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/eclipseIcon.png" width="28" height="28" alt="Eclipse Foundation" title="Eclipse Foundation" /><div>Eclipse Foundation</div></a></li>
<li><a href="http://marketplace.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/marketplace.png" width="28" height="28" alt="Eclipse Marketplace" title="Eclipse Marketplace" /><div>Eclipse Marketplace</div></a></li>
<li><a href="https://bugs.eclipse.org/bugs"><img src="http://dev.eclipse.org/custom_icons/system-search-bw.png" width="28" height="28" alt="Bugzilla" title="Bugzilla" /><div>Bugzilla</div></a></li>
<li><a href="http://live.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/audio-input-microphone-bw.png" width="28" height="28" alt="Live" title="Live" /><div>Eclipse Live</div></a></li>
<li><a href="http://planeteclipse.org"><img src="http://dev.eclipse.org/large_icons/devices/audio-card.png" width="28" height="28" alt="PlanetEclipse" title="Planet" /><div>Planet Eclipse</div></a></li>
<li><a href="http://portal.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/preferences-system-network-proxy-bw.png" width="28" height="28" alt="Portal" title="Portal" /><div>My Foundation Portal</div></a></li>
</ul>
</div>
</div>
</div>
<!-- NEW HEADER STUFF HERE -->
<div id="header-menu">
<div id="header-nav">
<ul> <li><a class="first_one" href="http://wiki.eclipse.org/" target="_self">Home</a></li> <li><a href="http://www.eclipse.org/downloads/" target="_self">Downloads</a></li>
<li><a href="http://www.eclipse.org/users/" target="_self">Users</a></li>
<li><a href="http://www.eclipse.org/membership/" target="_self">Members</a></li>
<li><a href="http://wiki.eclipse.org/index.php/Development_Resources" target="_self">Committers</a></li>
<li><a href="http://www.eclipse.org/resources/" target="_self">Resources</a></li>
<li><a href="http://www.eclipse.org/projects/" target="_self">Projects</a></li>
<li><a href="http://www.eclipse.org/org/" target="_self">About Us</a></li>
</ul>
</div>
<div id="header-utils">
<!-- moved the search window here -->
<form action="http://wiki.eclipse.org/Special:Search" >
<input class="input" name="search" type="text" accesskey="f" value="" />
<input type='submit' onclick="this.submit();" name="go" id="searchGoButton" class="button" title="Go to a page with this exact name if one exists" value="Go" />&nbsp;
<input type='submit' onclick="this.submit();" name="fulltext" class="button" id="mw-searchButton" title="Search Eclipsepedia for this text" value="Search" />
</form>
</div>
</div>
<!-- Eclipse Additions for the Header stop here -->
<!-- Additions and mods for leftside nav Start here -->
<!--Started nav rip here-->
<!-- these are the nav controls main page, changes etc -->
<div id="novaContent" class="faux">
<div id="leftcol">
<ul id="leftnav">
<!-- these are the page controls, edit history etc -->
<li class="separator"><a class="separator">Navigation &#160;&#160;</li>
<li id="n-mainpage"><a href="http://wiki.eclipse.org/Main_Page">Main Page</a></li>
<li id="n-portal"><a href="http://wiki.eclipse.org/Eclipsepedia:Community_Portal">Community portal</a></li>
<li id="n-currentevents"><a href="http://wiki.eclipse.org/Eclipsepedia:Current_events">Current events</a></li>
<li id="n-recentchanges"><a href="http://wiki.eclipse.org/Special:Recentchanges">Recent changes</a></li>
<li id="n-randompage"><a href="http://wiki.eclipse.org/Special:Random">Random page</a></li>
<li id="n-help"><a href="http://wiki.eclipse.org/Help:Contents">Help</a></li>
<li class="separator"><a class="separator">Toolbox &#160;&#160;</a></li>
<li id="t-whatlinkshere"><a href="http://wiki.eclipse.org/Special:Whatlinkshere/SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA">What links here</a></li>
<li id="t-recentchangeslinked"><a href="http://wiki.eclipse.org/Special:Recentchangeslinked/SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA">Related changes</a></li>
<!-- This is the toolbox section -->
<li id="t-upload"><a href="http://wiki.eclipse.org/Special:Upload">Upload file</a></li>
<li id="t-specialpages"><a href="http://wiki.eclipse.org/Special:Specialpages">Special pages</a></li>
<li id="t-print"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA&amp;printable=yes">Printable version</a></li> <li id="t-permalink"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA&amp;oldid=319756">Permanent link</a></li> </ul>
</div>
<!-- Additions and mods for leftside nav End here -->
<div id="column-content">
<div id="content">
<a name="top" id="top"></a>
<div id="tabs">
<ul class="primary">
<li class="active"><a href="Documentation/HowTo/Howto_integrate_a_component_in_SMILA.html"><span class="tab">Page</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=Talk:SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA&amp;action=edit"><span class="tab">Discussion</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA&amp;action=edit"><span class="tab">View source</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA&amp;action=history"><span class="tab">History</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=Special:Userlogin&amp;returnto=SMILA/Documentation/HowTo/Howto&#32;integrate&#32;a&#32;component&#32;in&#32;SMILA"><span class="tab">Edit</span></a></li>
</ul>
</div>
<script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
<h1 class="firstHeading">SMILA/Documentation/HowTo/Howto integrate a component in SMILA</h1>
<div id="bodyContent">
<h3 id="siteSub">From Eclipsepedia</h3>
<div id="contentSub"><span class="subpages">&lt; <a href="../SMILA.html" title="SMILA">SMILA</a> | <a href="Documentation.1.html" title="SMILA/Documentation">Documentation</a> | <a href="Documentation/HowTo.html" title="SMILA/Documentation/HowTo">HowTo</a></span>(Redirected from <a href="http://wiki.eclipse.org/index.php?title=SMILA/Howto_integrate_a_component_in_SMILA&amp;redirect=no" title="SMILA/Howto integrate a component in SMILA">SMILA/Howto integrate a component in SMILA</a>)</div>
<div id="jump-to-nav">Jump to: <a href="Howto_integrate_a_component_in_SMILA.html#column-one">navigation</a>, <a href="Howto_integrate_a_component_in_SMILA.html#searchInput">search</a></div> <!-- start content -->
<p>This page summarizes the different types and complexity levels for the integration of components in SMILA.
</p>
<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1"><a href="Howto_integrate_a_component_in_SMILA.html#Introduction"><span class="tocnumber">1</span> <span class="toctext">Introduction</span></a></li>
<li class="toclevel-1"><a href="Howto_integrate_a_component_in_SMILA.html#Conventions"><span class="tocnumber">2</span> <span class="toctext">Conventions</span></a>
<ul>
<li class="toclevel-2"><a href="Howto_integrate_a_component_in_SMILA.html#Handling_of_Character_Encoding"><span class="tocnumber">2.1</span> <span class="toctext">Handling of Character Encoding</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="Howto_integrate_a_component_in_SMILA.html#Integrating_a_SMILA_pipelet"><span class="tocnumber">3</span> <span class="toctext">Integrating a SMILA pipelet</span></a>
<ul>
<li class="toclevel-2"><a href="Howto_integrate_a_component_in_SMILA.html#Examples"><span class="tocnumber">3.1</span> <span class="toctext">Examples</span></a></li>
<li class="toclevel-2"><a href="Howto_integrate_a_component_in_SMILA.html#Further_reading"><span class="tocnumber">3.2</span> <span class="toctext">Further reading</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="Howto_integrate_a_component_in_SMILA.html#Integrating_own_workers"><span class="tocnumber">4</span> <span class="toctext">Integrating own workers</span></a>
<ul>
<li class="toclevel-2"><a href="Howto_integrate_a_component_in_SMILA.html#Description"><span class="tocnumber">4.1</span> <span class="toctext">Description</span></a></li>
<li class="toclevel-2"><a href="Howto_integrate_a_component_in_SMILA.html#Further_reading_2"><span class="tocnumber">4.2</span> <span class="toctext">Further reading</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="Howto_integrate_a_component_in_SMILA.html#Integrating_data_sources"><span class="tocnumber">5</span> <span class="toctext">Integrating data sources</span></a>
<ul>
<li class="toclevel-2"><a href="Howto_integrate_a_component_in_SMILA.html#Further_reading_3"><span class="tocnumber">5.1</span> <span class="toctext">Further reading</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="Howto_integrate_a_component_in_SMILA.html#Integrating_alternative_implementations_of_SMILA_core_components"><span class="tocnumber">6</span> <span class="toctext">Integrating alternative implementations of SMILA core components</span></a>
<ul>
<li class="toclevel-2"><a href="Howto_integrate_a_component_in_SMILA.html#Examples_2"><span class="tocnumber">6.1</span> <span class="toctext">Examples</span></a></li>
<li class="toclevel-2"><a href="Howto_integrate_a_component_in_SMILA.html#Further_reading_4"><span class="tocnumber">6.2</span> <span class="toctext">Further reading</span></a></li>
</ul>
</li>
</ul>
</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
<a name="Introduction"></a><h2> <span class="mw-headline"> Introduction </span></h2>
<p>Due to its architecture SMILA allows for the easy integration of third-party components into its framework. Actually there are four different possible integration scenarios available that are depicted in the following table.
</p>
<table class="wikitable" border="1" cellpadding="5">
<tr>
<td> <a href="Howto_integrate_a_component_in_SMILA.html#Integrating_a_SMILA_pipelet" title="">Integrating a SMILA pipelet</a>
</td></tr>
<tr valign="top">
<td> This is probably the most frequently used integration scenario. It allows for the integration or exchange of functionality (services, 3rd party software, etc.) used to process records in the workflow engine.
</td></tr>
<tr valign="top">
<td> <a href="http://wiki.eclipse.org/Image:Integrate-Service_1.1.0.png" class="image" title="Integrate-Service 1.1.0.png"><img alt="" src="http://wiki.eclipse.org/images/thumb/2/25/Integrate-Service_1.1.0.png/900px-Integrate-Service_1.1.0.png" width="900" height="716" border="0" /></a>
</td></tr>
<tr valign="top">
<td> The figure demonstrates how you can integrate the functionality of your service or your piece of software to SMILA by adding it to the workflow engine.
</td></tr></table>
<p><br />
</p>
<table class="wikitable" border="1" cellpadding="5">
<tr>
<td> <a href="Howto_integrate_a_component_in_SMILA.html#Integrating_workers" title="">Integrating workers</a>
</td></tr>
<tr valign="top">
<td> Integrating your own <a href="Glossary.html#W" title="SMILA/Glossary">worker</a> implementation is another common scenario for adding functionality or adapting workflows to SMILA.
</td></tr>
<tr valign="top">
<td> <a href="http://wiki.eclipse.org/Image:Integrate-Worker_1.1.0.png" class="image" title="Integrate-Worker 1.1.0.png"><img alt="" src="http://wiki.eclipse.org/images/thumb/b/bd/Integrate-Worker_1.1.0.png/900px-Integrate-Worker_1.1.0.png" width="900" height="706" border="0" /></a>
</td></tr>
<tr valign="top">
<td> The figure above exemplary shows how you can add your own worker implementation to SMILA. Please note that you also have to add the worker to the job manager configuration files (workers.json, workflows.json) and add your worker as an OSGi service to activate it.
</td></tr></table>
<p><br />
</p>
<table class="wikitable" border="1" cellpadding="5">
<tr>
<td> <a href="Howto_integrate_a_component_in_SMILA.html#Integrating_data_sources" title="">Integrating data sources</a>
</td></tr>
<tr valign="top">
<td> Integrating a data source by implementing your own crawler is another scenario for adding functionality to SMILA. By doing so, further data sources can be unlocked to provide additional input to SMILA.
</td></tr>
<tr valign="top">
<td> <a href="http://wiki.eclipse.org/Image:Integrate-DataSources_1.1.0.png" class="image" title="Integrate-DataSources 1.1.0.png"><img alt="" src="http://wiki.eclipse.org/images/thumb/a/aa/Integrate-DataSources_1.1.0.png/900px-Integrate-DataSources_1.1.0.png" width="900" height="716" border="0" /></a>
</td></tr>
<tr valign="top">
<td> The figure above exemplary shows how you can add your own crawler implementation to SMILA. Please note that eventually you have to add a new Fetcher or extractors or further workers as well and you also have to add a new workflow definition, which is not shown in the figure. This was chosen due to simplicity.
</td></tr></table>
<p><br />
</p>
<table class="wikitable" border="1" cellpadding="5">
<tr>
<td> <a href="Howto_integrate_a_component_in_SMILA.html#Integrating_alternative_implementations_of_SMILA_core_components" title="">Integrating alternative implementations of SMILA core components</a>
</td></tr>
<tr valign="top">
<td> This scenario is particularly intended for the experienced (SMILA) developer and comprises the possibility to exchange existing implementations of the SMILA core components by your own implementations.
</td></tr>
<tr valign="top">
<td> <a href="http://wiki.eclipse.org/Image:Provide-Alternative-To-Core-Component_1.1.0.png" class="image" title="Provide-Alternative-To-Core-Component 1.1.0.png"><img alt="" src="http://wiki.eclipse.org/images/thumb/9/93/Provide-Alternative-To-Core-Component_1.1.0.png/900px-Provide-Alternative-To-Core-Component_1.1.0.png" width="900" height="651" border="0" /></a>
</td></tr>
<tr valign="top">
<td> The figure above demonstrates one of the SMILA core components -- <i>data store</i> -- may be exchanged by your own implementation. This serves as examples only, that is, you may also exchange other core components such as the <a href="Glossary.html#B" title="SMILA/Glossary">blackboard service</a>.
</td></tr></table>
<div class="messagebox" style="background-color: #def3fe; border: 1px solid #c5d7e0; color: black; padding: 5px; margin: 1ex 0; min-height: 35px; padding-left: 45px;">
<div style="float: left; margin-left: -40px;"><a href="http://wiki.eclipse.org/Image:Note.png" class="image" title="Note.png"><img alt="" src="http://wiki.eclipse.org/images/c/cc/Note.png" width="35" height="35" border="0" /></a></div>
<div><b>The above figures exemplary demonstrate at which levels in the <a href="http://www.eclipse.org/smila" class="external text" title="http://www.eclipse.org/smila" rel="nofollow">SMILA architecture</a> an integration of new components is applicable. However, for simplicity reason, we restricted the above figures to the index processing chain while completely ignoring the search processing chain that offers the same integration options (except for the integration of agents and crawlers), but is currently not in the focus of this page.</b>
<b><br /></div></b>
</div>
<p><br />
</p>
<a name="Conventions"></a><h2> <span class="mw-headline"> Conventions </span></h2>
<a name="Handling_of_Character_Encoding"></a><h3> <span class="mw-headline"> Handling of Character Encoding </span></h3>
<p>To make processing of data in SMILA easier: If external data must be converted to a string (e.g. an attribute value), the crawler/fetcher or any other component accessing an external data source should try everything that is possible to ensure that the conversion is done using the correct encoding. For example, HTTP clients should use the encoding reported by the HTTP server. If the data source does not provide information about the character encoding, you can use the class <tt>org.eclipse.smila.utils.file.EncodingHelper</tt> that tries to convert a byte[] to a string by trying to detect the correct encoding from a <tt>byte[]</tt> by checking BOMs or checking XML and HTML content for instructions and finally by using UTF-8 or, if this fails, the default platform encoding. You may find this helpful.
</p><p>On the other hand, if valid string data must be converted to a byte[] (e.g. if it is stored as a attachment after pipelet processing), the conversion must always use UTF-8 encoding.
</p>
<a name="Integrating_a_SMILA_pipelet"></a><h2> <span class="mw-headline"> Integrating a SMILA pipelet </span></h2>
<p>As already shown in the overview above, SMILA offers the possibility to integrate your own service or piece of software into SMILA <a href="Glossary.html#BPEL" title="SMILA/Glossary">BPEL</a> workflows.
In SMILA we simply call these workflows <a href="Glossary.html#P" title="SMILA/Glossary">pipelines</a>. A pipeline is the definition of a BPEL process (or workflow) that orchestrates <a href="Glossary.html#P" title="SMILA/Glossary">pipelets</a> and other BPEL services (e.g. web services).
</p><p>The default and thus recommended technique to integrate simple and small functionality or software in SMILA is to provide a <a href="Glossary.html#P" title="SMILA/Glossary">pipelet</a>. Pipelets are easy to implement as they require only standard Java knowledge. They are not shared between multiple pipelines, even multiple invocations of a Pipelet in the same Pipeline do not share the same instance. The lifecycle and configuration of pipelets is managed by the workflow engine, not by OSGi runtime. Pipelets have full access to SMILA <a href="Glossary.html#R" title="SMILA/Glossary">records</a> by using the <a href="Glossary.html#B" title="SMILA/Glossary">blackboard service</a>, which makes it easy to read, modify, and store <a href="Glossary.html#R" title="SMILA/Glossary">records</a>. For further information on pipelets refer to the <a href="Documentation/Pipelets.html" title="SMILA/Documentation/Pipelets">Pipelets documentation</a>.
</p><p>In general pipelets follow the same (sometimes optional) logical steps (of course this depends highly on the business logic to be executed). These steps are:
</p>
<ul><li> Read the configuration (optional)
</li><li> Read input data from blackboard (optional)
</li><li> Execute the business logic
</li><li> Write result data to blackboard (optional)
</li></ul>
<p>In terms of the pipelet that implements the business logic you are totally free to use any desired technology. Some of the posibilities include:
</p>
<ul><li> Using POJOs (For examples refer to the <a href="Documentation/Bundle_org.eclipse.smila.processing.pipelets.xmlprocessing.html" title="SMILA/Documentation/Bundle org.eclipse.smila.processing.pipelets.xmlprocessing">XML processing pipelets</a>)
</li><li> Using any local available OSGi service (For an example refer to the <a href="Documentation/Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.MimeTypeIdentifyPipelet" title="SMILA/Documentation/Bundle org.eclipse.smila.processing.pipelets">MimeTypeIdentifyPipelet</a> which uses a MimeTypeIdentifier service)
</li><li> Using other technologies such as JNI, RMI, or CORBA to integrate remote or non Java components.
</li></ul>
<a name="Examples"></a><h5> <span class="mw-headline"> Examples </span></h5>
<ul><li> Typical examples for pipelets are the <a href="Documentation/Bundle_org.eclipse.smila.processing.pipelets.xmlprocessing.html" title="SMILA/Documentation/Bundle org.eclipse.smila.processing.pipelets.xmlprocessing">XML processing pipelets</a>. These lightweight pipelets are used for XML processing (e.g. XSL transformation). Each pipeline uses its own <a href="Glossary.html#P" title="SMILA/Glossary">pipelet</a> instance.
</li></ul>
<a name="Further_reading"></a><h5> <span class="mw-headline"> Further reading </span></h5>
<p>Please consult the following how-to tutorials for a more detailed technical description:
</p>
<ul><li> <a href="Development_Guidelines/How_to_write_a_Pipelet.html" class="mw-redirect" title="SMILA/Development Guidelines/How to write a Pipelet">How to write a pipelet</a>
</li><li> <a href="Development_Guidelines/How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html" class="mw-redirect" title="SMILA/Development Guidelines/How to integrate the HelloWorld webservice as a Pipelet">How to integrate the HelloWorld <b>web service</b> as a pipelet</a>
</li></ul>
<a name="Integrating_own_workers"></a><h2> <span class="mw-headline"> Integrating own workers </span></h2>
<p>When the desired changes to the functionality are not simple and small or the desired functionality requires more than just accessing the records, it is recommended to integrate your functionality as new <a href="Glossary.html#W" title="SMILA/Glossary">workers</a>.
These workers have to be defined in the asynchronous job processing configuration and can then be integrated in workflows.
</p>
<a name="Description"></a><h3> <span class="mw-headline"> Description </span></h3>
<p>A worker is an OSGi service, that implements the Worker interface, i.e. provides a name (to collect tasks and to be identified in workflows) and offers a threadsafe <tt>perform</tt> method, which takes a <tt>TaskContext</tt> object (generated by the WorkerManager) as an argument.
</p><p>Normally the worker will handle a bulk of records in the perform method, manipulate the contained records, may access external services or stores and create new bulks of records.
</p><p>The worker does not have to handle tasks or check if tasks are available. These menial tasks are done by the WorkerManager that cares for all registered workers, handles the invocations of their perform methods and copes with input and output bulks, up-scaling or exception handling. The worker just has to provide the perfom method to deal with the records.
</p><p>If the worker requires direct access to the JobManager/TaskManager, e.g. because it is an initial worker and has to get initial tasks to start workflow runs without being triggered by previous workers, it must not register itself as a Worker service but has to tackle TaskManager and JobManager itself. Be careful, this is tedious work! So if possible stick to the Worker interface and let everything else be handled by the WorkerManager.
</p>
<a name="Further_reading_2"></a><h3> <span class="mw-headline"> Further reading </span></h3>
<p>Please consult at least the following pages about asynchronous job processing:
</p>
<ul><li> <a href="Documentation/JobManager.html" title="SMILA/Documentation/JobManager">JobManager</a>
</li><li> <a href="Documentation/WorkerManager.html" title="SMILA/Documentation/WorkerManager">WorkerManager</a>
</li><li> [<a href="http://build.eclipse.org/rt/smila/javadoc/current/index.html?org/eclipse/smila/taskworker/package-summary.html|TaskWorker" class="external text" title="http://build.eclipse.org/rt/smila/javadoc/current/index.html?org/eclipse/smila/taskworker/package-summary.html|TaskWorker" rel="nofollow">JavaDoc</a>]
</li><li> <a href="Development_Guidelines/How_to_write_a_Worker.html" class="mw-redirect" title="SMILA/Development Guidelines/How to write a Worker">How to write a <b>worker</b></a>
</li></ul>
<a name="Integrating_data_sources"></a><h2> <span class="mw-headline"> Integrating data sources </span></h2>
<p>If you like to integrate data sources, you should do so by writing a new Importing-Wokrflow along with apropriate crawler/fetcher workers (and eventually an extractor worker) as is described in <a href="Documentation/HowTo/How_to_add_a_new_Data_Source_to_the_importing_framework.html" title="SMILA/Documentation/HowTo/How to add a new Data Source to the importing framework">HowTo add a new Data Source to the Importing Framework</a>.
</p><p>This also involves integration of own workers (see <a href="Howto_integrate_a_component_in_SMILA.html#Integrating_own_workers" title="">Integrating own workers</a> above).
</p>
<a name="Further_reading_3"></a><h3> <span class="mw-headline"> Further reading </span></h3>
<p>Please consult the following how-to tutorials for a more detailed technical description:
</p>
<ul><li> <a href="Documentation/HowTo/How_to_add_a_new_Data_Source_to_the_importing_framework.html" title="SMILA/Documentation/HowTo/How to add a new Data Source to the importing framework">HowTo add a new Data Source to the Importing Framework</a>
</li><li> <a href="Howto_integrate_a_component_in_SMILA.html#Integrating_own_workers" title="">Integrating own workers</a>
</li></ul>
<a name="Integrating_alternative_implementations_of_SMILA_core_components"></a><h2> <span class="mw-headline"> Integrating alternative implementations of SMILA core components </span></h2>
<p>The component-based architecture of SMILA even allows you to provide your own implementations of SMILA core components, since these are implemented as OSGi service components (see <a href="Development_Guidelines/Declarative_Services.html" class="mw-redirect" title="SMILA/Development Guidelines/Declarative Services">Declarativ Services</a>) and can thus be exchanged in a standard way.
</p>
<ul><li> Include a new plug-in that exposes a service implementing the interface of the core component (e.g. <tt>ObjectStoreService</tt>)
</li><li> modify the config.ini configuration file in SMILA.application to include and start the new plug-in instead of the plug-in provided by SMILA core.
</li><li> build your application and run it.
</li></ul>
<a name="Examples_2"></a><h3> <span class="mw-headline"> Examples </span></h3>
<p>A typical example could be an alternative implementation of the <tt>ObjectStoreService</tt> that does not store the objects in the file system but in memory or in a database.
</p>
<a name="Further_reading_4"></a><h3> <span class="mw-headline"> Further reading </span></h3>
<ul><li> <a href="Development_Guidelines/Declarative_Services.html" class="mw-redirect" title="SMILA/Development Guidelines/Declarative Services">SMILA/Development_Guidelines/Declarative_Services</a>
</li><li> <a href="http://eclipse.org/equinox" class="external text" title="http://eclipse.org/equinox" rel="nofollow">Eclipse Equinox</a>
</li><li> <a href="http://live.eclipse.org/node/407" class="external text" title="http://live.eclipse.org/node/407" rel="nofollow">Webinar: Getting started with OSGi</a>
</li></ul>
<!--
NewPP limit report
Preprocessor node count: 57/1000000
Post-expand include size: 1917/2097152 bytes
Template argument size: 1385/2097152 bytes
#ifexist count: 0/100
-->
<!-- Saved in parser cache with key wikidb:pcache:idhash:15994-0!1!0!!en!2!edit=0 and timestamp 20130416060940 -->
<div class="printfooter">
Retrieved from "<a href="Documentation/HowTo/Howto_integrate_a_component_in_SMILA.html">http://wiki.eclipse.org/SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA</a>"</div>
<div id="catlinks"><p class='catlinks'><a href="http://wiki.eclipse.org/Special:Categories" title="Special:Categories">Category</a>: <span dir='ltr'><a href="http://wiki.eclipse.org/Category:SMILA" title="Category:SMILA">SMILA</a></span></p></div> <!-- end content -->
<div class="visualClear"></div>
</div>
</div>
</div>
<!-- Yoink of toolbox for phoenix moved up -->
</div>
</div>
<div id="clearFooter"/>
<div id="footer" >
<ul id="footernav">
<li class="first"><a href="http://www.eclipse.org/">Home</a></li>
<li><a href="http://www.eclipse.org/legal/privacy.php">Privacy Policy</a></li>
<li><a href="http://www.eclipse.org/legal/termsofuse.php">Terms of Use</a></li>
<li><a href="http://www.eclipse.org/legal/copyright.php">Copyright Agent</a></li>
<li><a href="http://www.eclipse.org/org/foundation/contact.php">Contact</a></li>
<li><a href="http://wiki.eclipse.org/Eclipsepedia:About" title="Eclipsepedia:About">About Eclipsepedia</a></li>
</ul>
<span id="copyright">Copyright &copy; 2013 The Eclipse Foundation. All Rights Reserved</span>
<p id="footercredit">This page was last modified 17:58, 23 October 2012 by <a href="http://wiki.eclipse.org/User:Andreas.weber.empolis.com" title="User:Andreas.weber.empolis.com">Andreas Weber</a>. Based on work by <a href="http://wiki.eclipse.org/index.php?title=User:Andreas.schank.empolis.com&amp;action=edit" class="new" title="User:Andreas.schank.empolis.com">Andreas Schank</a>, <a href="http://wiki.eclipse.org/index.php?title=User:Juergen.schumacher.attensity.com&amp;action=edit" class="new" title="User:Juergen.schumacher.attensity.com">Juergen Schumacher</a> and <a href="http://wiki.eclipse.org/User:Andreas.schank.attensity.com" title="User:Andreas.schank.attensity.com">A. Schank</a> and <a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA&amp;action=credits" title="SMILA/Documentation/HowTo/Howto integrate a component in SMILA">others</a>.</p>
<p id="footerviews">This page has been accessed 6,511 times.</p>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-910670-4");
pageTracker._trackPageview();
</script>
<!-- <div class="visualClear"></div> -->
<script type="text/javascript">if (window.runOnloadHook) runOnloadHook();</script>
</div>
<!-- Served in 0.093 secs. --></body></html>