-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Horizontal Scaling: Read-Only #71
Comments
First push of
/cc @dpwrussell, @joshmoore, @dsudar |
@chris-allan Great. I guess there isn't really anything for us to test in our domain at this point? |
@dpwrussell: Not at the moment, no. Aside from the obvious brain dead simple |
@chris-allan Initially being able to do basic listings (e.g. images in dataset), then get the metadata for those objects, and then being able to get pixels for those objects. Basically exactly what you would expect if someone was running an analysis job. |
Pull request from @joshmoore attempting to get the /cc @dpwrussell |
History, state of play, and rationale
Read-only versions of OMERO are applicable to many use cases. A few are outlined below:
Adding more READ capacity and load balancing an OMERO server cluster; either on the same machine or on separate machines.
Allow for operations upon a read-only PostgreSQL database snapshot or replica. Examples of this include, but are not limited to: full-text indexing, expensive query isolation, and immutability.
Overview
Phase I
The first major step is to enable a read-only version of the OMERO server. This requires read-only access to the filesystem and database. A crucial component of this work is to divorce the session store from the OMERO instance. Initially pure, in memory sessions will be utilized when the server is started in read-only mode to avoid the current read-write requirement on the session store. The default session storage is currently the database. As a consequence, sessions will not be portable between servers when started in read-only mode.
The result of this work would be an ability to specify an alternate hostname:port combination and get a connection to an OMERO server instance that would only allow read-only operations. Attempted write operations should throw an exception so that mistaken attempts to use write operations can be handled. Additionally, clients would be able to ask the server on login or a service on retrieval whether or not a read-only flag had been set to avoid such exceptions.
This would of facilitate load balancing and utilization of the read-only instance "by configuration".
Phase II
Building on phase I, this phase would be the pursuit of cluster-wide session storage, allowing for the portability of sessions between instances regardless of the running mode, read-only or read-write, of the server.
Current work
Creating a read-only database user for testing
Assuming that you have created OMERO databases and set owner of that database to "omero" protected by password authentication you can create a new user "omeroro" with a password of your choice:
If you then connect to the OMERO database with this user, as allowed by
pg_hba.conf
, you will be able to list the tables (interrogate the schema) but not perform queries against the database:You can then, as a PostgreSQL superuser,
GRANT
the "omeroro" user the ability to runSELECT
statements on the database:NOTE: This assumes no other tables are in the schema "public".
You are then able to execute
SELECT
but notUPDATE
orINSERT
statements against the database:This should also prevent any adverse execution of PostgreSQL functions.
Enabling in-memory Node, Session, Event support (read-only)
Coupled with the aforementioned database user privileges and a build of OMERO 5.2.x with the development branch included a "read-only" server can be achieved with the following OMERO configuration:
OMERO 5.2.x
After several discussions with the greater OME consortium it was decided that development work take place atop the current stable
dev_5_2
branch of OMERO. This will allow for easy integration and testing against the current stable release of OMERO by third parties and especially by the IDR subteam. It will also allow easy integration into the currently available version of OMERO Plus. All of these constituents are utilising 5.2.x as a basis for their work.Development branch:
glencoesoftware/openmicroscopy@read-only-phase1
Implemented features:
Implementation of
InMemorySessionManagerImpl
as a shim forPostgresSqlAction
Implementation of
InMemoryNodeProvider
as a shim forNode
creation and OMERO.grid cluster membershipImplementation of
InMemoryEventProvider
as a shim forEvent
creationBasicSecuritySystem
andCurrentDetails
extensions to better work with in memory sessionsAllowing for server startup
dbpatch
updated with the latest Bio-Formats enumeration update and overall database session cleanupFull handling of the "internal" administrative session
Allowing for "user" session creation
Allowing for the use of
IQuery
at a basic levelOngoing work:
Processor
and correspondingJob
database interactionOMERO 5.3.x
Decisions on targeting OMERO 5.3.x will be made at a later date.
Related reading
History
Fri 31 Mar 2017 17:13:35 BST
: Updated documentation for read-only modeThu Feb 16 08:33:04 PST 2017
: First version of a running server withIQuery
possibility at a basic levelWed Jan 25 06:02:10 PST 2017
: Initial versionThu Jan 26 05:01:30 PST 2017
: Links to service routing and 5.2.x development planThe text was updated successfully, but these errors were encountered: