A Simple Web Application Architecture Using GitHub, AWS S3, Deploy, and FME Cloud
Web architectures often have multiple tiers and can end up getting complicated especially if they are built to scale. FME Server/Cloud allows you to take your FME workflows to the enterprise by creating web services out of them.
We now have a managed and hosted FME Server offering through FME Cloud which takes some pain away, but how do you integrate FME Cloud into a standard web architecture?
Our Requirements for New Web Application Architecture
At Safe we just began moving all of our FMEpedia demos over from an FME Server we hosted ourselves to an FME Cloud instance. I thought I would walk you through our architecture and discuss a few things we have implemented to automate tasks.
Here are the requirements of the new architecture:
- Everything must be hosted in the cloud. We did not want to open up a gap in Safe’s firewall.
- The architecture had to be as simple as possible and easy for the team to use and maintain.
- It had to be reliable and cost-effective.
This approach is probably suited to medium/small scale web applications.
4 Steps to Make GitHub, AWS S3, Deploy, and FME Cloud Work Together
This is how they work together:
Step 1: Develop code
Write web application code and FME Workspaces and then push the code to GitHub. Safe Software now has a profile on GitHub where you can find all of the FMEpedia demos. Feel free to follow them and you will receive notifications when we update them.
Step 2: Auto deploy web code
I wanted a process which enabled developers to very easily push code to the production web server. We use Deploy which is a web service that allows you to watch branches on GitHub. Whenever a developer pushes to the branch (in our case production) it automatically deploys those commits to AWS S3.
Step 3: Deploy FME Workspaces
The FME workspaces which the web application is using now needs publishing to the FME Cloud machine from FME Desktop. This is a very simple process, simply launch the FME Server publish wizard in FME Desktop.
Step 4: Serve content
One of the coolest things I found from this project was that you could host a static website on AWS S3. This pairs well with FME Cloud as tasks that might have traditionally been handled by server-side scripts, such as PHP, can instead be handled by FME Server.
It took less than 10 minutes to set everything up, upload the web content to the bucket and flip the DNS over. The best thing is we leverage the scalability and reliability of S3 and the costs are incredibly low.
This is a very simplistic setup with no test or staging environments and no automated testing but it serves us well. What services are you using to integrate your web applications with FME Server?