M - ALWAYS ON - Occasionally Connected Magic


Occasionally Connected - It keeps on working

We used to develop banking systems and even with unlimited funds, Systems fail - that's just the way it is. AAA is more robust however. AAA is built on an architecture called 'Occasionally Connected' and an engineering concept called 'State Machine replication in distributed computing' - We don't just 'interpret text', we manipulate objects and re-align their effect in time. This allows us to give tasks\jobs\workflow a given 'state' at specific points in time. Additions are then propagated to the other group members in the correct order as and when they synch. This makes the model 'immutable' and allows you to keep working even when off-grid. There are several terms used to describe such systems - Off-Line First, Progressive Web Apps and Connectivity-independent being in vogue at the moment.




When you create a group in AAA, it's a bit like creating a set of 'cryptocurrencies' that work together. Contrary to popular believe, blockchain technology has many uses, not just cryptocurrencies. It's still in it's infancy and AAA pushes the concept to use multiple blockchains. We do this for several reasons.

One reason is immutability. AAA has to work like a financial ledger. If an Action such as 'Administer 50mg of Drug X' has been used, it cannot be edited in the future. The only way to correct errors is as in financial systems where 'contra-entries' are added. AAA never really deletes anything as objects may have 'effected' other chains or objects in the group. A patient who owns their data can change data such as their address. AAA handles this by adding an 'Address Change' block to the chain. The amendment is recorded and cannot be removed. The 'change' is now an immutable entry in the block. AAA has many 'objects' and each has it's own blockchain each of which is unique to each group or patient. Outside of immutability, each chain also has different 'rules' or 'smart contracts' as to what it can and cannot do.

Every Group and Action or Task is it's own chain and every chain has an owner. This can be either the patient or the AAA group owner. Each starts with a 'Genesis' block and these chains are combined and cannot be altered. They can only be added to. In blockchain terms this means AAA actions that are applied are immutable. Each client in a group becomes a DAO (Decentralised Autonomous Organisation) and as a whole, they are known as a quorum. Each holds a copy of the database. Unlike traditional databases that can be updated, blockchain allows 'states' to be frozen in time - just like a financial ledger but many clients hold a copy so it's hard to make unauthorised changes. The rules are fixed so if one client rejects a transaction, all clients will do the same.

We don't use traditional blockchain hashing but we do hash in a different way by using a combination of UTC time, state latching and self checking validity algorithms. An AES encryption key is also used.

Tampering is instantly detected by all clients and the data is automatically rejected. In PAXOS terminology, the quorum knows 'something is not right' and the addition is not permitted.

For an Electronic Health Record or EHR this allows the patient to own their data, absorb new data and share it with who they need to. Medical professionals can, with the owners permission add to it in a predefined way. In blockchain terminology this is called a 'smart contract'. Trusted people can add to the chain with the owners permission. They can also add new 'Tasks' such as specialised treatments that are unique to any AAA group.

This also makes AAA extremely resilient to failure due to it's distributed way of working. As long as a single group members device is intact, data can be added and the entire database re-created on other members devices when they get new ones. Data is always available and can be used where ever and whenever it is needed - Anyplace, Anywhere and Anytime - AAA is 'Always On'.


Efficiency and Compression

AAA is extremely efficient in how it works. We only transmit the 'delta' of changes you make. If for example you only change a patients age, only the change of age is transmitted and not the entire patient record. On top of this, we then compress the data with an advanced compression algorithm which further reduces the data 'packet' size. Most AAA data packets are measured in bytes and not kilobytes. As an example of data size, a fully populated patient record (excluding image and multimedia data) with 5,000 'actions' or tasks each of which are again fully populated is transmitted as a compressed, encrypted packet in about 30 kilobytes - That's less than a single small JPEG on a webpage.

Smart Transmission

For every packet we then transmit, each and every one is 'transacted' and the system is resilient to duplicate data as each transaction is uniquely identifiable. If data is ever transmitted twice, the system knows this and ignores the duplicate.

Image, video and other patient attachments are also transmitted intelligently. If you have a 500Mb video file, AAA won't even attempt to transmit the file over 2G or 3G. It will wait till you have 4G or Wi-Fi.

 Loosely coupled and Highly fault tolerant

Our architecture also embraces a design goal of a 'loosely coupled' system in that a failure in any part of the system won't bring the rest of it crashing to it's knees or just plain dead. Azure has a 99.9% uptime SLA but we don't even rely on that. If our (georedundant) Azure storage fails, the data packets stay on the devices. If our (always-On, replicated) Azure databases fail, the data stays on our Azure storage until the servers come back on-line. The result is a highly reliable, fault tolerant system that is device independent. It rebuilds and reconfigures itself wherever it is installed and when any part of it fails, the preceding component is built to handle the failure. Everything is 'Transacted'. 


Occasionally connected works Anywhere

You don't need a connection to the web, Wi-Fi,2G, 3G - that means the top of Mt Everest, the Gobi desert, airplanes, helicopters, Ambulances, EMR shielded rooms, basements, Mars and Pluto. When we say 'Anywhere' we mean it.


AAA Works in disaster zones

Where there is no connectivity, Medics can record patient ailments, treatments and take their GPS position. When you connect again, all that data is made available to the rest of your team with the patients GPS location. Even if you change the model by adding a new type of task, that change is propagated to every member of your group in a way that ensures all the object changes needed to complete the task are made as well. The model and the logic it needs are delivered at the same time and in the correct order.

A paramedic in an ambulance that was in an area of no connectivity could for example take vitals, administer medications, take images, video, patient notes and observations. AAA will continually attempt to send this data until it is successful. The phone or device will automatically find the best available connection be it 2g,3g,4g or Wi-Fi as soon as it becomes available. Everything you do before you had a connection and everything you do when you are connected is recorded and transmitted to your group as soon as it can be. If the Ambulance crew were a member of the A&E group, all data, imaging and vitals will be available to A&E consultants before the patient arrives.


It's a modern world and  I.T. failures rarely happen - Right ?

Well, not as modern as you would think and when it does happen you'll probably find that nobody has a pen either. (Excluding the NHS 'wannacry' attack)

Here is a major UK hospital that had a power outage on 22nd July 2016 

The point to note is 'During the incident staff were unable to access IT systems which were temporarily unavailable'. Had AAA been available, every action that happened to every patient could have been recorded electronically. No entering ward names \ beds etc. As AAA builds the entire hospital automatically in seconds. Every instruction given by a doctor, medication administered, patient relocation would have been electronically recorded and could have been electronically input when the main system recovered.

A few shutdown by power outages in the last few months and we have not even looked at the outages that happen because of the I.T. systems themselves.

Royal Stoke University Hospital - 22 July 2016

Northwick Park Hospital 04th January 2016

Royal Berkshire Hospital 31 July 2015

Arrow Park Hospital 5th March 2015

Royal Free Hospital London - System Crash


Some large hospitals employ over 10,000 people. These people create a lot of data each and every shift and as we know, sometimes their I.T. systems fail. The cost of training these people for what to do in the event of a failure is significant. The effects of any of them not knowing what to do or doing it incorrectly does not bear thinking about. Many UK hospitals measure their 'un-keyed' data in 'Yards' - 100's of yards ! The reality is that this data will never be keyed - it's just 'missing'. A large hospital group in the USA had it's $1bn system operating in 7 hospitals go down. Sutter Health That's a lot of re-keying. AAA would not have been a total solution in that scenario but it would have eliminated all the scribbled notes and re-keying.


When connected, you can see waiting uploads and downloads - Synching happens automatically. We even have a live tile that works in the background.
With no connection, AAA just saves up your work and transmits it when it does manage to connect or you choose to. Everything is 'Transacted'



Let's consider a few AAA scenarios where we put occasionally connected technology to use :-

1) Your phone fails \ won't start \ you drop it in the ocean and it's lost.

With AAA just get another phone, in fact any phone or device, download the app, log in and all your group data will be re-built on your new device. You are good to go. Ubiquitous means we don't care which device. In a couple of years it could be your fridge or your shirt.


2) Your phone fails \ won't start \ you drop it in the ocean and it's lost AND the Azure cloud is down AND\OR your ISP is down AND\OR your Wi-Fi is unavailable.

Find another member of your group and from their device you will be able to see all your outstanding tasks and respond to them and treat your patients. Yes, you will have to share the device but no data will be lost and you won't be scribbling notes onto bits of paper.

When Azure is back up and you have a new device, all the data is again restored and no re-keying data from paper records was needed. Additionally no action was needed by us. AAA automatically detected it could make connections again and just carried on as normal.

As long as one device of any group member is running, AAA will continue to work and restore the data later.

The major difference here is that with any conventional system if either the cloud, your ISP or your Wi-Fi was down, NOBODY COULD WORK and everyone would have to revert to paper and the data re-entered at a later date.


3) If the system is down, how do we stop people performing the same tasks more than once ?

With a current conventional system, you will have to take a note of what your have done and leave some form of notification with the patient. With the current release of AAA, you would still have to leave some form of notification with the patient but for a future release of AAA we are planning an NFC patient bracelet that will record patient treatments and can be scanned by any offline AAA device. In any event, AAA aligns all transactions with UTC time and it will always deliver the latest version of an event.


AAA Keeps on Working - Always On means Always ON.