dopomecana

dopomecana

I recently had a interview where I had to design a zapier clone.
From the feedback I understood that my solution was not very elixirish. I think what am I missing is the big picture thinking in Elixir.
How would you guys do it? How would you structure your services?

For those who don’t know what zapier is:

Zapier is an automation platform that lets you connect different apps and software, so that when something happens in one place, a different action gets taken somewhere else. Here are some examples: You could use Zapier to get a team chat message every time someone fills out a form, an email when someone updates a shared spreadsheet, or automatically add someone to an email newsletter audience or CRM when they fill out a contact form.

Basically this may be viewed as an incoming API call that triggers one or more actions(external API calls)

Any Ideas would be much appreciated. Thank you!

Showing Posts 1 to 4

dimitarvp

dimitarvp

That’s not very specific, can you give us a clue how did you go about it and what was not liked by the interviewers first?

dopomecana

dopomecana OP

In my mind was something like this: Incoming API call → Processing data → Another API call from me to another service.
But I think that I made too much use of the database instead of relying on the OTP Agent or ETS.
At my current company had lawsuits in the past, not specifically my company but our clients..and we have to had anything saved in the database so I have this bad habit on relying to much on my postgres db.
Going back to the interview…The fact that I started designing with logging the event in the db and the update whenever the status of the event changed may be considered a bottleneck for a massive load? The db logging was in my on the spot plan a good way to handle recovering data in case of a system failure.
But afterwards I thought that in this case something like Kafka maybe used in order to keep the events for a short period in case we need to process past events after a network failure for example.
What do you think?

dimitarvp

dimitarvp

Zapier is an automation platform. I’d give you extra points for wanting to have a complete paper trail in a similar project! Not criticizing your interviewers because I don’t have all the context but with the info I have, I’d say they judged you wrongly here.

And no, don’t use too much external technology – especially one as powerful and complex to set up as Kafka – in interview assignments. Keep it simple. You did well for choosing to roll your own event queue / modification log.

thomas.fortes

thomas.fortes

Metrics are good, but if the collection of the metrics cause excessive performance penalties it should be reworked, if everything has to hit the DB all the time, the DB will soon turn into the bottleneck of your application, there is a reason why in every other stack Redis/RabbitMQ/Kafka/Etc are used for queues, and that’s because they are optimized for it in a way that traditional DBs are not.

In the BEAM world you can get pretty far with OTP without resorting to external services, I personally would use a GenServer, and unless strictly necessary to log every single event, (think financial industries) I would aggregate and log them by batch in a reasonable interval.

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews