Re: [Mojolicious] How to send a job in the backend and refresh status in web app ?

2019-05-15 Thread Luc Larochelle
I need to restart this debate :)

I've been looking into this and found the Multiplex plugin for Mojolicious 
by Joel Berger. Seems interesting too, but I still need to understand the 
mechanics of websockets and non-blocking IO and minion jobs ... That's a 
lot 

So I thought of something else ... What if my webage would automatically 
refresh every X seconds and after sending a job in the background, the BD 
would be updated with the job results so that when the api endpoint is read 
by the client, the data is refreshed ? I feel lazy proposing it, but the 
other way around sounds like a nightmare (I'm not a developper)

What do you think ?

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/ccf48950-ea7c-4d1a-9da6-1182ed25649c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] How to send a job in the backend and refresh status in web app ?

2019-05-10 Thread Luc Larochelle
I'm using Mojo::SQLite to address BD needs. The Mercury websocket broker 
seems an accurate choice, though. 



On Thursday, 9 May 2019 17:21:35 UTC-4, Dan Book wrote:
>
> Pubsub over a db like Pg or Redis might be useful if you are using one of 
> those. Otherwise the Mercury websocket broker can also act as a pubsub 
> daemon.
>
> -Dan
>
> On Thu, May 9, 2019 at 4:17 PM Luc Larochelle  > wrote:
>
>> Hi,
>>
>> I've researched this subject and read a lot, but can't come to a 
>> conclusion. I need help to get things straight ... 
>>
>> In my web app, I simply manage elements in a DB with API endpoints. So 
>> far, this is awesome. My setup is Mojolicious + AngularJS + Bootstrap.
>>
>> The way I see this, my question has 2 approaches :
>>
>> 1) When I add a new element in the table, I'd like to deploy a job, where 
>> a backend scripts connects to the element and reports a status to the web 
>> app.
>>
>> 2) Some daemon is periodically watching an "inventory" API endpoint and 
>> when a new element is detected, the backend script connects to the element 
>> and reports a status to the web app.
>>
>>
>> For instance, it could set a status light for connectivity and 
>> authentication success on each line of my table.
>>
>>
>> In any ways, I thought websockets + minions would be my friends, but the 
>> more I read about it, the more I get confused. Are Minions suited for this 
>> task ?
>>
>> How should I achieve this ? 
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Mojolicious" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to mojol...@googlegroups.com .
>> To post to this group, send email to mojol...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/mojolicious.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/mojolicious/ccfe44d6-38b8-405d-92f6-189f4c377b3a%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/d5fd277d-ff02-4d22-98d6-6b3f4e96a262%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] How to send a job in the backend and refresh status in web app ?

2019-05-09 Thread Dan Book
Pubsub over a db like Pg or Redis might be useful if you are using one of
those. Otherwise the Mercury websocket broker can also act as a pubsub
daemon.

-Dan

On Thu, May 9, 2019 at 4:17 PM Luc Larochelle  wrote:

> Hi,
>
> I've researched this subject and read a lot, but can't come to a
> conclusion. I need help to get things straight ...
>
> In my web app, I simply manage elements in a DB with API endpoints. So
> far, this is awesome. My setup is Mojolicious + AngularJS + Bootstrap.
>
> The way I see this, my question has 2 approaches :
>
> 1) When I add a new element in the table, I'd like to deploy a job, where
> a backend scripts connects to the element and reports a status to the web
> app.
>
> 2) Some daemon is periodically watching an "inventory" API endpoint and
> when a new element is detected, the backend script connects to the element
> and reports a status to the web app.
>
>
> For instance, it could set a status light for connectivity and
> authentication success on each line of my table.
>
>
> In any ways, I thought websockets + minions would be my friends, but the
> more I read about it, the more I get confused. Are Minions suited for this
> task ?
>
> How should I achieve this ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mojolicious" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mojolicious+unsubscr...@googlegroups.com.
> To post to this group, send email to mojolicious@googlegroups.com.
> Visit this group at https://groups.google.com/group/mojolicious.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mojolicious/ccfe44d6-38b8-405d-92f6-189f4c377b3a%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/CABMkAVXFoB%3DTwONPC1F%2BJaf-fnuanYkc9YB%3DCS0Suw8xgOSSug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] How to send a job in the backend and refresh status in web app ?

2019-05-09 Thread Luc Larochelle
Hi,

I've researched this subject and read a lot, but can't come to a 
conclusion. I need help to get things straight ... 

In my web app, I simply manage elements in a DB with API endpoints. So far, 
this is awesome. My setup is Mojolicious + AngularJS + Bootstrap.

The way I see this, my question has 2 approaches :

1) When I add a new element in the table, I'd like to deploy a job, where a 
backend scripts connects to the element and reports a status to the web app.

2) Some daemon is periodically watching an "inventory" API endpoint and 
when a new element is detected, the backend script connects to the element 
and reports a status to the web app.


For instance, it could set a status light for connectivity and 
authentication success on each line of my table.


In any ways, I thought websockets + minions would be my friends, but the 
more I read about it, the more I get confused. Are Minions suited for this 
task ?

How should I achieve this ? 

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/ccfe44d6-38b8-405d-92f6-189f4c377b3a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.