Barbara Gomes created IOTA-34:
---------------------------------

             Summary: Add Global Watch Service to Fey
                 Key: IOTA-34
                 URL: https://issues.apache.org/jira/browse/IOTA-34
             Project: Iota
          Issue Type: Task
            Reporter: Barbara Gomes
            Assignee: Barbara Gomes
            Priority: Minor


Some performer implementation requires watch a file directory for file events 
like CREATE, UPDATE and DELETE.

If each performer implements its own Watch Service, it means that each one will 
have an additional thread for watching the directory which would be a waste of 
resources in most cases, since Fey could have one only thread that watches all 
necessary directories for all running performers and send a message to the 
performer once it receives the event that the performer is looking for.

*Suggestion:*

Fey will implement its own *Global Watch Service* and will be responsible for 
keeping it running and distribute the events to the right Performers.

In order to use it, the performer will have to send a message to the Global 
Watch Service Actor on Fey that contains:

* ActorRef
* Directory Path
* Optional File name (In case it is watching for changes on a specific file)
* List of Watch Events that it is waiting for

The FeyGenericActor will offer a new method that would be called every time the 
Performer receives a new event. It would contain:

* Path
* Event type



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to