JaniHur

JaniHur

Elixir for applications providing and consuming APIs over network

Hello Community,

I’m Elixir, but not a functional programming, beginner (read Elixir in Action already once but still here :).

Is Elixir and BEAM/OTP platform suitable for applications providing and consuming APIs over network?

My use case would be an application implementing a OpenAPI specification based (request-reply) APIs. The application logic would be mainly to query data from other network APIs and (relational) databases and transform the (JSON) data in arbitrary ways. Also Kafka connectivity is required.

Any hints for a beginner for suitable libraries/frameworks/existing tutorials covering this scenario? I’m a bit confused about the ecosystem atm and I’m assuming vanilla Elixir is not enough, right?

Marked As Solved

derpycoder

derpycoder

Sure,

It certainly is, See: YouTube videos depicting its usage!!

Vanilla Elixir is great, if you want to go that route, but it will take a while.

However since you are beginner, I would suggest you use something like Phoenix Framework, along with some libraries mentioned below:

Phoenix Framework can generate API endpoints, using generators. See: mix phx.gen.json & Views and Templates


You can use a beginner friendly, yet powerful HTTP client:


For Kafka connection, you can use:


To generate OpenAPI docs:


Tutorials:

Generate API Documentation Effortlessly from your Phoenix/Elixir code

https://fullstackphoenix.com/tutorials/create-swagger-compatible-custom-phoenix-json-generator

Where Next?

Popular in Questions Top

sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
Kagamiiiii
Student & New to elixir. Nice language. I want to convert a english character, e.g. “a”, which is stored in a variable, to it’s asci...
New
sacepums
Hey guys. I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
Mooodi
Given a string, how can I get access to its character by index? Enum.at("my_string", 2) doesn't work. Or rather, not char, but a substr...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Other popular topics Top

yurko
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
977 41022 311
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement