Multitenancy e-commerce platform
I have interned in the Presence and Commerce department at, LLC, and this is the project I have participated.

During my intern at, I have worked with the e-commerce team in the Presence and Commerce department. My main job is working on the research and implementation of GoDaddy’s e-commerce platform.


I have participated in the evaluation of current major open source e-commerce frameworks. The Frameworks I have evaluated are Spree with Rails, Oscar with Django, and BroadLeaf with Spring.

Along with my colleagues, we have evaluated frameworks in the following criteria.

  • License type.
  • Supported features.
  • Compatibility with desired HLA.
  • Code style and design (OO design, performant, extensible, etc).
  • Mature and stable (documentation, test cases, development process, etc).
  • Security.
  • Community support and reputation.
  • Current usage of the frameworks.

After the evaluation, we have generated reports to discuss the situation of each e-commerce platforms, which then helped the decision making of future implementation and development of our e-commerce product.


After the evaluation of e-commerce frameworks, I have participated in the development of our e-commerce product. Below are some major parts I have contributed:

Database Routing

Our e-commerce product is a multi-tenancy SaaS application. Due to the design and legacy code issues, our approach in database design is to create one database per tenant; also, in order to make the architecture more scalable, we want to distribute tenant databased in different physical database servers. Thus, we have to route each incoming request to correct tenant database.

My primary contribution here was to update an database routing library to fit our needs as described above. The approach is to insert a middleware to connect active record to the correct database before the request hitting the rails stack. Thus, an abstraction could be created to let module out the database routing functionality from the e-commerce app features.

Thread Safety of AR

While working on the database routing stuff, we have found one problem with ActiveRecord 3.2.14 – that in the case of multiple threads, database connection will be override in our approach. After doing extensive research on this problem, I have identified the problem is from the ConnectionPool class of ActiveRecord. With minimum monkey patching on the ConnectionPool class, this problem is solved.

Even though this override is tested and reviewed, we have chose not to use it since we have decided to use Passenger, a single thread app server. This design selection could solve the multi-threads issue completely without modification on the rails framework.

Single Sign-on System

I have also participated in the implementation of the Single Sign-on System for our e-commerce platform to integrate with the company’s internal services. With the single sign-on system, customer could login once and access the e-commerce product from their central control panel.

Evaluate and modification of existing extensions

In addition to the work above, I have helped in the evaluation and modification of various extensions of the Spree platform. Those extensions involves real-time shipping quote, invoice generation, and many other features required by a e-commerce platform.