Five Architectures You Can Quickly Prototype on PaaS
I run Dev Spotlight - we write tech content for tech companies.
Sometimes, as an architect or developer, you want to try a new architecture or technical solution but just can't seem to find the time to install, configure, debug, and figure out an entirely new concept. Experimentation is a lot of work, project deadlines come first, and new tech is often one of your last priorities.
However, Platform as a Service (PaaS) can help. One of the advantages of PaaS is the speed and simplicity of pre-configured deployments. You can scroll through a list of options, click a button or two, and have a reference architecture or sample project deployed, running, and ready for experimentation within minutes.
In this article, we'll review five of these architectures you can quickly try out using PaaS. Most all PaaS platforms support prototyping. For our examples, we’ll use Heroku and its “one-click deploys
” and Terraform
scripts since they are easy to use. You’ll need a Heroku account to get started, though the basic free plan works for most of these examples (I'll note where you need more).
1. RESTful Apps Using the MEAN Stack
- Creates a RESTful API service in Express and Node.js
- Connects a MongoDB database to the API server
- Creates a rich web app using Angular
Alternatively, from that same link, you can walk step-by-step through a tutorial to create and deploy the app yourself.
2. Asynchronous Web Workers
Long-running server requests can kill the performance and scalability of your app. The standard way to handle these issues is to use asynchronous web workers to complete the task
. Moving the long-running tasks to background workers frees up resources and keeps your app responsive.
Example architecture using background services for tasks
One popular way to implement asynchronous web workers is with a queue. A queue takes work requests from the client, stores them, and guarantees hand-off to a pool of workers. This reference architecture
implements this very design using Java, Spring MVC
, and AMPQ
To get started, you can easily clone this project
for your own experimentation. The project creates:
- Web - A Spring MVC app that receives web requests and queues them in RabbitMQ
- Worker - A standalone Java app using Spring AMPQ to read and process the messages from RabbitMQ
The reference architecture also includes a walk-through of the key classes in the project.
3. Reactive Integration with Salesforce
Salesforce is ubiquitous in the tech community
. Its tools and platform are used for a wide variety of purposes well-beyond basic CRM. Tying into the Salesforce ecosphere to watch or react to events is a common need.
This reference architecture
takes advantage of Salesforce Platform Events and Change Data Capture to create an app that responds to Salesforce activity.
The app has a web-based UI and two server-side processes:
- stream-consumer.js – The Salesforce Streaming API consumer
- server.js – Serves the web app and API feed of account changes to the web browser
Here is the basic architecture of the deployment:
Overview of reactive integration with Salesforce
This deployment takes a little more than just a single click, since Salesforce setup can be pretty involved. However, this sample app should give you a quick and easy way to understand and test Salesforce integration.
4. Event-Driven Microservices
- You have a large number of microservices that need to communicate asynchronously.
- You want your microservices to be decoupled, fungible, and independently maintained.
- You have one or more services that produce events that need to be processed by many services.
- You want to use a microservices communication pattern that is more decoupled than the typical HTTPS approach.
With this reference architecture
you can deploy a full, working implementation of an event-driven Apache Kafka architecture consisting of a client, producers, consumers, and dashboards. You’ll need to do a little prep work on your environment first, but once it’s set up, you can deploy this entire sample project using just a one-click Terrascript.
*Note: You'll need a standard plan
to deploy this reference architecture.
5. Private Multi-Cloud Communication
If you’re running an AWS service such as Redshift
or RDS in an Amazon VPC
, you may be looking for a way to connect your app to those services over a private connection. This sample project implements private, multi-cloud communication so your app can communicate with your AWS services privately, without traversing the public internet.
This may be useful if you’re using an Amazon Redshift cluster to analyze data. You can connect the VPC to your application and securely transfer data from your Postgres database to the Redshift cluster for analysis.
This Terraform script
is easy to deploy and creates a simple implementation of private multi-cloud communication. When you run the script it:
- Creates an Amazon VPC together with an Amazon Redshift Cluster
- Peers the Heroku Private Space and the VPC, and sets up the appropriate security groups
- Deploys a Redshift client application to Heroku that connects to the Redshift database
Private multi-cloud communication
The setup has a few steps, and you’ll need to be familiar with managing VPCs, but you’ll be up and running with a secure connection quickly.
*Note: Yo'u'll need an enterprise plan
to deploy this example (in order to have a Heroku Private Space)
PaaS offers not only ease of deployment and DevOps relief, but also a quick, efficient way to test out new architectures and technologies.
Subscribe to get your daily round-up of top tech stories!