Designing an mobile system with Gprc + Elixir
Incorporating gRPC + Elixir in Mobile Application
We want to be able to use the gRPC framework to make a remote procedure call. Basically, it is a way that allows our mobile clients to directly make requests from the mobile app server without being able to receive all the network details locally.
There are lots and lots of use-cases for incorporating gRPC and Elixir, see Use Cases for some examples about how it could be used.
Use Cases
System Design Decisions for consideration
What exactly do we expect the mobile app to fetch from the server endpoints?
Which microservices have we decided at this point in time to make provision for in our mobile app infrastructure?
What problem does the decision to use Elixir as a programming language solve?
Are merchant and client authentication handled by other specific tools on the backend?
DevOps Pipeline
We need to ensure that another stable branch exists by creating a new branch called release.
We will create release off of develop. All our acceptance and regression testing will be done on the release branch
On a local version of the mobile app
We need to avoid potential merge conflicts in the localization files, by pulling in the dev branch into release using a local GUI. If there are any conflicts in the localization files, they’ll be cleared out by the new files later. We should be keeping an eye out for any other merge conflicts.
When we are ready to release to our users, we merge release into master. Master is our most stable branch that mimics the app on the app store.
Merging into master automatically triggers a build on codemagic.io. An iOs and Android app are built by codemagic.
We might need to write a script that updates master from the new release to automate the process.
And then run smoke tests on the release build. The current configuration is build
Debug apk
Release apk
iOs app
On code magic, we need to add tests for the critical functionality
Writing specific build instructions in a YAML file will give us more opportunities to tinker with our build configuration.
After the build is successful, we can manually deploy to the Play Store or App Store
We are using code magic here because of our tech stack.
User and Merchant Logins connect to an IGW.
A VPC will be created that hosts the EC2 instance
A NAT Gateway will limit inbound traffic
An SG will control ingress and egress traffic from the EC2 instance
A health check will be added to the instance which will have a rule to Autoscale the instance if there are issues
The EC2 instance will be connected to an Endpoint which can be connected to 3rd party APIs like stripe\
Comments
Post a Comment