Eiji
ExApi is a library that I’m developing now and hope release soon
This library will allow to:
- list all apis
- list all api implementations
- fetch default implementation (if specified)
- list all api features
- list all supported features for implementation
- list all not available features for implementation
- list all not implemented features for implementation
- call feature from api using implementation id
- call feature from api using default implementation
- call feature deirectly on implementation (for example firstly get default implementation and then call feature on it)
Trending in Announcing
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries.
offset-based pagination with...
New
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
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
Hi all!
I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas.
You...
New
Hello
Published a new library - ProcessHub!
ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
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
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
This showed up on my feed.. anyone heard of it? Just hype?
Ox Alpha is a reasoning model designed for coding, sustained ag...
New
It’s not that it’s vocabulary is too advanced. It’s something worse.
I get lost trying to follow even a paragraph written by Claude. It’...
New
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
aseigo
Elixir module APIs, or web APIs? (Sorry for the stupid questions
)
Eiji
@aseigo: no problem, I don’t described this library yet
This library will allow you to declare api/implementation/feature similarly to protocol/implementation/function. My implementations are identified by atom and all will be fully dynamically. For example you could register api or implementation when you want (dynamically loaded files), so you load Elixir code on yourself and call register specified module … and there is much more …
aseigo
Aha! I see. Thanks for the explanation. Sounds very neat, I will check it out for sure when it is released!
OvermindDL1
Sounds like a plugin system then eh?
Eiji
@OvermindDL1: hmm, at least it’s not intended
I’m using
GenServerthat ininitfunction reads configuration and automatically initializes apis and their implementations saving them to state. I added extra possibility to register api and implementation at runtime, because you wrote that it could be useful. As you said scanning beam files is not so easy as it originally looks, so what you need to do is just load something (beam file json, or somethimg else) and fetch/generate from them api and implementations definitions. Finally you need only to register them. I have also one extra feature: when some async calls (like registration api or implementation) are executed asynchronously thenExApidispatch event using^Register.dispatch/2.OvermindDL1
I’d been meaning to make a plugin API for elixir, I was thinking of doing a registration and just letting plugins that get loaded into the system register themselves into it.
Sounds cool though. Looking forward.
Eiji
@OvermindDL1: As soon as you can compile file with my library as dependency (especially macros) then you can register them. Of course name your api how you would like. API could be named
MyApp.Pluginand then you can writeMyApp.Loaderthat simply compiles file, gets file name (as plugin identificator) and register that plugin as aMyApp.Pluginimplementation.I’m making this firstly because I don’t want to implement protocol for empty structs that does not look good - at least for me.
OvermindDL1
/me coughs
Eiji
@OvermindDL1: I saw it, but my is little different. I need to write one mix task and add some tests then I release it and you will see my idea. It could be great if you can review my code especially my work on macros, because it’s first time I’m working on them so much.
Eiji
@OvermindDL1: I’m writing tests for it now.
You said that working on
*.beamfiles is not good way in some situations (edge-cases).I’m using: &Code.load_file/2 to load
.exfile fromtest/fixtures/project directory. This file contains only import call (for calling macro to define api) + of course call that macro - nothing more.Then I’m using my register method passing only module name. This calls only one auto-generated API function and only work on data that this method returns - no beam or other files are used here.
Is it what you want when you said about dynamically load files or should I test it in another way?