Multi-Tenant Architecture
Photo by Rüdiger Stehn, cropped, CC BY-SA 2.0
Definition
Multi-tenant architecture allows one instance of an application to serve multiple customers/organizations. Each customer/organization is called a tenant. Each has its own apparent separate application and is not aware of the other tenants. The tenant has the ability to customize their own UI, users and groups, etc. Every tenant typically has these features:
View: Tenants can define the overall styling to their application.
Business rules: Tenant can define their own business rules and logic for their application.
Database schema: Tenant can define their own database schema (real or apparent) for the application. They can add/remove database tables, rename database fields, etc.
Users and groups: Tenant can define their own rules to achieve data access control.
Types of multi-tenancy
There are 3 main types of multi-tenant architecture:
(1) Multi-tenancy with a single multi-tenant database: This is the simplest form of multi-tenancy. It uses single application instance and the single database instance to host the tenants and store/retrieve the data. This architecture is highly scalable, and when more tenants are added the …
rails architecture development
King Arthur Flour Recipes

We have been pleased to have King Arthur Flour (renamed King Arthur Baking in 2020) as a client for a few years. A year or so ago I started using some of their recipes, and their website has since become my go-to source for good baking recipes. I have used their flours a few times, but I am going to focus on their recipes in this post.
They have a ton of recipes. There are upwards of 30 recipes for different kinds of brownies alone. These include gluten free, fudge, raspberry, mint, you name it. The vast majority of recipes I’ve seen have at least a 4 star rating from the public. The recipes are organized into 9 major categories, which makes it easy to browse through recipes quickly.

Their customer service is amazing. Most recipes have several comments on them, and some have up to several hundred. Even with this many comments, if you leave criticism of the recipe, a KAF staff member will almost always answer with suggestions to make it work better. They also have a toll-free baker’s hotline, where you can call or email them with any baking questions, whether or not it’s related to their products!

clients tips
Recycling Web Workers: Just Proper Hygiene
Photo by Dano, CC BY 2.0
A long while back we were helping out a client with a mysterious and serious problem: The PostgreSQL instance was showing gradual memory growth, each of the processes slowly ballooning memory across a few days until the system triggered the OOM (out of memory) killer. Database at that point kicks out all connections and restarts. Downtime is bad, yo.
Spoiler alert: It was a prepared SQL statements bug in Rails. Sometimes it’s fun to take you through all the hair-pulling that goes into debugging something like this, but instead this Friday I’m feeling preachy.
Of course there’s a few different directions you could go to work around a problem like this:
- Update your framework. If, of course, the fix has been released, or determined in the first place. And if your application doesn’t have any compatibility trouble preventing it from running on the updated version, or you feel comfortable back-patching the fix yourself. And if the Change Management Officer doesn’t try to string you up for wanting to update production willy nilly. (Not everyone works at a startup!) But do add it as a milestone. It should be one anyway.
- Take a different code path. Feature …
database python ruby sysadmin
The End Point Design Process
Designing for the web means more than just creating beautiful websites—whether it’s a marketing site, an ecommerce platform, or a large-scale web application, thoughtful design means better, more intuitive user experiences. The design process provides a roadmap for developers and a shared set of expectations for the clients of what the final product will be.
If you’ve contracted End Point for design work, or you’re considering it, this post will show you all the steps as we go from an initial concept to a polished design that’s ready for development. You’ll also learn the basic vocabulary of deliverables and some of the tools involved in the process.
Phase I: Discovery
Every new app, website, or product starts with an idea. The initial phase of design work means clarifying that idea—defining its boundaries and goals. Thorough research and investigation are critical for setting the path to success. We interview our clients’ staff, stakeholders, and users to get a comprehensive picture of the current marketplace, discover any pain points in existing workflows, and learn what we can do to make things better. We also take an in-depth look at existing content and, with the client, …
design
Rails Active Storage
Overview
Active Storage is a new feature of Ruby on Rails 5.2 that provides functionality to upload files to the cloud, currently Amazon Web Services, Google Cloud, Microsoft Azure.
This gem attaches pointers to uploaded files to the Active Record object. It uploads the file asynchronously which reduces app server overhead, and it also doesn’t require adding a background job explicitly. Active Storage by default uses Active Job to upload the files.
Features of Active Storage
Mirror Service: This allows synchronization of the file between multiple cloud storage services. For example we have this config/storage.yml
:
development:
service: Mirror
primary: amazon
mirrors:
- azure
- google
The Mirror service first uploads files to Amazon S3. After that it pushes to Azure and Google Cloud. When we remove the file then first it removes it from Amazon S3 and after that it removes it from Azure and Google Cloud. This service is very helpful when we are migrating from one cloud to another.
Direct Uploads: Active Storage comes with a JavaScript library activestorage.js
. By using this library we can upload files from the front-end browser to cloud storage directly. Some events …
ruby rails
Vue in Ecommerce: Routing and Persistence
I recently wrote about Vue in Ecommerce and pointed to a handful of references to get started. Today, I’ll talk about using vue-router in a small ecommerce application, combined with vuex-persist for state storage.
I forked this Vue Shop on GitHub from Matheus Azzi. It was a great starting point for to see how basic component organization and state management might look in a Vue ecommerce application, but it is a single page ecommerce app with no separate page for a product detail, checkout, or static pages, so here I go into some details on routing and persistence in a Vue ecommerce application.
Vue Router
In looking through the documentation, I don’t see a great elevator pitch on what it is that Vue Router does. If you are new to routing, it’s a tool to map the URL request to the Vue component. Since I’m coming from the Rails perspective, I’m quite familiar with the Ruby on Rails routing from URL pattern matching, constraints, resources to Ruby on Rails controllers and actions. Vue routing via vue-router has some similar elements.
When you create a basic Vue application via vue-cli, you are given the option to include vue-router:
vue init webpack myapp
? Project name myapp
? …
ecommerce vue javascript open-source
Vue and Ecommerce: An Introduction
I speak the domain specific language of ecommerce, Ruby on Rails, JavaScript, and jQuery. Lately, I’ve been getting up to speed on Vue.js. I’ve been working on writing a small ecommerce site using Vue.js, because for me, creating an application addressing familiar paradigm in a new technology is a great way to learn.
Vue.js, initially released about 3 years ago, is a lightweight JS framework that can be adopted incrementally. In the case of my small example site, Vue.js serves the frontend shop content and connects to a decoupled backend that can be run on any platform of choice. On my path to get up to speed on Vue, I found great resources that I wanted to write about before I get into the details of my ecommerce app. Here they are:
- First, I started with the Vue.js documentation. The documentation is great as a starting point to understand some of the terminology. I often don’t love the documentation that comes with technologies, but I found the Essentials section in the Vue documentation to be a great launching point.
- After I worked through some of the Vue.js documentation, I did a simple search for “vue jsfiddle” and experimented with a few of those fiddles. Having come from a …
ecommerce vue javascript open-source
Sunsetting Piggybak, A Ruby on Rails Ecommerce Gem
Hi there! I’m Steph, the original creator and not-very-good maintainer of Piggybak, a modular ecommerce platform written in Ruby on Rails. With the help of End Point, I created Piggybak after building a custom Ruby on Rails ecommerce application for one of our clients here at End Point.
My goal with Piggybak was to create a lightweight, modular ecommerce platform in the form of a Ruby on Rails gem that could be combined with other Ruby on Rails gems for quick setup. Over the years, End Point has had much success working in Interchange, an ecommerce framework written in Perl. The web stack has evolved greatly over the years, as has the capacity for modularity and the ability to decouple front-end and back-end architecture.
Fast forward about 4 years after Piggybak was released, and we’ve decided to retire it. Not only did I leave the maintenance up to End Point after I left to work as an in-house software engineer for the last couple of years, but I was also in a position to evaluate using Piggybak as the base for a custom solution.
While I think there are some great Ruby on Rails gems to help support your ecommerce application (see below), one of the main things I realized was …
ecommerce ruby rails open-source