Hey fellow elixir developers,
I seek your guidance. In my very few freetime? I'm working on a basic microservice in elixir: Magellan Microservice. (see https://github.com/fr3dch3n/magellan-microservice).
Spending
more and more time with elixir, I started wondering if my approach is
actually any good.
In Magellan I use a basic cowboy server and attach some routes to it.
Here lies kinda the heart of this microservice. The concept enables you to write your own app, start the magellan from within your project and then simply register your own router to the magellan router. All requests that aren't handled by the configurable application-status-endpoints are forwarded to your own router. This way you don't have to worry about server or basic app-status things. (You can simply register a status function at the app-status that gets invoked by a request for the status-page. (The app-status is still in a very early stage, so there is no strategy to provide an useful status.)
Before continuing on this project I wanted to get some feedback to see if my concept is any good.
To provide a more specific question:
Should I prefer phoenix even for such possibly small applications? For me it seems overpowered for this usecase.
I use some Agents for the rare cases where there is a state to safe (e.g. the registered router or registered functions for the app-status). Is this good practice?
What do you think about the whole concept?
We already use the magellan as basis for some monitoring applications, so I want to improve it wherever I can.
I'm greatful for any advice!
fr3dch3n
Hey fellow elixir developers,
I seek your guidance. In my very few freetime? I'm working on a basic microservice in elixir: Magellan Microservice. (see https://github.com/fr3dch3n/magellan-microservice).
Spending more and more time with elixir, I started wondering if my approach is actually any good. In Magellan I use a basic cowboy server and attach some routes to it.
[snip]
Before continuing on this project I wanted to get some feedback to see if my concept is any good.
To provide a more specific question:
Should I prefer phoenix even for such possibly small applications? For me it seems overpowered for this usecase.
[snip]
We already use the magellan as basis for some monitoring applications, so I want to improve it wherever I can.
On 5 August 2016 at 14:46, fr3dch3n <fredch...@gmail.com> wrote:Hey fellow elixir developers,
I seek your guidance. In my very few freetime? I'm working on a basic microservice in elixir: Magellan Microservice. (see https://github.com/fr3dch3n/magellan-microservice).
Spending more and more time with elixir, I started wondering if my approach is actually any good. In Magellan I use a basic cowboy server and attach some routes to it.
Excellent! That's exactly what I'm trying to do at the moment so rather than re-invent another wheel, I might make use of Magellan :)
[snip]Before continuing on this project I wanted to get some feedback to see if my concept is any good.
To provide a more specific question:
Should I prefer phoenix even for such possibly small applications? For me it seems overpowered for this usecase.
That's the conclusion I had come to as well. I know that Phoenix is quite lightweight compared to other MVC frameworks but when what you do requires neither the M nor the V in MVC, it looks like raw plugs are simpler to deal with.[snip]We already use the magellan as basis for some monitoring applications, so I want to improve it wherever I can.
Nice! Happy to help with that if I end up using it (which is likely).