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

https://github.com/phoenixframework/phoenix


You can use a beginner friendly, yet powerful HTTP client:
https://github.com/wojtekmach/req


For Kafka connection, you can use:
https://github.com/dashbitco/broadway


To generate OpenAPI docs:
https://github.com/xerions/phoenix_swagger


Tutorials:

Generate API Documentation Effortlessly from your Phoenix/Elixir code

Where Next?

Popular in Questions Top

sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
chokchit
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2733ms. You can configure how long re...
New
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
mgjohns61585
Could someone help me? I’m making my first elixir program, number guessing game. I can’t figure out how to convert the user’s guess from ...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
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

Other popular topics Top

sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 42920 311
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
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
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36128 110
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New

We're in Beta

About us Mission Statement