Avatar of Jeyabalaji Subramanian

Jeyabalaji Subramanian

CTO at FundsCorner

Recently we were looking at a few robust and cost-effective ways of replicating the data that resides in our production MongoDB to a PostgreSQL database for data warehousing and business intelligence.

We set ourselves the following criteria for the optimal tool that would do this job: - The data replication must be near real-time, yet it should NOT impact the production database - The data replication must be horizontally scalable (based on the load), asynchronous & crash-resilient

Based on the above criteria, we selected the following tools to perform the end to end data replication:

We chose MongoDB Stitch for picking up the changes in the source database. It is the serverless platform from MongoDB. One of the services offered by MongoDB Stitch is Stitch Triggers. Using stitch triggers, you can execute a serverless function (in Node.js) in real time in response to changes in the database. When there are a lot of database changes, Stitch automatically "feeds forward" these changes through an asynchronous queue.

We chose Amazon SQS as the pipe / message backbone for communicating the changes from MongoDB to our own replication service. Interestingly enough, MongoDB stitch offers integration with AWS services.

In the Node.js function, we wrote minimal functionality to communicate the database changes (insert / update / delete / replace) to Amazon SQS.

Next we wrote a minimal micro-service in Python to listen to the message events on SQS, pickup the data payload & mirror the DB changes on to the target Data warehouse. We implemented source data to target data translation by modelling target table structures through SQLAlchemy . We deployed this micro-service as AWS Lambda with Zappa. With Zappa, deploying your services as event-driven & horizontally scalable Lambda service is dumb-easy.

In the end, we got to implement a highly scalable near realtime Change Data Replication service that "works" and deployed to production in a matter of few days!

25 upvotes1.9M views

At FundsCorner, when we set out to pick up the front-end tech stack (around Dec 2017), we drove our decision based on the following considerations:

(1) We were clear that we will NOT have a hybrid app. We will start with Responsive Web & once there is traction, we will rollout our Android App. However, we wanted to ensure that the users have a consistent experience on both the Web & the App. So, the front-end framework must also have a material design component library which we can choose from.

(2) Before joining FundsCorner as a CTO, I had already worked with Angular. I enjoyed working with Angular, but I felt that I must choose something that will provide us with the fastest time from Concept to Reality.

(3) I am strong proponent of segregating HTML & JavaScript. I.e. I was not for writing or generating HTML through JavaScript. Because, this will mean that the Front-end developers I have to hire will always be very strong on JavaScript alongside HTML5 & CSS. I was looking for a Framework that was on JavaScript but not HEAVY on JavaScript.

(3) The first iteration of the web app was to be done by myself. But I was clear that when someone takes up the mantle, they will be able to come up the curve fast.

In the end, Vue.js and Vuetify satisfied all the above criteria with aplomb! When I did our first POC on Vue.js I could not believe that front-end development could be this fast. The documentation was par excellence and all the required essentials that come along with the Framework (viz. Routing, Store, Validations) etc. were available from the same community! It was also a breeze to integrate with other JavaScript libraries (such as Amazon Cognito).

By picking Vuetify, we were able to provide a consistent UI experience between our Web App and Native App, besides making the UI development ultra blazing fast!

In the end, we were able to rollout our Web App in record 6 weeks (that included the end to end Loan Origination flow, Loans management system & Customer engagement module). www.jeyabalaji.com

Advanced features of Vue using Vuetify in 10 minutes (medium.com)
23 upvotes2 comments448.6K views
Normando Zubia
Normando Zubia
March 7th 2019 at 5:28PM

Hi Jeyabalaji!!

Thank you for sharing us your decision.

I'm experimenting with Vuejs and it seems very good approach. Do you recommend some material to begin with this framework? Im interesting in the essential tools to have a good production app. Also, What technology did you use to the back end? and What hosting did you use for your platform?


Jeyabalaji Subramanian
Jeyabalaji Subramanian
March 10th 2019 at 1:40AM

Hi Normando,

Happy to help! You can look up the official documentation page for Vue (https://vuejs.org/v2/guide/), which is the most comprehensive material of Vue. I referred to all the sections and tinkered around to get a grip before I proceeded. The documentation is excellent!

Since you will be building a SPA (Single Page App), the backend really does not matter. We us Python extensively, but nodejs would work well too. There is no difference since the server here just passes around json.

You can host either on S3 bucket or use netlify, depending on your needs.

Please let me know if you have any further questions!


At FundsCorner, we are on a mission to enable fast accessible credit to India鈥檚 Kirana Stores. We are an early stage startup with an ultra small Engineering team. All the tech decisions we have made until now are based on our core philosophy: "Build usable products fast".

Based on the above fundamentals, we chose Python as our base language for all our APIs and micro-services. It is ultra easy to start with, yet provides great libraries even for the most complex of use cases. Our entire backend stack runs on Python and we cannot be more happy with it! If you are looking to deploy your API as server-less, Python provides one of the least cold start times.

We build our APIs with Flask. For backend database, our natural choice was MongoDB. It frees up our time from complex database specifications - we instead use our time in doing sensible data modelling & once we finalize the data model, we integrate it into Flask using Swagger UI. Mongo supports complex queries to cull out difficult data through aggregation framework & we have even built an internal framework called "Poetry", for aggregation queries.

Our web apps are built on Vue.js , Vuetify and vuex. Initially we debated a lot around choosing Vue.js or React , but finally settled with Vue.js, mainly because of the ease of use, fast development cycles & awesome set of libraries and utilities backing Vue.

You simply cannot go wrong with Vue.js . Great documentation, the library is ultra compact & is blazing fast. Choosing Vue.js was one of the critical decisions made, which enabled us to launch our web app in under a month (which otherwise would have taken 3 months easily). For those folks who are looking for big names, Adobe, and Alibaba and Gitlab are using Vue.

By choosing Vuetify, we saved thousands of person hours in designing the CSS files. Vuetify contains all key material components for designing a smooth User experience & it just works! It's an awesome framework. All of us at FundsCorner are now lifelong fanboys of Vue.js and Vuetify.

On the infrastructure side, all our API services and backend services are deployed as server less micro-services through Zappa. Zappa makes your life super easy by packaging everything that is required to deploy your code as AWS Lambda. We are now addicted to the single - click deploys / updates through Zappa. Try it out & you will convert!

Also, if you are using Zappa, you can greatly simplify your CI / CD pipelines. Do try it! It's just awesome! and... you will be astonished by the savings you have made on AWS bills at end of the month.

Our CI / CD pipelines are built using GitLab CI. The documentation is very good & it enables you to go from from concept to production in minimal time frame.

We use Sentry for all crash reporting and resolution. Pro tip, they do have handlers for AWS Lambda , which made our integration super easy.

All our micro-services including APIs are event-driven. Our background micro-services are message oriented & we use Amazon SQS as our message pipe. We have our own in-house workflow manager to orchestrate across micro - services.

We host our static websites on Netlify. One of the cool things about Netlify is the automated CI / CD on git push. You just do a git push to deploy! Again, it is super simple to use and it just works. We were dogmatic about going server less even on static web sites & you can go server less on Netlify in a few minutes. It's just a few clicks away.

We use Google Compute Engine, especially Google Vision for our AI experiments.

For Ops automation, we use Slack. Slack provides a super-rich API (through Slack App) through which you can weave magical automation on boring ops tasks.

Patterns for infinitely scaling & cost effective serverless microservices鈥娾斺奝art 3 (medium.com)
16 upvotes779.5K views

Database is at the heart of any technology stack. It is no wonder we spend a lot of time choosing the right database before we dive deep into product building.

When we were faced with the question of what database to choose, we set the following criteria: The database must (1) Have a very high transaction throughput. We wanted to err on the side of "reads" but not on the "writes". (2) be flexible. I.e. be adaptive enough to take - in data variations. Since we are an early-stage start-up, not everything is set in stone. (3) Fast & easy to work with (4) Cloud Native. We did not want to spend our time in "ANY" infrastructure management.

Based on the above, we picked PostgreSQL and MongoDB for evaluation. We tried a few iterations on hardening the data model with PostgreSQL, but realised that we can move much faster by loosely defining the schema (with just a few fundamental principles intact).

Thus we switched to MongoDB. Before diving in, we validated a few core principles such as: (1) Transaction guarantee. Until 3.6, MongoDB supports Transaction guarantee at Document level. From 4.0 onwards, you can achieve transaction guarantee across multiple documents.

(2) Primary Keys & Indexing: Like any RDBMS, MongoDB supports unique keys & indexes to ensure data integrity & search ability

(3) Ability to join data across data sets: MongoDB offers a super-rich aggregate framework that enables one to filter and group data

(4) Concurrency handling: MongoDB offers specific operations (such as findOneAndUpdate), which when coupled with Optimistic Locking, can be used to achieve concurrency.

Above all, MongoDB offers a complete no-frills Cloud Database as a service - MongoDB Atlas. This kind of sealed the deal for us.

Looking back, choosing MongoDB with MongoDB Atlas was one of the best decisions we took and it is serving us well. My only gripe is that there must be a way to scale-up or scale-down the Atlas configuration at different parts of the day with minimal downtime.

These superpowers of MongoDB will convince you to make the move (medium.com)
12 upvotes3 comments85K views
Gokhan Boranalp
Gokhan Boranalp
February 14th 2019 at 8:16PM

mongodb is a BIG mistake. RUNAWAY when you have time!

Jeyabalaji Subramanian
Jeyabalaji Subramanian
February 15th 2019 at 4:44AM

Thanks for your feedback. Could you please elaborate a little more on what issues you faced? It would be great if you can drop your valuable feedback at jeyabalaji@fundscorner.com Thanks!

Normando Zubia
Normando Zubia
March 7th 2019 at 5:43PM

I think that mongodb is not a "Big" mistake, but it depends of the application.

Mongodb is very flexible in certain operations and has most of the functionality of other databases, I think is the perfect choice for start ups or projects that need a very fast development. If mongodb were a big mistake, mongodb would not be used by 12.k stacks.

Shared insights

Recently we were looking for a tool to build cross platform mobile apps. The primary goals for us were two fold:

  1. Ability to rollout the mobile app fast. Being in the FinTech segment, our focus is more on usability & accuracy and less on the flashiness of the app in itself
  2. Our web development team must be able to build the mobile apps. The UI & UX fundamentals are pretty much the same.

With the above in mind, we evaluated React Native, Vue Nativescript and Flutter. While we were able to build fast in all these three choices, we chose Flutter for the following reasons:

Pre-built widgets: All the standard widgets that are required for us to build a functional app were readily available, & required minimal or no tweaking! It was pretty much like cooking up something on the web with Vue & Vuetify, which offer the fastest time frame from code to reality. The key differentiation Flutter offers over it's rivals is the native feel you get on all the widgets. No one can figure out whether it was built in Native android or Flutter.

Availability of Pre-built widgets in Flutter makes it a natural choice for going the fastest from design to reality.

Easy programming constructs & Hot Re-load: The component coding for Flutter is done through Dart. It is kind of a cross between Java & JavaScript. It is easy on the developers. I found asynchronous programming in Dart a breeze! Dart is one of the key reasons why you would build an app in record time with Flutter. Also, you will love the hot reload feature in Flutter, through which you can immediate validate the user interface and interactions.

Hot Re-load is one of the key features that makes development in Flutter a breeze.

Rich set of plugins & great documentation: Flutter eco-system has matured over a period of time. We were able to easily find solutions to various problems & all the plugins worked without breaking anything. For example, we wanted to build a web view for integrating with a Payment link & flutterwebviewplugin was readily available and we were zooming in less than 30 minutes!

With great documentation and eco-system, you are always a plugin or a widget away from completing your functionality!

Great support for Reactive State Management: We were spoilt for choices when we looked at the various options for implementing Reactive statement management. After looking at a number of options, we settled with RxDart and Provider Consumer (Bloc) pattern to implement reactive statement management.

You will be able to apply your hard earned reactive statement management skills in Flutter seamlessly & built beautiful reactive apps.

Easy integration with Android Native SDKs: Flutter provides platform interface to integrate with Native SDKs. Being in the FinTech industry, we were required to integrate with a number of industry standard SDKS for payments & KYC, which were available only in Native. We were to connect with these SDKs and code with ease with the platform interface.

In the end, we were able to build and release an end to end, material design compliant and functionality rich Borrower app within a matter of month and release it for Beta preview! If we had started out

With the announcement of Flutter for Web in this year's google I/O, I think Flutter is going to go big and will shake up the world of cross-platform development.

Flutter - Beautiful native apps in record time (flutter.dev)
4 upvotes20.6K views