Re: [Rails] How do I run an action on a dedicated thread?

2019-08-08 Thread San Ji
No worry And thank you again. I also asked the Puma guy. They basiaclly said they receive this inquiry frequently, and they don't support it as they did not use it themselves. https://github.com/puma/puma/issues/1895 I am still open for any pointers and suggestions. Maybe Puma guys just don't

Re: [Rails] How do I run an action on a dedicated thread?

2019-08-08 Thread Eric Jesse Knutsen
San, I hope you know I meant no offense. This is a strange issue to have and is normally indicative of an architectural design flaw and without having more details that might violate your nda, we can only go based on facts entered into evidence, to borrow a phase from legal. An application can be

Re: [Rails] How do I run an action on a dedicated thread?

2019-08-08 Thread San Ji
Architecture wise the application is way better than average Rails apps IMO. The dependency direction is one way internally, with no cyclic dependency. (even with the ActiveRecord class, that in almost all other Rails app contains cyclic dependency between models) Network perspective may

Re: [Rails] How do I run an action on a dedicated thread?

2019-08-08 Thread Eric Jesse Knutsen
hmm... It sounds like you might want to isolate this into a micro-service then. Honestly, and architecturally, it sounds like this process flow might need a redesign, especially as it relies on a resource external to the main application. I am guessing that this is legacy? Is this application

Re: [Rails] How do I run an action on a dedicated thread?

2019-08-08 Thread San Ji
Thank you for the reply, but the client is not a web browser, so no javascript and no polling possible, plus not in our control. To be more specific the call to the external service is via a headless browser, not even a direct HTTP call, and you cannot push the data along with the request made

Re: [Rails] How do I run an action on a dedicated thread?

2019-08-08 Thread Eric Jesse Knutsen
It sounds like this might be best served by encapsulating the caller in a job and then setting up a dedicated queue for that job in your background processes, if I am understanding correctly what this is. If you need to have the results display when complete then you could set up a poller or a

[Rails] How do I run an action on a dedicated thread?

2019-08-08 Thread San Ji
Hi I run Rails on quite a complicated situation but the gist of it is, in my application, it is possible that an action can call some external services which fetch data from another action via another http call to the application itself. (Basically a cyclic http call) It is by design and there

Re: [Rails] Basics: How does Javascript communicate with Ruby on Rails?

2019-08-08 Thread Walter Lee Davis
Well, in my particular case, I already understood the way that the controller accepts the incoming request and assigns the attributes. That understanding came from many many years of working in Rails. The save part I understood intuitively, because years ago, I wrote an implementation of

Re: [Rails] Rails Angular

2019-08-08 Thread bouazza Mohamed
Thank you for your time ,much appreciated On Thu, Aug 8, 2019 at 00:34 Sampson Crowley wrote: > https://angular.io/ > > On Wednesday, August 7, 2019 at 2:02:42 PM UTC-6, bouazza Mohamed wrote: >> >> is there something with Angular 2 >> >> Le mercredi 7 août 2019 06:34:20 UTC-7, Joe Guerra a