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
Hey everyone!
Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application.
This library uses Erlang esaml to provide
plug enabl...
New
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries.
offset-based pagination with...
New
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub.
Docs are at OpenaiEx User Gu...
New
The Chelekom project is a library of Phoenix and LiveView components generated via Mix tasks to fit developer needs seamlessly.
One of i...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
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
Other Trending Topics
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
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
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog
It says that Fly is going all-in on sprites, which is a worry ...
New
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using.
We’re particularly inte...
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
Is there a word for the ~> symbol used in Version strings?
Do you also just call it a Squiggle Arrow™ ?!
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











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.