You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iota.apache.org by "Barbara Gomes (JIRA)" <ji...@apache.org> on 2016/11/03 17:52:58 UTC

[jira] [Updated] (IOTA-34) Add Global Watch Service to Fey

     [ https://issues.apache.org/jira/browse/IOTA-34?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Barbara Gomes updated IOTA-34:
------------------------------
    Description: 
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

{code}
This approach will require changes on FeyGenericActor.
All performers will have to be updated.
{code}

  was:
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


> 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
> {code}
> This approach will require changes on FeyGenericActor.
> All performers will have to be updated.
> {code}



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