Hey, 
That's what I actually do at the moment. 
I use it in the way, you can see here:
https://github.com/fr3dch3n/magellan-microservice/blob/master/lib/router.ex
Do you have any suggestions for improvements?
It works surprisingly well to forward all requests that to a custom router 
which I usually implement with Plug, too.

Am Freitag, 5. August 2016 16:30:10 UTC+2 schrieb Louis Pilfold:
>
> Hey! 
>
> Phoenix is slimmer than it first seems, but if you want something less 
> opinionated you can also just use raw Plug. I rather enjoy using 
> Plug.Router 
>
> https://github.com/elixir-lang/plug 
> https://github.com/elixir-lang/plug#the-plug-router 
>
> Cheers, 
> Louis 
>
> On 5 August 2016 at 15:17, OvermindDL1 <overm...@gmail.com <javascript:>> 
> wrote: 
> > For note Phoenix *is* the simple use-case.  It is little more than a set 
> of 
> > pre-defined plugs.  ;-) 
> > 
> > 
> > On Friday, August 5, 2016 at 7:46:56 AM UTC-6, fr3dch3n 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. 
> >> 
> >> 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 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "elixir-lang-talk" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to elixir-lang-ta...@googlegroups.com <javascript:>. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/elixir-lang-talk/60d94703-6336-4782-9429-14ce68c73c7c%40googlegroups.com.
>  
>
> > 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-talk/1727be92-f359-4c1a-b062-e41d9ac45ca0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to