Architecture - TraderPlan/wiki GitHub Wiki
TraderPlan under the hood is a distributed multi-tiered enterprise application primarily written in Java. We have an agile development environment where we release bugfixes and features every two-weeks or less. The codebase follows object-oriented design and test-driven development principles. This allows us to provide a highly adaptable and robust solution that supports numerous complex use-cases.
The architecture can be described in tiers:
Front End
We use Discord to provide a command-driven UI. Originally designed for gamers, it has quickly become a home for cryptocurrency investors world-wide. Discord provides a simple, secure, flexible and fast platform for communication between TraderPlan servers and users. We use the Javacord library for controlling the bot on Discord.
We use Angular and Meteor to provide a real-time interactive web interface where data is displayed and entered. Additionally, we utilize D3, Bootstrap, and other HTML5/Javascript frameworks that are responsible for layout and graphics.
Angular is a mature open-source web framework maintained by Google and the community. It closely aligns with our modular enterprise architecture and best-practice development principles. It's an ideal framework for building complex applications that require intensive two-way data processing.
Meteor, when combined with Angular, significantly increases the speed at which we can develop new features.
Back End
TraderPlan's business logic is written in Java and executed on cloud servers. For all of TraderPlan's data storage, we use MongoDB. MongoDB supports atomic write operations, concurrency control, replication and security. This ensures the integrity, availability and security of TraderPlan data.
We use the Spring framework to implement microservice architecture and to interface with various web and database services.
Cloud Hosting & Architecture
We use a 96 CPU GKE (Google Kubernetes Engine) cluster across three regions running 10+ microservices. One of the services is our MongoDB cluster.
Each microservice is triple redundant, and load is automatically shared between them. If one of the services fail, the other two will take the workload, and a new service is started so that the cluster maintains triple redundancy at all times.
When a new version of the microservice is started successfully, it will increment the version number in MongoDB. The old version of the microservice detects the new version, and shutdowns as soon as the new version is ready to takeover. This occurs with no noticeable interruption to the user experience.
Deployment Pipeline
TraderPlan's source code is hosted on GitLab with a continuous delivery pipeline where deployments frequently occur in Canary, Development, QA, Staging and Production environments.