It surprised me when I was doing most of the development of this project, that it took such a lot of effort to get the software ‘infrastructure’ working to have the app remember settings, cope with upgrades, warn the user when something is not working etc. It took considerably more effort to get all that infrastructure working than to do the technical bits to do with seizure detection……
You may remember that last winter I started to think about making a machine learning seizure detection algorithm to improve the seizure detection reliability and reduce false alarms. To do this will need a lot of data from users, and I will need them to label the data, at least to say which data is a real seizure compared to something else that may trigger an alert.
To collect and process this data needs a few things to be sorted out:
- Privacy Agreements: At the moment I do not collect any data about users, but if we do this I will collect data about you, and what you were doing when the data was measured – we will need some sort of agreement about what I can do with this data and how I will protect it (I don’t want to get summoned in front of the Information Commissioner for a breach of GDPR!).
- I’d be interested to know how users feel about this, and what sort of agreement you think we should have, and what limits you would want on your data
- In an ideal world I would like to publish an anonymous dataset that other researchers and developers could use to compare seizure detection algorithms – would users be ok with this or would that be an issue?
- Software Infrastructure: I will need an online database and provide a web interface so the OpenSeizureDetector app can send data to it, users can log into it to mark the data with seizures or other activities, and I can download the data for processing. I have a few options for this, and if any users have more experience than me in this area, I’d be interested in your input before I get too far down one route….
Software Infrastructure Options
Sorry for the geeky jargon – I hope that people that can offer opinions on it for me will understand!
What we need is:
- Server: I could use a computer at home which would give me plenty of control over it, but would also mean that I was responsible for all the security on it, so a remote server would be best. The one I use for the OpenSeizureDetector web site is nice and cheap, so it would be good to serve the database off that.
- Database – I’d use MySQL because I have used it before (PostgreSQL is another option). But nowadays there are things like MongoDB ‘schema-less’ databases – I don’t think there is any particular advantage for me going down that route, but I am open to persuasion.
- Web Page to allow users to see what data we have, and correct any errors in classification (e.g. mark seizures)
- REST API for the OpenSeizureDetector app to upload data, and for my analysis code to be able to access the data. To stop me worrying so much about security I would use a popular framework.
- I’d like to use Django because that is based on python, and the analysis code will also use python so I might avoid having to write data access routines twice. BUT my current web hosting provider (CloudNext.co.uk) only has Python 2.6 installed (and I am trying to convert myself to Python 3.x), and I do not have shell access to configure it, so I think it would be difficult to get it working, unless I moved to another (probably more expensive) hosting provider.
- An option that would allow me to retain my current hosting provider is CakePHP which uses the PHP language. I don’t like it as much, but it would save the hassle of moving providers.
- Does anyone have another suggestions?
So unless someone has a better idea I am going to go for the following software infrastructure:
- MySQL Database
- CakePHP providing web interface and REST API
- The web pages will be simple, because going for a single page web app will be quite an undertaken just for a bit of infrastructure!
- Running on my CloudNext hosting provider.
Is there a better way I should be looking at? Any thoughts to graham@openseizuredetector.org.uk please!