Hi,

Twill itself doesn't provide native support for pub/sub message. However using 
Apache Kafka for your use case seems like a reasonable choice.

Terence

Sent from my iPhone

> On Feb 2, 2017, at 2:45 PM, Meier, Caleb <caleb.me...@parsons.com> wrote:
> 
> Hello,
> 
> I’m looking into writing a periodic query service in Twill.  Users can 
> register a query and specify a duration of time, which determines how long 
> the service waits between executing each query.  I want to implement a 
> Coordinator (which wraps a ScheduledServiceExecutor) to periodically generate 
> notifications to issue queries.  These notifications are then placed on a 
> work queue (possibly Kafka), and Workers pull the notifications off of the 
> queue, execute the query, and report their status back to the coordinator.  I 
> would like to implement the coordinator and workers as TwillRunnables and 
> package them together as a single TwillApplication.  However, I’m a bit 
> confused as to how to run this application.  Most of the examples I’ve seen 
> involve a TwillClient that creates a TwillRunner and Controller to run and 
> manipulate the TwillRunnable.  It also seems like the runnables are bound to 
> the client in this examples – if the client terminates then the runnables 
> terminate as well.  Am I wrong about this?  I’m interested in creating a long 
> running TwillApplication that is unbound to the client that I use to start 
> it.  How would I go about doing this? Also, does Twill include and additional 
> functionality designed to facilitate the producer/consumer pattern that I’ve 
> described above?  It seems like you provide some Kafka integration.  Thanks.
> 
> 
> Caleb A. Meier, Ph.D.
> Software Engineer II ♦ Analyst
> Parsons Corporation
> 1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
> Office:  (703)797-3066
> caleb.me...@parsons.com<mailto:caleb.me...@parsons.com> ♦ 
> www.parsons.com<https://webportal.parsons.com/,DanaInfo=www.parsons.com+>
> 

Reply via email to