AppDoctor backend is built completely in elixir using all sorts of otp goodness.
Examples are authentication is using replicated ets tables, AppDoctor tests run in DynamicSupervisor genservers isolated from each other. We are really excited to be done(until changes are needed) with the backend and continue work on the front end for our 2019 launch. We will be moving users into closed beta shortly and I would love feedback from my favorite internet forum. Any questions on the elixir backend feel free to ask away!
I know it’s not live yet but I went to appdoctor.io and it says Request does not contain account subdomain ..might be worth putting a holding page up for nosey parkers like myself?
You are probably correct. I will throw up something that redirects to the closed beta register page this weekend! But your more then welcome to poke at the api a bit
If you had an account you would be able to do something like
If you come across any issues or have any feedback please post to the github issue tracker or email us at support@appdoctor.io
If you know anyone interested in the the perks that come with giving us feedback during our closed beta period please have them email beta@appdoctor.io
We will continue to update the codes after they have been used.
Account GenServer: Used to collection some statistical information/ route request data to to the correct dynamic GenServer. This also handles starting bin servers under the bin supervisor.
Bin supervisor: This starts and stops GenServers for any request data and tracks statistical data like % of failed requests to an endpoint over X period of time. After not receiving any new messages after X time it stops itself.
Bin cleanup GenServer: handles rolling deletes based on account level. So for example free tier will allow 5000 requests per bin. It tracks this count internally and then runs the sql to delete when needed.
Rules GenServer: this GenServer gets passed requests and analyzes them against any rules stored it its state. It handles sending emails and updating the database when a rule is hit.
test GenServer: this is the place that contains all the tests state for a users. So that when a test is ran it does not need to hit the db. It also handles internal intervals of running tests using send_after.
test execution supervisor: when a test is running it can be long running so each test for an account is started in its own GenServer and handles each step of the test by sending messages to itself.
Last is a task supervisor that is used to start any async tasks and not have them crash the process they were started in.
AppDoctor uses a unique way of working distributed that has been working quite well so far and GenServers fail over across servers. I welcome any questions on the complications I went through setting this up and some of the awesome benefits gained through it as well!
Hopefully it explains everything better then I have previously. I will have some feature blog posts about the rules engine appdoctor uses because ast parsing made everything so much easier to handle!
It has been a while since I posted. I finally got around to doing a short demo of AppDoctor tests:
Also if you use the discount code ‘month-free’ when signing up you get 40$ applied to your account(only last till July)
Now for my funny elixir story:
Everything has gone really well since launch. No breaking bugs and everything has been running very smooth. Funny enough it turns out when you took a certain common action it crashed an account process every time(bad state format). I never even realized this was happening because the supervisor would restart the process and it would pull correct state format from the DB, so this bug went months unnoticed(since then I added better logging). Although it sucks to have a bug its great when everything continues to work correctly!(thanks elixir).
Some interesting tidbits. We at AppDoctor use hot upgrades and since launch has not had a single second of downtime. We have Tests scheduled and running in GenServers that have been running since day 1 of release.
Doing hot upgrades during CI was a challenge in itself to figure out because we needed to pull the old artifact in order for distillery to figure out the update path to the new version. I will probably write a blog post going forward about our deployment strategy because it has so far worked out quite well for us and allows us to constantly deploy without dropping WebSocket connections or messing up test schedules.
It is not currently possible to run browser checks via AppDoctor but it is on our backlog that we hope to complete this year!
AppDoctor can currently test any API use case as simple or complex as you need due to the robust rules engine. We plan on using the same rules engine when adding browser tests so you can expect the same robust level of customization to accommodate all use cases.