<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Phaedra 2 – Technical Documentation</title>
    <link>/2.12.0/documentation/technical_docs/</link>
    <description>Recent content in Technical Documentation on Phaedra 2</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    
	  <atom:link href="/2.12.0/documentation/technical_docs/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Documentation: Architecture</title>
      <link>/2.12.0/documentation/technical_docs/architecture/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/2.12.0/documentation/technical_docs/architecture/</guid>
      <description>
        
        
        &lt;h3 id=&#34;overview&#34;&gt;Overview&lt;/h3&gt;
&lt;p&gt;The Phaedra II platform is based on a microservices architecture pattern.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;./img/architecture.png&#34;&gt;&lt;img src=&#34;./img/architecture.png&#34; alt=&#34;Architecture&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The following list of services are currently implemented in Phaedra II:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#plate-service&#34;&gt;Plate Service&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#protocol-service&#34;&gt;Protocol Service&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#datacapture-serice&#34;&gt;Data Capture Service&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#measurement-service&#34;&gt;Measurement Service&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#calculation-service&#34;&gt;Calculation Service&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#resultdata-service&#34;&gt;Resultdata Service&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#metadata-service&#34;&gt;Metadata Service&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#charting-service&#34;&gt;Charting Service&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#pipeline-service&#34;&gt;Pipeline Service&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#phaedra-ui&#34;&gt;Phaedra UI&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These services communicate with each other using an event-based mechanism, Apache Kafka, to perform various tasks:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;./img/architecture_flow.png&#34;&gt;&lt;img src=&#34;./img/architecture_flow.png&#34; alt=&#34;Architecture Flow&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In addition, each service exposes a public API that is accessible by way of an API Gateway.&lt;/p&gt;
&lt;h3 id=&#34;plate-service&#34;&gt;Plate Service&lt;/h3&gt;
&lt;p&gt;Plate service is responsible for managing projects, experiments and plates created in Phaedra II.
It is implemented with Spring Boot framework.&lt;/p&gt;
&lt;h3 id=&#34;protocol-service&#34;&gt;Protocol Service&lt;/h3&gt;
&lt;p&gt;Protocol service is responsible for managing protocols, features and calculations formulas.
It is implemented with Spring Boot framework.&lt;/p&gt;
&lt;h3 id=&#34;data-capture-service&#34;&gt;Data Capture Service&lt;/h3&gt;
&lt;p&gt;Data capture service is responsible for importing data measurements and managing/executing capture jobs.
It it implemented with JavaScript that runs on a Node.js runtime environment.&lt;/p&gt;
&lt;h3 id=&#34;measurement-service&#34;&gt;Measurement Service&lt;/h3&gt;
&lt;p&gt;Measurement service is responsible for managing the imported data measurements.
It is implemented with Spring Boot framework.&lt;/p&gt;
&lt;h3 id=&#34;calculation-service&#34;&gt;Calculation Service&lt;/h3&gt;
&lt;p&gt;Calculation service is responsible for executing formula calculations created and defined with Protocol service.
It consists of 1 or more calculation engines (this can be scaled) that can execute R code.
It is implemented with Spring Boot framework.&lt;/p&gt;
&lt;h3 id=&#34;resultdata-service&#34;&gt;Resultdata Service&lt;/h3&gt;
&lt;p&gt;Resultdata service is responsible for managing the calculated result data coming from the Calculation service.
It is implemented with Spring Boot framework.&lt;/p&gt;
&lt;h3 id=&#34;metadata-service&#34;&gt;Metadata Service&lt;/h3&gt;
&lt;p&gt;Metadata service is responsible for managing metadata like tags and properties for different Phaedra II entity objects
like projects, experiments, plates, protocols, plate templates and wells.
It is implemented with Spring Boot framework.&lt;/p&gt;
&lt;h3 id=&#34;charting-service&#34;&gt;Charting Service&lt;/h3&gt;
&lt;p&gt;Charting service is responsible for building different types of charts for specific input data. The charting service
collects the data from other Phaedra II services and combines the collected data in charts that can be displayed.
The chart types that are available at the moment of the writing are Scatter, Box-plot and Bar charts for selected plate.
It is implemented with Spring Boot framework.&lt;/p&gt;
&lt;h3 id=&#34;pipeline-service&#34;&gt;Pipeline Service&lt;/h3&gt;
&lt;p&gt;Pipeline service manages pipelines and their executions, which perform common tasks in an automated fashion.
Typically, these tasks are triggered from the arrival of new measurements in Phaedra, and include
plate measurement linking, plate definition linking, protocol calculation, etc.&lt;/p&gt;
&lt;h3 id=&#34;phaedra-ui&#34;&gt;Phaedra UI&lt;/h3&gt;
&lt;p&gt;Phaedra UI is an implementation of the Phaedra Web client application. It is implemented with Vue.js web framework.
Phaedra UI relies on the REST and GraphQL apis of the Phaedra II back-end services to visualise and update the data.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Documentation: Infrastructure</title>
      <link>/2.12.0/documentation/technical_docs/infrastructure/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/2.12.0/documentation/technical_docs/infrastructure/</guid>
      <description>
        
        
        &lt;h3 id=&#34;overview&#34;&gt;Overview&lt;/h3&gt;
&lt;p&gt;Phaedra 2 is deployed as a set of &lt;strong&gt;services&lt;/strong&gt; on a &lt;strong&gt;Kubernetes cluster&lt;/strong&gt;. For a full list of these services,
see &lt;a href=&#34;../architecture&#34;&gt;Architecture&lt;/a&gt;.&lt;/p&gt;

&lt;figure&gt;
    &lt;img src=&#34;../img/infrastructure.png&#34; width=&#34;100%&#34; height=&#34;100%&#34;/&gt; 
&lt;/figure&gt;

&lt;p&gt;In addition to these services, a Phaedra 2 cluster also contains:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Script Engine workers&lt;/strong&gt;, to perform script executions, mainly for the &lt;code&gt;CalculationService&lt;/code&gt; and the &lt;code&gt;DataCaptureService&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;A public &lt;a href=&#34;https://www.keycloak.org/&#34;&gt;Keycloak&lt;/a&gt; server, used for authentication and authorization&lt;/li&gt;
&lt;li&gt;A public &lt;strong&gt;API gateway&lt;/strong&gt;, to expose the service APIs outside the cluster&lt;/li&gt;
&lt;li&gt;A set of &lt;strong&gt;Kafka brokers&lt;/strong&gt;, to manage the Kafka topics that the services use for inter-service communication&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;From within the cluster, the Phaedra services will need access to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;An &lt;strong&gt;object store&lt;/strong&gt; that persists binary data such as images&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;relational database&lt;/strong&gt; that persists numerical and other data for most of the services&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;deployment&#34;&gt;Deployment&lt;/h3&gt;
&lt;p&gt;Phaedra 2 components are deployed using a set of &lt;a href=&#34;https://kustomize.io/&#34;&gt;Kustomize&lt;/a&gt; yaml files, which are split up into 2 parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A set of generic files which can be reused across deployments,&lt;/li&gt;
&lt;li&gt;A set of specific configuration files which are edited to match the environment they will be deployed on.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;helm-chart&#34;&gt;Helm Chart&lt;/h3&gt;
&lt;p&gt;A &lt;a href=&#34;https://helm.sh/&#34;&gt;Helm&lt;/a&gt; chart is currently under development to assist with the deployment of a Phaedra 2 cluster.&lt;/p&gt;
&lt;p&gt;Please check back soon for updates on this topic.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Documentation: Kafka Events</title>
      <link>/2.12.0/documentation/technical_docs/kafka_events/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/2.12.0/documentation/technical_docs/kafka_events/</guid>
      <description>
        
        
        &lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Phaedra 2 uses Kafka for inter-service communication as well as some external communication.
This document provides a full list of all events Phaedra 2 services provide, and consume.&lt;/p&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;All message formats are JSON, unless specified otherwise&lt;/li&gt;
&lt;li&gt;Each services has its own group ID, noted in snake-case. E.g. &lt;code&gt;PlateService&lt;/code&gt; has group id &lt;code&gt;plate-service&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Additional/external consumers MUST NOT use these predefined group IDs.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;calculation-events&#34;&gt;Calculation Events&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Topic: &lt;strong&gt;&lt;code&gt;calculations&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Event Key&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Producer&lt;/th&gt;
&lt;th&gt;Consumers&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;requestPlateCalculation&lt;/td&gt;
&lt;td&gt;Request a plate calculation&lt;/td&gt;
&lt;td&gt;UI&lt;/td&gt;
&lt;td&gt;CalculationService&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;requestCurveFit&lt;/td&gt;
&lt;td&gt;Request a curve fit&lt;/td&gt;
&lt;td&gt;CalculationService&lt;/td&gt;
&lt;td&gt;CalculationService&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;notifyCalculationEvent&lt;/td&gt;
&lt;td&gt;Progress notification about a running calculation job&lt;/td&gt;
&lt;td&gt;CalculationService&lt;/td&gt;
&lt;td&gt;*&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;plate-events&#34;&gt;Plate Events&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Topic: &lt;strong&gt;&lt;code&gt;plates&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Event Key&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Producer&lt;/th&gt;
&lt;th&gt;Consumers&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;requestPlateCalculationStatusUpdate&lt;/td&gt;
&lt;td&gt;Request a plate status change&lt;/td&gt;
&lt;td&gt;CalculationService&lt;/td&gt;
&lt;td&gt;PlateService&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;requestPlateMeasurementLink&lt;/td&gt;
&lt;td&gt;Request a plate-measurement link&lt;/td&gt;
&lt;td&gt;PipelineService&lt;/td&gt;
&lt;td&gt;PlateService&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;requestPlateDefinitionLink&lt;/td&gt;
&lt;td&gt;Request a plate-definition link&lt;/td&gt;
&lt;td&gt;PipelineService&lt;/td&gt;
&lt;td&gt;PlateService&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;notifyPlateModified&lt;/td&gt;
&lt;td&gt;Notification about a plate modification&lt;/td&gt;
&lt;td&gt;PlateService&lt;/td&gt;
&lt;td&gt;*&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;notifyPlateMeasLinked&lt;/td&gt;
&lt;td&gt;Notification that a plate has been linked with a measurement&lt;/td&gt;
&lt;td&gt;PlateService&lt;/td&gt;
&lt;td&gt;*&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;notifyPlateDefinitionLinked&lt;/td&gt;
&lt;td&gt;Notification that a plate has b een linked with a plate definition&lt;/td&gt;
&lt;td&gt;PlateService&lt;/td&gt;
&lt;td&gt;*&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;resultdata-events&#34;&gt;ResultData Events&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Topic: &lt;strong&gt;&lt;code&gt;resultdata&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Event Key&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Producer&lt;/th&gt;
&lt;th&gt;Consumers&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;saveResultData&lt;/td&gt;
&lt;td&gt;Save calculation result data&lt;/td&gt;
&lt;td&gt;CalculationService&lt;/td&gt;
&lt;td&gt;ResultDataService&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;saveResultStats&lt;/td&gt;
&lt;td&gt;Save calculation result stats&lt;/td&gt;
&lt;td&gt;CalculationService&lt;/td&gt;
&lt;td&gt;ResultDataService&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;resultSetUpdated&lt;/td&gt;
&lt;td&gt;Notification that a resultset has been updated&lt;/td&gt;
&lt;td&gt;ResultDataService&lt;/td&gt;
&lt;td&gt;*&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;resultDataUpdated&lt;/td&gt;
&lt;td&gt;Notification that a resultset&amp;rsquo;s data has been updated&lt;/td&gt;
&lt;td&gt;ResultDataService&lt;/td&gt;
&lt;td&gt;*&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;resultFeatureStatUpdated&lt;/td&gt;
&lt;td&gt;Notification that a resultset&amp;rsquo;s feature stat has been updated&lt;/td&gt;
&lt;td&gt;ResultDataService&lt;/td&gt;
&lt;td&gt;*&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;curvedata-events&#34;&gt;CurveData Events&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Topic: &lt;strong&gt;&lt;code&gt;curvedata&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Event Key&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Producer&lt;/th&gt;
&lt;th&gt;Consumers&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;saveCurve&lt;/td&gt;
&lt;td&gt;Save a DRC&lt;/td&gt;
&lt;td&gt;CalculationService&lt;/td&gt;
&lt;td&gt;CurveDataService&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;datacapture-events&#34;&gt;DataCapture Events&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Topic: &lt;strong&gt;&lt;code&gt;datacapture&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Event Key&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Producer&lt;/th&gt;
&lt;th&gt;Consumers&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;requestCaptureJob&lt;/td&gt;
&lt;td&gt;Request a new datacapture job&lt;/td&gt;
&lt;td&gt;PipelineService&lt;/td&gt;
&lt;td&gt;DataCaptureService&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;notifyCaptureJobUpdated&lt;/td&gt;
&lt;td&gt;Notification about progress of a datacapture job&lt;/td&gt;
&lt;td&gt;DataCaptureService&lt;/td&gt;
&lt;td&gt;*&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;measurement-events&#34;&gt;Measurement Events&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Topic: &lt;strong&gt;&lt;code&gt;measurements&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Event Key&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Producer&lt;/th&gt;
&lt;th&gt;Consumers&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;requestMeasurementSaveWellData&lt;/td&gt;
&lt;td&gt;Save measurement&amp;rsquo;s well data&lt;/td&gt;
&lt;td&gt;DataCaptureService&lt;/td&gt;
&lt;td&gt;MeasurementService&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;requestMeasurementSaveSubwellData&lt;/td&gt;
&lt;td&gt;Save measurement&amp;rsquo;s subwell data&lt;/td&gt;
&lt;td&gt;DataCaptureService&lt;/td&gt;
&lt;td&gt;MeasurementService&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;notifyNewMeasurement&lt;/td&gt;
&lt;td&gt;Notification that a new measurement is available&lt;/td&gt;
&lt;td&gt;MeasurementService&lt;/td&gt;
&lt;td&gt;*&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

      </description>
    </item>
    
  </channel>
</rss>
