Aug. 25th, 2018

mtbc: maze J (red-white)
Recently I have had a few instances of my sleep not being good. I don't keep waking up but it can take me a while to get to sleep and I often wake too early. Last night I did feel tired, I went to lie in bed, then instead of losing consciousness I began to think about how to sequence a rearrangement of my financial accounts. (The main conclusion is: close a savings account now.) I came downstairs and took some notes about that in the hope of getting them out of my head so I could sleep. With the weekend I figured that at least I could make up for it in the morning but, no, I was awake by 7am. I did still get a good few hours' sleep but certainly not as much as I had hoped for.

I don't know how good my sleep is. I remain unconscious but a few days ago I was awake by 5am and later that day [personal profile] mst3kmoxie remarked that I had sounded quite distressed shortly beforehand so perhaps an unremembered nightmare woke me. I wonder what changed: I used to be able to sleep on past 8am and maybe even near 10am on mornings that don't require me up and about early. I also noticed that I need my reading glasses more often which I expect is due to tiredness.

I try not to nap in the daytime: at least some reading suggests that the best way to keep one's nightly sleep on track is to be reliable about when one gets up in the morning and everything else should fall into place. But, I am having too many days lately for which I'm kind of tired throughout.
mtbc: maze C (black-yellow)
Despite my tiredness I seem to remain effective at my day job. Last week mostly I focused on improving the process by which microscope images are transferred from client software into the OMERO server. This is a complex process with many substeps and variables depending on configuration and the kind of image data being imported.

I was largely productive but did run into a couple of interesting issues. One is that I had found my way to Java's ExecutorService class but would prefer to be notified when any of the submitted threads complete without having to poll them. I now find that the easiest solution may be to use ExecutorCompletionService so that will be a task for Monday.

Another issue is that for writing the imported image files on the server, together with parent directories, the import is running in the context of a single database transaction and our file storage has the actual filesystem objects but also corresponding ownership metadata in a database table that allows OMERO's permissions system to determine quickly who may access the file. The server complains when there is a database row or a filesystem object but not both.

There is a race condition when multiple imports need to create the same parent directory. One thread may create the filesystem object and write the ownership information. Before that thread's transaction commits, a different thread may detect that the filesystem object already exists and, thanks to isolation, not see the corresponding ownership information anytime soon. So far an easy but robust solution to this has not come to my mind. I do provide the workaround of allowing users to configure the server so that image data is written within a parent directory named for the server thread that is managing the import.

Profile

mtbc: photograph of me (Default)
Mark T. B. Carroll

December 2025

S M T W T F S
 12 3456
78910111213
14 15161718 19 20
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 30th, 2025 02:33 pm
Powered by Dreamwidth Studios