
Show HN: FUSE filesystem for Google Drive written in OCaml - astrada
https://github.com/astrada/google-drive-ocamlfuse
======
chrissnell
I've never used OCaml so I started randomly clicking through your source. I
was looking at this file:

[https://github.com/astrada/google-drive-
ocamlfuse/blob/maste...](https://github.com/astrada/google-drive-
ocamlfuse/blob/master/src/gaeProxy.ml)

It seems like it's using some GAE node (presumably owned by the author) for
something to do with authentication. Would the author care to explain what's
going on here?

~~~
astrada
That is a proxy on GAE that makes it easier to complete the OAuth2 flow. The
source code of the proxy is here: [https://github.com/astrada/gd-ocaml-
auth](https://github.com/astrada/gd-ocaml-auth). More info about the
authorization process: [https://github.com/astrada/google-drive-
ocamlfuse/wiki/Autho...](https://github.com/astrada/google-drive-
ocamlfuse/wiki/Authorization). Let me know if you need further info.

~~~
chrissnell
Fair enough. I can't imagine that most users will want to pass access tokens
through your proxy, despite the hassle it saves. I would suggest making
proxied auth /not/ the default or at least divulging the use of the proxy in a
more prominent fashion in your documentation. Just a suggestion. People get
sensitive when it comes to their personal cloud storage.

~~~
astrada
I see your point. Thanks for your feedback.

------
bsaul
OCaml is pretty big in french universities, but could anyone from other
countries say how popular this language is in their country (education and
corporate sectors) ?

I'm quite surprised to see a news about this language on the front page of HN.

~~~
fabriceleal
In Portugal I would say it doesn't exist...

But I have knowledge of its usage on some projects by big corporations.

It seems that janestreet [1] takes great pride in using OCaml. They have some
interesting open source projects in github [2] and bitbucket [3].

And facebook has pfff [4], an "Ocaml API to write static analysis on source
code" (such as PHP code, not only OCaml code).

(I'm not a facebook or janestreet employee)

[1]: [http://janestreet.com/](http://janestreet.com/)

[2]: [https://github.com/janestreet](https://github.com/janestreet)

[3]: [https://bitbucket.org/janestreet](https://bitbucket.org/janestreet)

[4]: [https://github.com/facebook/pfff](https://github.com/facebook/pfff)

~~~
icebraining
We were taught OCaml in the Software Engineering undergraduate course at FCT-
UNL, in Portugal, along with Prolog, C and Java.

~~~
fabriceleal
My bad ... I wasn't aware. Do you know any Portuguese company that uses OCaml?

~~~
icebraining
No, not really, it seems almost all use Java or .NET languages. Thankfully, I
found a Python startup here in Lisbon.

------
rca
That's seems like a neat app! How did you handle the concurrent remote-access
on the files? Is there a way for the user applications to be warned when you
receive an operational transformation? I'm implementing a fuse filesystem for
a similar webapp and I thought it would be impossible for an editor that
hasn't be designed for that to deal with the concurrent modifications, even if
the filesystem can handle it.

~~~
astrada
Conflict resolution is not very sofisticated. You can choose to always take
server side version (the default) or client side version (see
[https://github.com/astrada/google-drive-
ocamlfuse/wiki/Confi...](https://github.com/astrada/google-drive-
ocamlfuse/wiki/Configuration)). My main use case is a single user working on
the client _or_ on the server. So the scenario is not of a collaborative app.

------
gregwebs
I am using the google drive app for Windows (in a shared folder that my Linux
VM sees). When I save a file with Vim it creates a duplicate copy on the
GDrive server.

I couldn't figure out how to turn off Vim's file saving behaviour, so I will
give this a shot and see if it works better.

~~~
gregwebs
works fine with Vim

