Using Microservices to Design Patient-facing Research Software

Using Microservices to Design Patient-facing Research
Software
IEEE 18th International Conference on e-Science
Martin Chapman
King’s College London
Traditional research software
Software that facilitates research is usually designed to be used by researchers themselves.
Figure 1: An agent-based model (ABM) of crowds around the London Eye.
1
Modern research software
Increasingly, research software is also designed for other users, where the focus of the research
is the outcome of interactions with this software. In the health informatics research domain,
these users are often patients.
Figure 2: The ‘ZOE’ COVID symptom tracking application.
2
Researchers vs. patients i
Developing software that can both facilitate research and effective patient interactions
presents a number of challenges:
• Software development. The research to be conducted may necessitate the use of
certain languages (e.g. a certain package that is only available in Python), which might
not match the languages that are best for developing software for potentially large
groups of patients (e.g. V8-compiled Javascript).
3
Researchers vs. patients i
Developing software that can both facilitate research and effective patient interactions
presents a number of challenges:
• Software development. The research to be conducted may necessitate the use of
certain languages (e.g. a certain package that is only available in Python), which might
not match the languages that are best for developing software for potentially large
groups of patients (e.g. V8-compiled Javascript).
• Modularity. Researchers naturally want to change parts of a system (e.g. a
recommendation engine) in order to facilitate different experiments. These experiments,
which might affect stability, are typically avoided in live, patient-facing systems.
3
Researchers vs. patients i
Developing software that can both facilitate research and effective patient interactions
presents a number of challenges:
• Software development. The research to be conducted may necessitate the use of
certain languages (e.g. a certain package that is only available in Python), which might
not match the languages that are best for developing software for potentially large
groups of patients (e.g. V8-compiled Javascript).
• Modularity. Researchers naturally want to change parts of a system (e.g. a
recommendation engine) in order to facilitate different experiments. These experiments,
which might affect stability, are typically avoided in live, patient-facing systems.
• Processing time. Similarly, the components experimented with might have longer
execution times. Long execution times should be minimised in medical systems where
expedient responses are often essential.
3
Researchers vs. patients ii
Developing software that can facilitate both research and effective patient interactions presents
a number of challenges:
• Reproducibility: Researchers want their methodology to be reproducible, and a
component of this is the availability of the software used to produce results. For
patient-facing systems, especially those that deal with health data, it may not be
possible/preferable to share part of a system (e.g. a proprietary health data schema).
4
Researchers vs. patients ii
Developing software that can facilitate both research and effective patient interactions presents
a number of challenges:
• Reproducibility: Researchers want their methodology to be reproducible, and a
component of this is the availability of the software used to produce results. For
patient-facing systems, especially those that deal with health data, it may not be
possible/preferable to share part of a system (e.g. a proprietary health data schema).
• Data quality: Researchers are likely to want to experiment with complex data sources
(high-volume, heterogeneous, etc.), and use them as input to their software. In health
systems, data sources need to be as accurate and stable as possible to ensure correct
interventions.
4
Microservices
To try and address some of these issues we can consider how to structure our software.
Figure 3: Example customer information microservice. Newman, 2019
A microservice design approach suggests that a system should be separated into individual
communicating services (often via HTTP), each of which provides a single piece of overall
system functionality.
5
Microservices in industry
The use of microservices in industrial settings (and in the wider software development
community) is commonplace.
However (at least in our experience) patient-facing research software does not adopt industry
paradigms like this.
Wider goal: encourage the use of established software engineering techniques when developing
(patient-facing) research software.
6
Impact of microservices
1. Software development. Each service can be built using a different language, allowing
languages to be combined. Technological heterogeneity
2. Modularity. Service logic can be replaced with minimal impact to the rest of the
system (and services can be used in other systems). Replaceability and Composability
3. Processing time. Functionality with long execution times can be isolated, ensuring the
remainder of the system is not affected. Resilience
4. Reproducibility. A system can be deployed even in the absence of certain components.
Ease of deployment
5. Data quality. The components of a system can be replicated in order to ensure
sufficient data capture. Scalability
7
CONSULT i
We can demonstrate each of these benefits in the context of CONSULT, a decision-support
system for stroke patients that was developed under the microservice paradigm.
Figure 4: CONSULT’s dashboard interface Figure 5: CONSULT’s chatbot interface
8
CONSULT ii
Blood pressure
(Withings API)
Pulse and Activity
(Garmin API)
Heart Rate / ECG
(Medibiosense API)
EHR
(EMIS)
Device
Integration
(Withings)
Device
Integration
(Garmin)
Device
Integration
(Vitalpatch)
Sensor-FHIR
converter
EHR Integration
(EMIS)
EHR-FHIR
converter
FHIR Health
Data Server
Message
Passer
Dialogue
Manager
Authentication
Server
Provenance
Server
Data
Miner
Argumentation
Engine
Tablet
Browser
Chat
Server
UI backend
PC
Browser
Sensor data
Sensor
data
Sensor
data
EHR
data
FHIR resources
FHIR resources
FHIR resources
Processed
patient data
Patient
data
Substitution
Credentials
Processed
patient data
Processed patient data,
goal
Results
Dialogue responses
Data summaries, tips
Figure 6: CONSULT’s microservice architecture
9
CONSULT iii
CONSULT’s full architecture is shown on the previous slide, with each line representing the
transfer of data between two services.
Here, we will consider three (simplified) example flows:
user dialogue manager argumentation engine
A user interacting with the chatbot.
user dashboard health data store
A user viewing (a summary of) their health data.
wearable device sensor integration health data store
Sensor data being passed to the system.
10
1. Software development
The CONSULT team consistent predominantly of researchers familiar with Python and with R.
11
1. Software development
The CONSULT team consistent predominantly of researchers familiar with Python and with R.
The use of microservices allowed us to combine these technologies with languages traditionally
better suited for scalable application development (e.g. Javascript):
user dialogue manager argumentation engine
11
1. Software development
The CONSULT team consistent predominantly of researchers familiar with Python and with R.
The use of microservices allowed us to combine these technologies with languages traditionally
better suited for scalable application development (e.g. Javascript):
user dialogue manager argumentation engine
Caveat: Not all languages are optimised to work as service-based entities (e.g. R).
11
2. Modularity
The CONSULT team wanted to be able to switch out the existing argumentation-based
reasoner for other reasoners in the future.
12
2. Modularity
The CONSULT team wanted to be able to switch out the existing argumentation-based
reasoner for other reasoners in the future.
The use of microservices ensured a separation between interface and logic, making it possible
for this to take place:
user dialogue manager API Logic
Argumentation
Engine
12
2. Modularity
The CONSULT team wanted to be able to switch out the existing argumentation-based
reasoner for other reasoners in the future.
The use of microservices ensured a separation between interface and logic, making it possible
for this to take place:
user dialogue manager API Logic
Argumentation
Engine
Caveat: Owing to the variety of reasoners that might be used, we did not deem it possible
to achieve complete API and logic separation (i.e. modifications to the interface were
inevitable). We developed a dialogue syntax, with modifiable endpoint references, as a
potential way to offset this.
12
REFLECT
The presence of encapsulated logic also allowed CONSULT’s services to be used elsewhere:
Blood pressure
(Withings API)
Pulse and Activity
(Garmin API)
Heart Rate / ECG
(Medibiosense API)
Device
Integration
(Withings)
Device
Integration
(Garmin)
Device
Integration
(Vitalpatch)
Sensor-FHIR
converter
FHIR server
Metadvice’s
cardiometabolic
DSS services
Sensor data
Sensor
data
Sensor data
FHIR resources
FHIR resources
Figure 7: The REFLECT architecture
13
3. Processing time i
The argumentation-based reasoner was associated with longer execution times.
user dialogue manager argumentation engine
This risked affecting the response time of other parts of the system:
user dashboard health data store
14
3. Processing time ii
The use of microservices ensures that interactions with the argumentation engine are a distinct
flow, and other flows are unaffected:
t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10
Time
0
5
10
15
20
Response
time
(secs)
argumentation
dashboard
Figure 8: Independence of argumentation engine and dashboard services
15
3. Processing time iii
Caveat: Flows containing the dialogue manager still have to wait. However, other services in
the flow (e.g. the dialogue manager) remain responsive to report on longer execution times.
user dialogue manager argumentation engine
16
4. Ease of deployment
We wanted the observations made based on the use of CONSULT to potentially be
reproduced, but were not comfortable releasing (the schema of) our health data server as a
part of the architecture.
user dashboard health data store
wearable device sensor integration health data store
17
4. Ease of deployment
We wanted the observations made based on the use of CONSULT to potentially be
reproduced, but were not comfortable releasing (the schema of) our health data server as a
part of the architecture.
user dashboard health data store
wearable device sensor integration health data store
Microservices ensure deployment is still possible in the absence of certain services. New users
are able to plug new services into the architecture (e.g. a replacement health data store).
17
4. Ease of deployment
We wanted the observations made based on the use of CONSULT to potentially be
reproduced, but were not comfortable releasing (the schema of) our health data server as a
part of the architecture.
user dashboard health data store
wearable device sensor integration health data store
Microservices ensure deployment is still possible in the absence of certain services. New users
are able to plug new services into the architecture (e.g. a replacement health data store).
Caveat: The use of services might actually hinder deployment, if too many are used and
the architecture becomes overly complex. A balance needs to be found between having
services with a limited remit and having an appropriate number of services so as to ensure
intelligibility.
17
5. Scalability
We wanted to be able to have complex data sources as input to the system (e.g. wearable
device data) without losing any data.
18
5. Scalability
We wanted to be able to have complex data sources as input to the system (e.g. wearable
device data) without losing any data.
Service replication ensures high volumes of data can be collected; the use of a queue ensures
data is not lost if a service enters an error state:
wearable device sensor integration
sensor integration
sensor integration
health data store
queue
queue
queue
18
5. Scalability i
We can, again, see this
in practice:
monolithic CONSULT
0
20000
40000
60000
80000
100000
120000
140000
Average
responses
Ok
Timeout
Figure 9: How CONSULT responds to high load vs. an emulated monolithic
architecture
19
5. Scalability ii
Caveat: Replicating services has a limited impact in some areas of the system; it does not,
for example, extend to distributed processing in the case of the argumentation engine.
user dialogue manager argumentation engine
20
Limitations and considerations
• Monolithic architectures are not always a bad way to structure software. If well
resourced, they too can solve many of the problems we have identified. However, we
believe that a microservice approach achieves the benefits we have seen by design.
• The use of a microservice architecture, while solving many problems, has no impact on
user interface design, a key component of patient-friendly software.
• Microservices may introduce new issues (e.g. questions of governance).
21
Summary and Future Work
• It can be difficult to develop a piece of software that facilitates research and is suitable
for use by patients.
• We believe developing software for these purposes under the microservice architecture
paradigm can address this issue.
• Despite its impact, we have identified limitations with the application of the paradigm. In
some cases, we have tried to offset these limitations with additional contributions (e.g.
a dialogue templating syntax), but some issues remain and should be considered when
using a microservice approach.
• Overall, we want to encourage the use of established software engineering techniques
when software is developed for research with patients.
Future work will, among other things, explore the impact of the paradigm on other users, such
as general practitioners (GPs).
22
Thank you!
22
1 of 34

Recommended

MICRE: Microservices In MediCal Research Environments by
MICRE: Microservices In MediCal Research EnvironmentsMICRE: Microservices In MediCal Research Environments
MICRE: Microservices In MediCal Research EnvironmentsMartin Chapman
220 views24 slides
Measuring The Value Of The Parent Class by
Measuring The Value Of The Parent ClassMeasuring The Value Of The Parent Class
Measuring The Value Of The Parent ClassMelissa Hewitt
2 views44 slides
Bt0081 software engineering by
Bt0081 software engineeringBt0081 software engineering
Bt0081 software engineeringTechglyphs
131 views31 slides
Ch1 by
Ch1Ch1
Ch1Faisal khokher
51 views20 slides
labiqa'd.pptx by
labiqa'd.pptxlabiqa'd.pptx
labiqa'd.pptx02LabiqaIslam
4 views49 slides
44478167 hospital-management-system by
44478167 hospital-management-system44478167 hospital-management-system
44478167 hospital-management-systemAkshay Iliger
1.9K views48 slides

More Related Content

Similar to Using Microservices to Design Patient-facing Research Software

D017372538 by
D017372538D017372538
D017372538IOSR Journals
254 views14 slides
Software Process and Requirement by
Software Process and RequirementSoftware Process and Requirement
Software Process and Requirementcricket2ime
6 views60 slides
Software engineering introduction by
Software engineering introductionSoftware engineering introduction
Software engineering introductionVishal Singh
3.7K views37 slides
Software Architecture for Robotics by
Software Architecture for RoboticsSoftware Architecture for Robotics
Software Architecture for RoboticsLorran Pegoretti
2.3K views7 slides
Software Evaluation by
Software EvaluationSoftware Evaluation
Software EvaluationLori Gilbert
2 views80 slides
End User Computing by
End User ComputingEnd User Computing
End User ComputingRam Dutt Shukla
19K views13 slides

Similar to Using Microservices to Design Patient-facing Research Software(20)

Software Process and Requirement by cricket2ime
Software Process and RequirementSoftware Process and Requirement
Software Process and Requirement
cricket2ime6 views
Software engineering introduction by Vishal Singh
Software engineering introductionSoftware engineering introduction
Software engineering introduction
Vishal Singh3.7K views
Software Architecture for Robotics by Lorran Pegoretti
Software Architecture for RoboticsSoftware Architecture for Robotics
Software Architecture for Robotics
Lorran Pegoretti2.3K views
Connectivity And Topology Of Wireless Networks by Trina Simmons
Connectivity And Topology Of Wireless NetworksConnectivity And Topology Of Wireless Networks
Connectivity And Topology Of Wireless Networks
Trina Simmons2 views
Improved Strategy for Distributed Processing and Network Application Development by Editor IJCATR
Improved Strategy for Distributed Processing and Network Application DevelopmentImproved Strategy for Distributed Processing and Network Application Development
Improved Strategy for Distributed Processing and Network Application Development
Editor IJCATR155 views
Improved Strategy for Distributed Processing and Network Application Developm... by Editor IJCATR
Improved Strategy for Distributed Processing and Network Application Developm...Improved Strategy for Distributed Processing and Network Application Developm...
Improved Strategy for Distributed Processing and Network Application Developm...
Editor IJCATR267 views
Functional Elbow And Wrist Rehabilitation Prototype... by Barbara Taylor
Functional Elbow And Wrist Rehabilitation Prototype...Functional Elbow And Wrist Rehabilitation Prototype...
Functional Elbow And Wrist Rehabilitation Prototype...
Barbara Taylor2 views
A Voice Based Assistant Using Google Dialogflow And Machine Learning by Emily Smith
A Voice Based Assistant Using Google Dialogflow And Machine LearningA Voice Based Assistant Using Google Dialogflow And Machine Learning
A Voice Based Assistant Using Google Dialogflow And Machine Learning
Emily Smith4 views
Development Tools - Abhijeet by Abhijeet Kalsi
Development Tools - AbhijeetDevelopment Tools - Abhijeet
Development Tools - Abhijeet
Abhijeet Kalsi744 views
Constructing a software requirements specification and design for electronic ... by Ra'Fat Al-Msie'deen
Constructing a software requirements specification and design for electronic ...Constructing a software requirements specification and design for electronic ...
Constructing a software requirements specification and design for electronic ...
Report hospital by Rachit Gaur
Report hospitalReport hospital
Report hospital
Rachit Gaur4.1K views

More from Martin Chapman

Using AI to autonomously identify diseases within groups of patients by
Using AI to autonomously identify diseases within groups of patientsUsing AI to autonomously identify diseases within groups of patients
Using AI to autonomously identify diseases within groups of patientsMartin Chapman
13 views7 slides
Using AI to understand how preventative interventions can improve the health ... by
Using AI to understand how preventative interventions can improve the health ...Using AI to understand how preventative interventions can improve the health ...
Using AI to understand how preventative interventions can improve the health ...Martin Chapman
23 views45 slides
Principles of Health Informatics: Evaluating medical software by
Principles of Health Informatics: Evaluating medical softwarePrinciples of Health Informatics: Evaluating medical software
Principles of Health Informatics: Evaluating medical softwareMartin Chapman
21 views50 slides
Principles of Health Informatics: Usability of medical software by
Principles of Health Informatics: Usability of medical softwarePrinciples of Health Informatics: Usability of medical software
Principles of Health Informatics: Usability of medical softwareMartin Chapman
25 views60 slides
Principles of Health Informatics: Social networks, telehealth, and mobile health by
Principles of Health Informatics: Social networks, telehealth, and mobile healthPrinciples of Health Informatics: Social networks, telehealth, and mobile health
Principles of Health Informatics: Social networks, telehealth, and mobile healthMartin Chapman
4 views56 slides
Principles of Health Informatics: Communication systems in healthcare by
Principles of Health Informatics: Communication systems in healthcarePrinciples of Health Informatics: Communication systems in healthcare
Principles of Health Informatics: Communication systems in healthcareMartin Chapman
42 views58 slides

More from Martin Chapman(20)

Using AI to autonomously identify diseases within groups of patients by Martin Chapman
Using AI to autonomously identify diseases within groups of patientsUsing AI to autonomously identify diseases within groups of patients
Using AI to autonomously identify diseases within groups of patients
Martin Chapman13 views
Using AI to understand how preventative interventions can improve the health ... by Martin Chapman
Using AI to understand how preventative interventions can improve the health ...Using AI to understand how preventative interventions can improve the health ...
Using AI to understand how preventative interventions can improve the health ...
Martin Chapman23 views
Principles of Health Informatics: Evaluating medical software by Martin Chapman
Principles of Health Informatics: Evaluating medical softwarePrinciples of Health Informatics: Evaluating medical software
Principles of Health Informatics: Evaluating medical software
Martin Chapman21 views
Principles of Health Informatics: Usability of medical software by Martin Chapman
Principles of Health Informatics: Usability of medical softwarePrinciples of Health Informatics: Usability of medical software
Principles of Health Informatics: Usability of medical software
Martin Chapman25 views
Principles of Health Informatics: Social networks, telehealth, and mobile health by Martin Chapman
Principles of Health Informatics: Social networks, telehealth, and mobile healthPrinciples of Health Informatics: Social networks, telehealth, and mobile health
Principles of Health Informatics: Social networks, telehealth, and mobile health
Martin Chapman4 views
Principles of Health Informatics: Communication systems in healthcare by Martin Chapman
Principles of Health Informatics: Communication systems in healthcarePrinciples of Health Informatics: Communication systems in healthcare
Principles of Health Informatics: Communication systems in healthcare
Martin Chapman42 views
Principles of Health Informatics: Terminologies and classification systems by Martin Chapman
Principles of Health Informatics: Terminologies and classification systemsPrinciples of Health Informatics: Terminologies and classification systems
Principles of Health Informatics: Terminologies and classification systems
Martin Chapman49 views
Principles of Health Informatics: Representing medical knowledge by Martin Chapman
Principles of Health Informatics: Representing medical knowledgePrinciples of Health Informatics: Representing medical knowledge
Principles of Health Informatics: Representing medical knowledge
Martin Chapman18 views
Principles of Health Informatics: Informatics skills - searching and making d... by Martin Chapman
Principles of Health Informatics: Informatics skills - searching and making d...Principles of Health Informatics: Informatics skills - searching and making d...
Principles of Health Informatics: Informatics skills - searching and making d...
Martin Chapman46 views
Principles of Health Informatics: Informatics skills - communicating, structu... by Martin Chapman
Principles of Health Informatics: Informatics skills - communicating, structu...Principles of Health Informatics: Informatics skills - communicating, structu...
Principles of Health Informatics: Informatics skills - communicating, structu...
Martin Chapman964 views
Principles of Health Informatics: Models, information, and information systems by Martin Chapman
Principles of Health Informatics: Models, information, and information systemsPrinciples of Health Informatics: Models, information, and information systems
Principles of Health Informatics: Models, information, and information systems
Martin Chapman28 views
Using AI to understand how preventative interventions can improve the health ... by Martin Chapman
Using AI to understand how preventative interventions can improve the health ...Using AI to understand how preventative interventions can improve the health ...
Using AI to understand how preventative interventions can improve the health ...
Martin Chapman29 views
Using CWL to support EHR-based phenotyping by Martin Chapman
Using CWL to support EHR-based phenotypingUsing CWL to support EHR-based phenotyping
Using CWL to support EHR-based phenotyping
Martin Chapman111 views
Phenoflow: An Architecture for Computable Phenotypes by Martin Chapman
Phenoflow: An Architecture for Computable PhenotypesPhenoflow: An Architecture for Computable Phenotypes
Phenoflow: An Architecture for Computable Phenotypes
Martin Chapman13 views
COVID-19 Analytics in Jupyter: Intuitive Provenance Integration using ProvIt by Martin Chapman
COVID-19 Analytics in Jupyter: Intuitive Provenance Integration using ProvItCOVID-19 Analytics in Jupyter: Intuitive Provenance Integration using ProvIt
COVID-19 Analytics in Jupyter: Intuitive Provenance Integration using ProvIt
Martin Chapman138 views
Using computable phenotypes in point of care clinical trial recruitment by Martin Chapman
Using computable phenotypes in point of care clinical trial recruitmentUsing computable phenotypes in point of care clinical trial recruitment
Using computable phenotypes in point of care clinical trial recruitment
Martin Chapman39 views
BlocVote: An E-voting system providing an anonymous, secure, transparent, and... by Martin Chapman
BlocVote: An E-voting system providing an anonymous, secure, transparent, and...BlocVote: An E-voting system providing an anonymous, secure, transparent, and...
BlocVote: An E-voting system providing an anonymous, secure, transparent, and...
Martin Chapman85 views
Phenoflow: A Microservice Architecture for Portable Workflow-based Phenotype ... by Martin Chapman
Phenoflow: A Microservice Architecture for Portable Workflow-based Phenotype ...Phenoflow: A Microservice Architecture for Portable Workflow-based Phenotype ...
Phenoflow: A Microservice Architecture for Portable Workflow-based Phenotype ...
Martin Chapman63 views
A Microservice Architecture for the Design of Computer-Interpretable Guidelin... by Martin Chapman
A Microservice Architecture for the Design of Computer-Interpretable Guidelin...A Microservice Architecture for the Design of Computer-Interpretable Guidelin...
A Microservice Architecture for the Design of Computer-Interpretable Guidelin...
Martin Chapman309 views

Recently uploaded

Google solution challenge..pptx by
Google solution challenge..pptxGoogle solution challenge..pptx
Google solution challenge..pptxChitreshGyanani1
98 views18 slides
UWP OA Week Presentation (1).pptx by
UWP OA Week Presentation (1).pptxUWP OA Week Presentation (1).pptx
UWP OA Week Presentation (1).pptxJisc
74 views11 slides
Ch. 7 Political Participation and Elections.pptx by
Ch. 7 Political Participation and Elections.pptxCh. 7 Political Participation and Elections.pptx
Ch. 7 Political Participation and Elections.pptxRommel Regala
72 views11 slides
Women from Hackney’s History: Stoke Newington by Sue Doe by
Women from Hackney’s History: Stoke Newington by Sue DoeWomen from Hackney’s History: Stoke Newington by Sue Doe
Women from Hackney’s History: Stoke Newington by Sue DoeHistory of Stoke Newington
141 views21 slides
Solar System and Galaxies.pptx by
Solar System and Galaxies.pptxSolar System and Galaxies.pptx
Solar System and Galaxies.pptxDrHafizKosar
85 views26 slides

Recently uploaded(20)

UWP OA Week Presentation (1).pptx by Jisc
UWP OA Week Presentation (1).pptxUWP OA Week Presentation (1).pptx
UWP OA Week Presentation (1).pptx
Jisc74 views
Ch. 7 Political Participation and Elections.pptx by Rommel Regala
Ch. 7 Political Participation and Elections.pptxCh. 7 Political Participation and Elections.pptx
Ch. 7 Political Participation and Elections.pptx
Rommel Regala72 views
Solar System and Galaxies.pptx by DrHafizKosar
Solar System and Galaxies.pptxSolar System and Galaxies.pptx
Solar System and Galaxies.pptx
DrHafizKosar85 views
Class 10 English notes 23-24.pptx by TARIQ KHAN
Class 10 English notes 23-24.pptxClass 10 English notes 23-24.pptx
Class 10 English notes 23-24.pptx
TARIQ KHAN107 views
Use of Probiotics in Aquaculture.pptx by AKSHAY MANDAL
Use of Probiotics in Aquaculture.pptxUse of Probiotics in Aquaculture.pptx
Use of Probiotics in Aquaculture.pptx
AKSHAY MANDAL89 views
Narration ppt.pptx by TARIQ KHAN
Narration  ppt.pptxNarration  ppt.pptx
Narration ppt.pptx
TARIQ KHAN119 views
Structure and Functions of Cell.pdf by Nithya Murugan
Structure and Functions of Cell.pdfStructure and Functions of Cell.pdf
Structure and Functions of Cell.pdf
Nithya Murugan368 views
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx by ISSIP
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptxEIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
ISSIP317 views
AI Tools for Business and Startups by Svetlin Nakov
AI Tools for Business and StartupsAI Tools for Business and Startups
AI Tools for Business and Startups
Svetlin Nakov101 views
Plastic waste.pdf by alqaseedae
Plastic waste.pdfPlastic waste.pdf
Plastic waste.pdf
alqaseedae125 views
Community-led Open Access Publishing webinar.pptx by Jisc
Community-led Open Access Publishing webinar.pptxCommunity-led Open Access Publishing webinar.pptx
Community-led Open Access Publishing webinar.pptx
Jisc74 views
The Open Access Community Framework (OACF) 2023 (1).pptx by Jisc
The Open Access Community Framework (OACF) 2023 (1).pptxThe Open Access Community Framework (OACF) 2023 (1).pptx
The Open Access Community Framework (OACF) 2023 (1).pptx
Jisc85 views
Class 10 English lesson plans by TARIQ KHAN
Class 10 English  lesson plansClass 10 English  lesson plans
Class 10 English lesson plans
TARIQ KHAN257 views
Education and Diversity.pptx by DrHafizKosar
Education and Diversity.pptxEducation and Diversity.pptx
Education and Diversity.pptx
DrHafizKosar118 views
Psychology KS5 by WestHatch
Psychology KS5Psychology KS5
Psychology KS5
WestHatch77 views

Using Microservices to Design Patient-facing Research Software

  • 1. Using Microservices to Design Patient-facing Research Software IEEE 18th International Conference on e-Science Martin Chapman King’s College London
  • 2. Traditional research software Software that facilitates research is usually designed to be used by researchers themselves. Figure 1: An agent-based model (ABM) of crowds around the London Eye. 1
  • 3. Modern research software Increasingly, research software is also designed for other users, where the focus of the research is the outcome of interactions with this software. In the health informatics research domain, these users are often patients. Figure 2: The ‘ZOE’ COVID symptom tracking application. 2
  • 4. Researchers vs. patients i Developing software that can both facilitate research and effective patient interactions presents a number of challenges: • Software development. The research to be conducted may necessitate the use of certain languages (e.g. a certain package that is only available in Python), which might not match the languages that are best for developing software for potentially large groups of patients (e.g. V8-compiled Javascript). 3
  • 5. Researchers vs. patients i Developing software that can both facilitate research and effective patient interactions presents a number of challenges: • Software development. The research to be conducted may necessitate the use of certain languages (e.g. a certain package that is only available in Python), which might not match the languages that are best for developing software for potentially large groups of patients (e.g. V8-compiled Javascript). • Modularity. Researchers naturally want to change parts of a system (e.g. a recommendation engine) in order to facilitate different experiments. These experiments, which might affect stability, are typically avoided in live, patient-facing systems. 3
  • 6. Researchers vs. patients i Developing software that can both facilitate research and effective patient interactions presents a number of challenges: • Software development. The research to be conducted may necessitate the use of certain languages (e.g. a certain package that is only available in Python), which might not match the languages that are best for developing software for potentially large groups of patients (e.g. V8-compiled Javascript). • Modularity. Researchers naturally want to change parts of a system (e.g. a recommendation engine) in order to facilitate different experiments. These experiments, which might affect stability, are typically avoided in live, patient-facing systems. • Processing time. Similarly, the components experimented with might have longer execution times. Long execution times should be minimised in medical systems where expedient responses are often essential. 3
  • 7. Researchers vs. patients ii Developing software that can facilitate both research and effective patient interactions presents a number of challenges: • Reproducibility: Researchers want their methodology to be reproducible, and a component of this is the availability of the software used to produce results. For patient-facing systems, especially those that deal with health data, it may not be possible/preferable to share part of a system (e.g. a proprietary health data schema). 4
  • 8. Researchers vs. patients ii Developing software that can facilitate both research and effective patient interactions presents a number of challenges: • Reproducibility: Researchers want their methodology to be reproducible, and a component of this is the availability of the software used to produce results. For patient-facing systems, especially those that deal with health data, it may not be possible/preferable to share part of a system (e.g. a proprietary health data schema). • Data quality: Researchers are likely to want to experiment with complex data sources (high-volume, heterogeneous, etc.), and use them as input to their software. In health systems, data sources need to be as accurate and stable as possible to ensure correct interventions. 4
  • 9. Microservices To try and address some of these issues we can consider how to structure our software. Figure 3: Example customer information microservice. Newman, 2019 A microservice design approach suggests that a system should be separated into individual communicating services (often via HTTP), each of which provides a single piece of overall system functionality. 5
  • 10. Microservices in industry The use of microservices in industrial settings (and in the wider software development community) is commonplace. However (at least in our experience) patient-facing research software does not adopt industry paradigms like this. Wider goal: encourage the use of established software engineering techniques when developing (patient-facing) research software. 6
  • 11. Impact of microservices 1. Software development. Each service can be built using a different language, allowing languages to be combined. Technological heterogeneity 2. Modularity. Service logic can be replaced with minimal impact to the rest of the system (and services can be used in other systems). Replaceability and Composability 3. Processing time. Functionality with long execution times can be isolated, ensuring the remainder of the system is not affected. Resilience 4. Reproducibility. A system can be deployed even in the absence of certain components. Ease of deployment 5. Data quality. The components of a system can be replicated in order to ensure sufficient data capture. Scalability 7
  • 12. CONSULT i We can demonstrate each of these benefits in the context of CONSULT, a decision-support system for stroke patients that was developed under the microservice paradigm. Figure 4: CONSULT’s dashboard interface Figure 5: CONSULT’s chatbot interface 8
  • 13. CONSULT ii Blood pressure (Withings API) Pulse and Activity (Garmin API) Heart Rate / ECG (Medibiosense API) EHR (EMIS) Device Integration (Withings) Device Integration (Garmin) Device Integration (Vitalpatch) Sensor-FHIR converter EHR Integration (EMIS) EHR-FHIR converter FHIR Health Data Server Message Passer Dialogue Manager Authentication Server Provenance Server Data Miner Argumentation Engine Tablet Browser Chat Server UI backend PC Browser Sensor data Sensor data Sensor data EHR data FHIR resources FHIR resources FHIR resources Processed patient data Patient data Substitution Credentials Processed patient data Processed patient data, goal Results Dialogue responses Data summaries, tips Figure 6: CONSULT’s microservice architecture 9
  • 14. CONSULT iii CONSULT’s full architecture is shown on the previous slide, with each line representing the transfer of data between two services. Here, we will consider three (simplified) example flows: user dialogue manager argumentation engine A user interacting with the chatbot. user dashboard health data store A user viewing (a summary of) their health data. wearable device sensor integration health data store Sensor data being passed to the system. 10
  • 15. 1. Software development The CONSULT team consistent predominantly of researchers familiar with Python and with R. 11
  • 16. 1. Software development The CONSULT team consistent predominantly of researchers familiar with Python and with R. The use of microservices allowed us to combine these technologies with languages traditionally better suited for scalable application development (e.g. Javascript): user dialogue manager argumentation engine 11
  • 17. 1. Software development The CONSULT team consistent predominantly of researchers familiar with Python and with R. The use of microservices allowed us to combine these technologies with languages traditionally better suited for scalable application development (e.g. Javascript): user dialogue manager argumentation engine Caveat: Not all languages are optimised to work as service-based entities (e.g. R). 11
  • 18. 2. Modularity The CONSULT team wanted to be able to switch out the existing argumentation-based reasoner for other reasoners in the future. 12
  • 19. 2. Modularity The CONSULT team wanted to be able to switch out the existing argumentation-based reasoner for other reasoners in the future. The use of microservices ensured a separation between interface and logic, making it possible for this to take place: user dialogue manager API Logic Argumentation Engine 12
  • 20. 2. Modularity The CONSULT team wanted to be able to switch out the existing argumentation-based reasoner for other reasoners in the future. The use of microservices ensured a separation between interface and logic, making it possible for this to take place: user dialogue manager API Logic Argumentation Engine Caveat: Owing to the variety of reasoners that might be used, we did not deem it possible to achieve complete API and logic separation (i.e. modifications to the interface were inevitable). We developed a dialogue syntax, with modifiable endpoint references, as a potential way to offset this. 12
  • 21. REFLECT The presence of encapsulated logic also allowed CONSULT’s services to be used elsewhere: Blood pressure (Withings API) Pulse and Activity (Garmin API) Heart Rate / ECG (Medibiosense API) Device Integration (Withings) Device Integration (Garmin) Device Integration (Vitalpatch) Sensor-FHIR converter FHIR server Metadvice’s cardiometabolic DSS services Sensor data Sensor data Sensor data FHIR resources FHIR resources Figure 7: The REFLECT architecture 13
  • 22. 3. Processing time i The argumentation-based reasoner was associated with longer execution times. user dialogue manager argumentation engine This risked affecting the response time of other parts of the system: user dashboard health data store 14
  • 23. 3. Processing time ii The use of microservices ensures that interactions with the argumentation engine are a distinct flow, and other flows are unaffected: t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 Time 0 5 10 15 20 Response time (secs) argumentation dashboard Figure 8: Independence of argumentation engine and dashboard services 15
  • 24. 3. Processing time iii Caveat: Flows containing the dialogue manager still have to wait. However, other services in the flow (e.g. the dialogue manager) remain responsive to report on longer execution times. user dialogue manager argumentation engine 16
  • 25. 4. Ease of deployment We wanted the observations made based on the use of CONSULT to potentially be reproduced, but were not comfortable releasing (the schema of) our health data server as a part of the architecture. user dashboard health data store wearable device sensor integration health data store 17
  • 26. 4. Ease of deployment We wanted the observations made based on the use of CONSULT to potentially be reproduced, but were not comfortable releasing (the schema of) our health data server as a part of the architecture. user dashboard health data store wearable device sensor integration health data store Microservices ensure deployment is still possible in the absence of certain services. New users are able to plug new services into the architecture (e.g. a replacement health data store). 17
  • 27. 4. Ease of deployment We wanted the observations made based on the use of CONSULT to potentially be reproduced, but were not comfortable releasing (the schema of) our health data server as a part of the architecture. user dashboard health data store wearable device sensor integration health data store Microservices ensure deployment is still possible in the absence of certain services. New users are able to plug new services into the architecture (e.g. a replacement health data store). Caveat: The use of services might actually hinder deployment, if too many are used and the architecture becomes overly complex. A balance needs to be found between having services with a limited remit and having an appropriate number of services so as to ensure intelligibility. 17
  • 28. 5. Scalability We wanted to be able to have complex data sources as input to the system (e.g. wearable device data) without losing any data. 18
  • 29. 5. Scalability We wanted to be able to have complex data sources as input to the system (e.g. wearable device data) without losing any data. Service replication ensures high volumes of data can be collected; the use of a queue ensures data is not lost if a service enters an error state: wearable device sensor integration sensor integration sensor integration health data store queue queue queue 18
  • 30. 5. Scalability i We can, again, see this in practice: monolithic CONSULT 0 20000 40000 60000 80000 100000 120000 140000 Average responses Ok Timeout Figure 9: How CONSULT responds to high load vs. an emulated monolithic architecture 19
  • 31. 5. Scalability ii Caveat: Replicating services has a limited impact in some areas of the system; it does not, for example, extend to distributed processing in the case of the argumentation engine. user dialogue manager argumentation engine 20
  • 32. Limitations and considerations • Monolithic architectures are not always a bad way to structure software. If well resourced, they too can solve many of the problems we have identified. However, we believe that a microservice approach achieves the benefits we have seen by design. • The use of a microservice architecture, while solving many problems, has no impact on user interface design, a key component of patient-friendly software. • Microservices may introduce new issues (e.g. questions of governance). 21
  • 33. Summary and Future Work • It can be difficult to develop a piece of software that facilitates research and is suitable for use by patients. • We believe developing software for these purposes under the microservice architecture paradigm can address this issue. • Despite its impact, we have identified limitations with the application of the paradigm. In some cases, we have tried to offset these limitations with additional contributions (e.g. a dialogue templating syntax), but some issues remain and should be considered when using a microservice approach. • Overall, we want to encourage the use of established software engineering techniques when software is developed for research with patients. Future work will, among other things, explore the impact of the paradigm on other users, such as general practitioners (GPs). 22