mudasobwa
Creator of Cure
Camarero is a ready-to-use solution to add some JSON API functionality to the existing application or to implement the read-only JSON API from the scratch when more sophisticated (read: heavy) solutions are not desirable. Below is the typical picture of how Camarero is supposed to be plugged in.
It is blazingly fast.
Blogpost with details: https://dev.to/mudasobwa/plug-in-json-api-readonly-webserver-17b4
Hexdocs: Camarero.Catering — camarero v1.0.3
Trending in Announcing
WebAuthnLiveComponent WebAuthnComponents
See this post about renaming the package.
Passwordless authentication for Phoenix LiveView app...
New
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
I released Doggo, a collection of unstyled Phoenix components.
https://github.com/woylie/doggo
Features
Unstyled Phoenix components....
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Hi everyone,
I’ve been working on this protobuf library for 3 years. We use it in the company I work for, EasyMile, to communicate with ...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
I’ll shortly be launching Text, a nascent text analysis library.
Current functionality
In this early version (not ready for prime time) ...
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
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
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
Hey folks,
I just published a post about Hologram’s funding and where the project goes next - the short version:
Curiosum as Main Spons...
New
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with.
But I don’t use it anymore.
Serverless was the promis...
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
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex











Showing Posts 1 to 7- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
asummers
Very neat. We use JSONAPI at work and have a familiar yet different solution! Going to look around the code and see if we can borrow any of the ideas.
mudasobwa
Feel free to ask questions if any. The main advantage is statically generated routes and an ability to expose literally any existing storage implementing an
Accessbehaviour.asummers
We do dynamic route lookup by matching on the path and finding a resource that has a route corresponding to that name, to get around the static route generation problem. On a sufficiently large resource graph you get thousands and thousands of routes, whereas in our solution you get the 10 or so JSON API routes for GET, PUT, POST, DELETE + the relationship analogs which makes looking at the route definitions more reasonable.
I like the idea of the Access behaviour though, I have to think if that would clean up anything on our end!
dimitarvp
Even after reading your blog post I still cannot understand what exactly is this library about.
Can you give a more detailed example to demonstrate its strengths? Say you have an app that is mostly server-side rendering Phoenix modules and the team is looking for a cheap way to expose those as a read-only JSON API. Can Camarero help with that? And how exactly?
Maybe I am stupid for not getting it.
mudasobwa
It’s read-write since
v0.4.0btwWell, if there is already Phoenix I honestly do not see any reason to use the library. It’s more about microservices.
You might think about it as about cheap inplace KV-store. In our ecosystem many microservices expose some data. The data is being updated by some internal business rules. At any time it might be queried—here Camarero rocks.
Imagine Redis that might execute code on it’s own—this would be another analogue.
Example from real life: we collect currency rates from many different sources, make some internal computations (check the validness, cross-compute those not exposed by our providers etc.) Camarero serves the up-to-date rates for currency pairs. It’s faster, easier and to some extent more reliable than Redis. The main advantage is we were able to plug it into existing microservice in literally 10 minutes: one simply adds
use Camareroto the existingAgent—and voilà. Or, safer and generally better, produces 3 LoCs module that wraps the existingAgent.dimitarvp
So it’s adding a JSON layer on top of a very minimal app that doesn’t use higher-level libraries like Phoenix or Absinthe? And it’s more like JSON-API-enabling a K/V store shaped data inside the said minimal app?
If so, your title here is confusing.
mudasobwa
True, save for the app is not required to be minimal by any mean. Not everything in the world deals with user in any way. There are huge applications running on their own and serving billions of requests. They do not need Phoenix ( I doubt I understand how Absinth is ever connected here.)
I will think about how to make the title less confusing.