blob: f441522a4d2e98a3a60af1a3c60294045140c4b3 [file] [log] [blame]
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="lang:clipboard.copy" content="Copy to clipboard">
<meta name="lang:clipboard.copied" content="Copied to clipboard">
<meta name="lang:search.language" content="en">
<meta name="lang:search.pipeline.stopwords" content="True">
<meta name="lang:search.pipeline.trimmer" content="True">
<meta name="lang:search.result.none" content="No matching documents">
<meta name="lang:search.result.one" content="1 matching document">
<meta name="lang:search.result.other" content="# matching documents">
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="../../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.2">
<title>Architecture - Eclipse Hawk</title>
<link rel="stylesheet" href="../../assets/stylesheets/application.30686662.css">
<link rel="stylesheet" href="../../assets/stylesheets/application-palette.a8b3c06d.css">
<meta name="theme-color" content="#7e57c2">
<script src="../../assets/javascripts/modernizr.74668098.js"></script>
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700|Roboto+Mono&display=fallback">
<style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
<link rel="stylesheet" href="../../assets/fonts/material-icons.css">
<link rel="stylesheet" href="../../stylesheets/extra.css">
<!-- FAVICON -->
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png">
<link rel="manifest" href="/img/site.webmanifest">
<link rel="mask-icon" href="/img/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="/img/favicon.ico">
<meta name="msapplication-TileColor" content="#b91d47">
<meta name="msapplication-config" content="/img/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
</head>
<body dir="ltr" data-md-color-primary="deep-purple" data-md-color-accent="deep-purple">
<svg class="md-svg">
<defs>
</defs>
</svg>
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
<header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid">
<div class="md-flex">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="../.." title="Eclipse Hawk" class="md-header-nav__button md-logo">
<img src="../../assets/images/hawk-logo-white.svg" width="24" height="24">
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
<span class="md-header-nav__topic">
Eclipse Hawk
</span>
<span class="md-header-nav__topic">
Architecture
</span>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
&#xE5CD;
</button>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result">
<div class="md-search-result__meta">
Type to start searching
</div>
<ol class="md-search-result__list"></ol>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<div class="md-header-nav__source">
<a href="https://git.eclipse.org/c/hawk/hawk.git/" title="Go to repository" class="md-source" data-md-source="">
<div class="md-source__repository">
Git repository @ Eclipse
</div>
</a>
</div>
</div>
</div>
</nav>
</header>
<div class="md-container">
<main class="md-main" role="main">
<div class="md-main__inner md-grid" data-md-component="container">
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title md-nav__title--site" for="__drawer">
<a href="../.." title="Eclipse Hawk" class="md-nav__button md-logo">
<img src="../../assets/images/hawk-logo-white.svg" width="48" height="48">
</a>
Eclipse Hawk
</label>
<div class="md-nav__source">
<a href="https://git.eclipse.org/c/hawk/hawk.git/" title="Go to repository" class="md-source" data-md-source="">
<div class="md-source__repository">
Git repository @ Eclipse
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../.." title="Home" class="md-nav__link">
Home
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-2" type="checkbox" id="nav-2">
<label class="md-nav__link" for="nav-2">
Basic use
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-2">
Basic use
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../basic-use/installation/" title="Installation" class="md-nav__link">
Installation
</a>
</li>
<li class="md-nav__item">
<a href="../../basic-use/core-concepts/" title="Core concepts" class="md-nav__link">
Core concepts
</a>
</li>
<li class="md-nav__item">
<a href="../../basic-use/examples-xmi/" title="Examples (XMI)" class="md-nav__link">
Examples (XMI)
</a>
</li>
<li class="md-nav__item">
<a href="../../basic-use/examples-modelio/" title="Examples (Modelio)" class="md-nav__link">
Examples (Modelio)
</a>
</li>
<li class="md-nav__item">
<a href="../../basic-use/papyrus/" title="Papyrus UML support" class="md-nav__link">
Papyrus UML support
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3">
<label class="md-nav__link" for="nav-3">
Advanced use
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-3">
Advanced use
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../advanced-use/graph-as-emf/" title="Graph as EMF model" class="md-nav__link">
Graph as EMF model
</a>
</li>
<li class="md-nav__item">
<a href="../../advanced-use/advanced-props/" title="Advanced properties" class="md-nav__link">
Advanced properties
</a>
</li>
<li class="md-nav__item">
<a href="../../advanced-use/meta-queries/" title="Meta-level queries" class="md-nav__link">
Meta-level queries
</a>
</li>
<li class="md-nav__item">
<a href="../../advanced-use/temporal-queries/" title="Temporal queries" class="md-nav__link">
Temporal queries
</a>
</li>
<li class="md-nav__item">
<a href="../../advanced-use/oomph/" title="Oomph and Hawk" class="md-nav__link">
Oomph and Hawk
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4" checked>
<label class="md-nav__link" for="nav-4">
Server
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-4">
Server
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--active">
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">
<a href="./" title="Architecture" class="md-nav__link md-nav__link--active">
Architecture
</a>
</li>
<li class="md-nav__item">
<a href="../api/" title="Thrift API" class="md-nav__link">
Thrift API
</a>
</li>
<li class="md-nav__item">
<a href="../api-security/" title="Thrift API security" class="md-nav__link">
Thrift API security
</a>
</li>
<li class="md-nav__item">
<a href="../deployment/" title="Deployment" class="md-nav__link">
Deployment
</a>
</li>
<li class="md-nav__item">
<a href="../cli/" title="Console client" class="md-nav__link">
Console client
</a>
</li>
<li class="md-nav__item">
<a href="../eclipse/" title="Eclipse client" class="md-nav__link">
Eclipse client
</a>
</li>
<li class="md-nav__item">
<a href="../file-config/" title="File-based configuration" class="md-nav__link">
File-based configuration
</a>
</li>
<li class="md-nav__item">
<a href="../logging/" title="Logging" class="md-nav__link">
Logging
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-5" type="checkbox" id="nav-5">
<label class="md-nav__link" for="nav-5">
Developers
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-5">
Developers
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../developers/run-from-source/" title="Run GUI from source" class="md-nav__link">
Run GUI from source
</a>
</li>
<li class="md-nav__item">
<a href="../../developers/server-from-source/" title="Run Server from source" class="md-nav__link">
Run Server from source
</a>
</li>
<li class="md-nav__item">
<a href="../../developers/plain-maven/" title="Build with plain Maven" class="md-nav__link">
Build with plain Maven
</a>
</li>
<li class="md-nav__item">
<a href="../../developers/website/" title="Work on the website" class="md-nav__link">
Work on the website
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-6" type="checkbox" id="nav-6">
<label class="md-nav__link" for="nav-6">
Community
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-6">
Community
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="https://www.eclipse.org/forums/index.php/f/442/" title="Forum" class="md-nav__link">
Forum
</a>
</li>
<li class="md-nav__item">
<a href="https://gitlab.eclipse.org/eclipse/hawk/hawk/-/issues/new" title="File a bug" class="md-nav__link">
File a bug
</a>
</li>
<li class="md-nav__item">
<a href="https://gitlab.eclipse.org/eclipse/hawk/hawk/-/issues" title="Open bugs" class="md-nav__link">
Open bugs
</a>
</li>
<li class="md-nav__item">
<a href="https://ci.eclipse.org/hawk/" title="Builds" class="md-nav__link">
Builds
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../additional-resources/" title="Additional resources" class="md-nav__link">
Additional resources
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content">
<article class="md-content__inner md-typeset">
<h1>Architecture</h1>
<p>If an entire team is querying the same set of models, indexing them from a central location is more efficient than maintaining multiple indexes. In other cases, we may want to query models from outside Eclipse and even from applications written in other languages (e.g. C++ or Python).</p>
<p>To support these use cases, Hawk includes a server that exposes its functionality through a set of Thrift APIs. This server product is a headless Eclipse application that can be run from the command line. The general structure is as shown here:</p>
<p><img alt="Hawk server deployment" src="../img/platform_deployment.png" /></p>
<p>The server component is implemented as an Eclipse application, based on the Eclipse Equinox OSGi runtime. Using Eclipse Equinox for the server allows for integrating the Eclipse-based tools with very few changes in their code, while reducing the chances of mutual interference. The OSGi class loading mechanisms ensure that each plugin only "sees" the classes that it declares as dependencies, avoiding common clashes such as requiring different versions of the same Java library or overriding a configuration file with an unexpected copy from another library.</p>
<p>To mitigate the risk of connectivity problems due to enterprise firewalls, the server uses for most of the API the standard HTTP and HTTPS protocols (by default, on the unprivileged ports 8080 and 8443) and <a href="../api-security/">secures</a> them through <a href="https://shiro.apache.org/">Apache Shiro</a>. Optionally, the Hawk API can be exposed through raw TCP on port 2080, for increased performance: however, security-conscious environments should leave it disabled as it does not support authentication. The embedded <a href="https://activemq.apache.org/artemis/">Apache Artemis</a> messaging queue required for remote change notifications in Hawk requires its own port, as it manages its own network connections. By default, this is port 61616.
These notifications are made available through two protocols: Artemis Core (a lightweight replacement for the Java Message Service, for Java clients) and STOMP over WebSockets (a cross-language messaging protocol, for web-based clients).</p>
<p>The server includes plugins that use the standard OSGi HttpService facilities to register servlets and filters. Each service is implemented as one or more of these servlets. The currently implemented endpoints are these:</p>
<table>
<thead>
<tr>
<th>Path within server</th>
<th>Service</th>
<th>Thrift protocol</th>
</tr>
</thead>
<tbody>
<tr>
<td>/thrift/hawk/binary</td>
<td>Hawk</td>
<td>Binary</td>
</tr>
<tr>
<td>/thrift/hawk/compact</td>
<td>Hawk</td>
<td>Compact</td>
</tr>
<tr>
<td>/thrift/hawk/json</td>
<td>Hawk</td>
<td>JSON</td>
</tr>
<tr>
<td>/thrift/hawk/tuple</td>
<td>Hawk</td>
<td>Tuple</td>
</tr>
<tr>
<td>/thrift/users</td>
<td>Users</td>
<td>JSON</td>
</tr>
</tbody>
</table>
<p>All services provide a JSON endpoint, since it is compatible across all languages supported by Thrift and works well with web-based clients. However, since Hawk is performance sensitive (as we might need to encode a large number of model elements in the results of a query), it also provides endpoints with the other Thrift protocols. Binary is the most portable after JSON, and Tuple is the most efficient but is only usable from Java clients. Having all four protocols allows Hawk clients to pick the most efficient protocol that is available for their language.</p>
<p>The available operations for the Users and Hawk APIs are listed in <a href="../api/">Thrift API</a>. For details about the optional access control to these APIs, check <a href="../api-security/">Thrift API security</a>.</p>
</article>
</div>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid">
<a href="../../advanced-use/oomph/" title="Oomph and Hawk" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
</div>
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Previous
</span>
Oomph and Hawk
</span>
</div>
</a>
<a href="../api/" title="Thrift API" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Next
</span>
Thrift API
</span>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
</div>
</a>
</nav>
</div>
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
<div class="md-footer-copyright__highlight">
Copyright © Eclipse Foundation, Inc. All Rights Reserved.
</div>
powered by
<a href="https://www.mkdocs.org">MkDocs</a>
and
<a href="https://squidfunk.github.io/mkdocs-material/">Material for MkDocs</a>
</div>
<div class="md-footer-copyright hawk-eclipse-links">
<ul>
<li><a href="https://www.eclipse.org/legal/privacy.php">Privacy Policy</a></li>
<li><a href="https://www.eclipse.org/legal/termsofuse.php">Terms of Use</a></li>
<li><a href="https://www.eclipse.org/legal/copyright.php">Copyright Agent</a></li>
</ul>
</div>
</div>
</div>
</footer>
</div>
<script src="../../assets/javascripts/application.c648116f.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"../.."}})</script>
</body>
</html>