← Back to team overview

acmeattic-devel team mailing list archive

Re: Client Side Architecture - Race Condition

 

I don't quite understand why the client and the daemon separately
communicate with the server. Could someone explain that to me?
I always imagined that the client application only modifies local state, and
the daemon establishes connection with the server and communicates file
updates/revisions, etc.
Is there a compelling use case for direct client-server communication?

-Karthik

On Sun, Aug 8, 2010 at 3:05 PM, Bharath Subramanian Pichai <
bharath.subramanian@xxxxxxxxx> wrote:

> Hi *,
> In the proposed client architecture, the client and daemon independently
> communicate to the server through the core client code (the client library).
> To resolve the race condition we can maintain a data structure say,
> File_Operation_State.
> Initially, this data structure will be empty. When a client or daemon needs
> to communicate with the server it can insert the query in the form of a
> key-value pair. The key will be the file name and the value will be the
> "STATE_OF_THE_OPERATION". The client and daemon has to initially query and
> check for the current state of the file being operated. The client or the
> daemon cannot perform the desired operation if the file is operated by the
> other application. Also, the key-value pair needs to be removed from the
> data structure once the application had finished their respective operation
> on the file. Now, we have to ensure the thread safety of this data
> structure. I am not entirely sure about the locking mechanism that needs to
> be used to ensure the thread safety for this structure. Need to think about
> the same.
> Cheers,
> pbs
>
> _______________________________________________
> Mailing list: https://launchpad.net/~acmeattic-devel<https://launchpad.net/%7Eacmeattic-devel>
> Post to     : acmeattic-devel@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~acmeattic-devel<https://launchpad.net/%7Eacmeattic-devel>
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Karthik

References