riad gozim€¦ · microservices riad gozim 2018 ome annual users meeting. omero - a recap 1. a...
TRANSCRIPT
![Page 1: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/1.jpg)
Open Microscopy EnvironmentCentre for Gene Regulation & ExpressionSchool of Life Sciences, University of DundeeDundee, Scotland, UK
Microservices
Riad Gozim2018 OME Annual Users Meeting
![Page 2: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/2.jpg)
OMERO - a recap
1
![Page 3: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/3.jpg)
A quick refresh (IDR)
Big data
● 46TB of data
● 50M images
● 160GB database
2
Publically available
● Runs on OMERO
● Analysis, sharing and reuse of scientific image data
Highly flexible
● Suitable for many projects
● Human cells, images from the Tara Oceans, fungi
![Page 4: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/4.jpg)
OMERO.mapr
What is Mapr?
o Plugin to OMERO.web
o Built in python, pip installable (https://github.com/ome/omero-mapr#installing-from-pypi)
3
What does it do?
o Search and browse attributes linked to images in
the form of annotations (key-value)
![Page 5: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/5.jpg)
OMERO-mapr
4
![Page 6: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/6.jpg)
OMERO.mapr querying “map-annotations”
5
![Page 7: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/7.jpg)
“map-annotations” query flow
6
● IDR database - 160GB
● Query pulls together properties from numerous
tables
● Perceivably slow for deployments outside of the IDR
![Page 8: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/8.jpg)
How do we keep OMERO.mapr fast
o Nginx - load balancer
o Nginx - cache
7
![Page 9: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/9.jpg)
8
With cache hit With cache miss
Data request
Data result
![Page 10: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/10.jpg)
Cache can only go so far
Cache needs to be manually populated when data is added
to IDR
Cache has be deleted and reprimed - takes time
Not a good solution for our users who can’t keep up with
updates
9
![Page 11: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/11.jpg)
The challenge
How do we optimise queries in OMERO.mapr?
How do we release any changes without rewriting lots of
code?
How do we deploy those updates without requiring a big
update?
10
![Page 12: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/12.jpg)
Microservices
11
Monolithic Architecture Microservice Architecture
![Page 13: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/13.jpg)
Microservices
o New features can be added
with well-defined boundaries
o Allows developers to work
separately on independent
parts
o Microservices can be
deployed, maintained,
updated, and scaled
independently of each other in
a continuous fashion12
Microservice Architecture
![Page 14: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/14.jpg)
Microservices
● New features can be added with well-defined
boundaries for each piece of functionality
● Allows developers to work separately on independent
parts of OMERO
● Microservices can be deployed, maintained, updated,
and scaled independently of each other in a continuous
fashion
● Compute can be spread across more hardware
13
![Page 15: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/15.jpg)
Granularity
14
![Page 16: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/16.jpg)
Our types of microservice
1. Microservice as a client
2. Microservice as a server
15
![Page 17: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/17.jpg)
Microservices as a client
16
![Page 18: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/18.jpg)
Microservices as a server
17
![Page 19: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/19.jpg)
Microservices as server, for OMERO.mapr
Change the way OMERO.mapr queries the database
Add optimisations at the database layer
Make changes silently
Does not use ICE
18
![Page 20: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/20.jpg)
Architecture overview with microservice
19
![Page 21: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/21.jpg)
Mapr microservice “omero-ms-mapr”
Split up monolithic code base
Added OMERO.server optimisation at the database layer
PSQL Materialised Views
Microservice built with Java and Vert.x
20
![Page 22: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/22.jpg)
A bit about Vert.x
o Polyglot fundamentals
o Async IO HTTP
implementation
o Single and multithreaded
worker “verticles”
o EventBus
o Well suited to
microservices
o Easy to build with
21
![Page 23: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/23.jpg)
As a user of IDR, what changes will I see??
Nothing - Just better performance when you click to view
something that hasn’t been cached
22
![Page 24: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/24.jpg)
Nginx configuration
23
![Page 25: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/25.jpg)
To sum up
o Give us the ability to address performance bottlenecks
o Allow us to do this with minimal disruption
o Make it easier to develop more features in future
o Allow us to deploy to more hardware
24
![Page 26: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/26.jpg)
Additional
- gitlab - build OMERO.server:
- https://gitlab.com/openmicroscopy/incubator/omero-dsl
- https://gitlab.com/openmicroscopy/incubator/omero-all
- gitlab - mapr
- https://gitlab.com/openmicroscopy/incubator/omero-ms-map
- Glencoe microservices:
- https://github.com/glencoesoftware/omero-ms-core
- https://github.com/glencoesoftware/omero-ms-thumbnail
- https://github.com/glencoesoftware/omero-ms-image-region
- https://github.com/glencoesoftware/omero-ms-pixel-buffer
25
![Page 27: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/27.jpg)
Deployment options
26
![Page 28: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/28.jpg)
Future directions
27
![Page 29: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/29.jpg)
Some results of speed
28
![Page 30: Riad Gozim€¦ · Microservices Riad Gozim 2018 OME Annual Users Meeting. OMERO - a recap 1. A quick refresh (IDR) Big data 46TB of data ... Introduction to gitlab/incubator OMERO.server](https://reader036.vdocument.in/reader036/viewer/2022070917/5fb73d756ba94f69f1226339/html5/thumbnails/30.jpg)
Lessons
1. Introduction to gitlab/incubator OMERO.server
2. Opening omero-all with an IDE
3. A bit about gradle
4. Building omero-all with gradle or IDE
5. Publishing to maven local
6. Creating an application to use omero-all
29