Lot of Lift and Shifts from on-prem to Cloud are happening these days as organizations catch up to the benefits of moving from limited on-prem resources to “un-limited” cloud potential and pay as you go and only pay for what makes you go.
Maximo on cloud for any organization which relies on their EAM systems to run their business needs to be fault tolerant, highly available and scalable.
We design architectures like Horizontal/Vertical or even Hybrid Application clusters but document attachments still are files on disk.
That disk now needs to be available to Multiple Nodes/Servers, Availability Zones (AWS terminology) and regions (if you have global presense).
Ok enough, read below how to get Maximo Document Attachments stored in AWS S3 bucket and served from there when user wants to view.
S3 buckets are cheap storage (glacier is cheaper but thats for less frequently accessed data, so more like archive), can be cross replicated across Regions, versioned, encrypted and has 99.9% availability SLA from AWS.
In picture the steps are below:
The thing that makes it most easy is the abstract class in Maximo specifically designed to aid in custom/bespoke Document Storage solutions:
I have extended this class and implemented the required abstract methods and one of the most important one is “createAttachment”. This is the method that will be called when any attachment is added to a record in Maximo.
There is a system property (if not there ADD it), “mxe.attachmentstorage”, this property holds the fully qualified class name of our custom implementation of AttachmentStorage Abstract class.
That’s how our custom class will be called when any attachment is added to maximo records.
Methods implemented if you just want to add attachments:
public abstract String getAttachmentQualifiedName(MboRemote paramMboRemote, String paramString)
throws RemoteException, MXException;
public abstract void createAttachment(String paramString1, byte paramArrayOfByte, String paramString2)
throws RemoteException, MXException
We need to add a few system properties if we want to make our implementation configurable, below:
mxe.s3.accesskey – Access Key for AWS IAM user, with S3 bucket access
mxe.s3.secretkey – Shhhh…its the secret key, like a password
mxe.s3.bucket – like a folder where files will be stored
mxe.s3.region – Region, bucket resides,cross replication can put it anywhere
I am putting this working solution in a GITHUB repo (below), if interested just let me know.
There are a few prerequisites:
- Need all the library jars which AWS Java SDK needs
- IAM User and Bucket creation
Next Steps (wishlist):
- Use TransferManager in AWS SDK so large files are transfered more efficiently and fast
- Implement Aspera FASP file uploads (https://www.asperasoft.com/) to S3 – Did it for a bespoke application where-in large (GB) files were transferred 10x faster from local to S3 buckets
- SharePoint Integration with Maximo attached documents
- Implement for IBM CLoud and Google Cloud
- Implement streaming (there is a method streamAttachment for that or maybe not) using Amazon Managed Streaming for Kafka for large files like video streams from Drones gone out for some inspections
- Anything else???