[Unison-hackers] unison and inotify principle

Benjamin Pierce bcpierce at cis.upenn.edu
Sun Jun 8 09:27:28 EDT 2008


> Concerning "portability", i think it will be really hard. There is no
> POSIX way to poll this kind of event (even UNIXes doesn't have the  
> same
> way to do this task). It will probably require to write a program  
> per OS
> (BSD/Mac OS X/Linux/Win32).

I didn't mean that exactly the same code would perform notification  
on all architectures -- clearly the notification logic, low-level  
APIs, etc. are going to have to work differently on different OSs.  I  
meant that things have to be set up so that the Unison sources will  
continue to *compile* on all architectures.

     - Benjamin



>
On Jun 8, 2008, at 5:37 AM, Sylvain Le Gall wrote:
> On 08-06-2008, Benjamin Pierce <bcpierce at cis.upenn.edu> wrote:
>> Hi Sylvain,
>>
>>> If the external program work well and is written using OCaml, is  
>>> there
>>> anyway that the program gets included in unison itself after a  
>>> certain
>>> amount of time (6 months working without problems)?
>>
>> Yes.  If it is written in OCaml in a portable way, then the simplest
>> may be simply to make it be part of Unison (to maintain the current
>> single-executable distribution model).  But I am also open to other
>> models where the notification program is written in another language
>> and not necessarily in a portable way.  At this point, we need to
>> experiment to see what's going to work best.
>>
>
> Full ack.
>
> The only thing i would like to underline, is that it should be really
> great to have some kind of "driver" model where you can either use an
> internal driver (integrated in unison) or an external one (using a
> program). The idea is to keep the driver external as long as possible
> for testing and then integrate the one that can be integrated.
>
> Concerning "portability", i think it will be really hard. There is no
> POSIX way to poll this kind of event (even UNIXes doesn't have the  
> same
> way to do this task). It will probably require to write a program  
> per OS
> (BSD/Mac OS X/Linux/Win32).
>
> I will probably try to write an inotify program for this. But i  
> need to
> finish some other job before ;-)
>
> Regards,
> Sylvain Le Gall
>
> _______________________________________________
> Unison-hackers mailing list
> Unison-hackers at lists.seas.upenn.edu
> http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers



More information about the Unison-hackers mailing list