Account Options

  1. Sign in
The new Google Groups is coming soon. Learn about the new features you'll find.
Google Groups Home for developers.sugarsync.com
« Groups Home
How to use like a 'real' file system
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Scotty  
View profile  
 More options Jan 31, 6:15 am
From: Scotty <craig.mcfarlane.sc...@gmail.com>
Date: Tue, 31 Jan 2012 03:15:51 -0800 (PST)
Local: Tues, Jan 31 2012 6:15 am
Subject: How to use like a 'real' file system
Hi,

Just trying to get my head around all the SugarSync concepts of
workspaces, shared folders, magic briefcases etc. (do users actually
understand this stuff?) Anyway, I'm trying to use SugarSync in the
same way that I might use a WebDAV (or Dropbox :-) interface - by
referring to files and folders by their 'human readable' path. For
example, I want to check the modified date on a file which the user
might consider as being in /My Desktop/My Project/plan.pdf - is this
possible without having to enumerate all the workspaces, collections
etc. I know that the URL to that file is persistent and if I know it
then I can use it - but at this point I haven't enumerated it?

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scotty  
View profile  
 More options Jan 31, 12:57 pm
From: Scotty <craig.mcfarlane.sc...@gmail.com>
Date: Tue, 31 Jan 2012 09:57:14 -0800 (PST)
Local: Tues, Jan 31 2012 12:57 pm
Subject: Re: How to use like a 'real' file system
So I've been plodding on with the API and now discovered that it will
happily create multiple copies of exactly the same filename. This is
mad. So now I have to enumerate an entire folder in order to determine
if a file exists already before attempting to upload an update to the
file - so I don't accidentally create a 'new' file. Does anyone know
of another way to check for the existence of a file without
enumerating the parent folder?

Thanks

On Jan 31, 11:15 am, Scotty <craig.mcfarlane.sc...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jim Wong  
View profile  
 More options Jan 31, 2:46 pm
From: Jim Wong <jw...@sugarsync.com>
Date: Tue, 31 Jan 2012 19:46:36 +0000
Local: Tues, Jan 31 2012 2:46 pm
Subject: Re: How to use like a 'real' file system
Thanks for the note.  We don't currently have a mechanism to check whether
a file with a particular name exists - the fact that you can have multiple
objects with the same name in a folder is actually a representation of the
underlying data model, which supports this capability.

If you just want to construct a path for a particular file, you can
probably start by walking upwards to the file's parent, grandparent, etc.,
until you get to the sync folder it's ultimately contained within.  You
can also find out which computers it's synced to in this fashion, though
it may be associated with more than one.

Let us know if you have any further questions.

--
Jim Wong (jw...@sugarsync.com)

On 1/31/12 9:57 AM, "Scotty" <craig.mcfarlane.sc...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scotty  
View profile  
 More options Jan 31, 4:09 pm
From: Scotty <craig.mcfarlane.sc...@gmail.com>
Date: Tue, 31 Jan 2012 13:09:38 -0800 (PST)
Local: Tues, Jan 31 2012 4:09 pm
Subject: Re: How to use like a 'real' file system
Thanks for the reply Jim. So to confirm - if I want to upload a file
into a folder, the steps are as follows:

- Enumerate the entire folder to see if the file already exists.
- Whilst looking for the file I must cope with the possibility that
there may be multiple instances with the exact same name (I guess I
need to just pick one!?)
- If there is an existing file then I can PUT data into it (thus
creating a new version)
- If there isn't an existing file then I need to issue a CREATE
request and capture the resultant ID representing the file then PUT
data into that file ID.

Assuming that to be the case - you're making it very difficult to use
your API. In Dropbox, a single request will upload a file and even
create the necessary folder structure to support it and then return
the file attributes - quick and easy from both a developer and network
perspective. Even WebDAV makes this pretty easy. Hell, even Box.net is
easier than this - and their system is pretty obtuse.

Sorry - I'm ranting now - but your auth mechanism needs work too.
Currently you force me to store the users actual password (rather than
a token) and worse than that, I need cope with the fact that my
session times out after a very short time - requiring me to code up
the logic to recreate the session automatically (using the stored
password!!!) I'm not suggesting OAuth levels of security (which also
sucks from a user experience perspective) - but a simple token which
never times out would be better.

</RANT>

Do you have any published roadmap for the API? As it currently stands
it's not really going to work for me.

Thanks

On Jan 31, 7:46 pm, Jim Wong <jw...@sugarsync.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jim Wong  
View profile  
 More options Feb 6, 2:00 am
From: Jim Wong <jw...@sugarsync.com>
Date: Mon, 6 Feb 2012 07:00:47 +0000
Local: Mon, Feb 6 2012 2:00 am
Subject: Re: How to use like a 'real' file system
Thanks again for the note.  The process is actually a bit simpler than
that: if you don't have a URL for the file, just do a POST to create one
and then a PUT to upload the associated file data.  If you've previously
uploaded a different version of the file, you can just do a PUT to upload
the updated file data.  If two files in the same directory end up having
the same name, the system will sort things out, usually by creating a
conflict file.

I can understand the appeal of the approach you describe, but it has
disadvantages, as well - it's easier for applications (or different
installations of the same application) to clobber each other's data, and
it's a bit more sensitive to changes the user makes in terms of file
system structure.  Of course, no approach is perfect, and we're always
thinking about ways to improve ours.

Authentication is absolutely something that's on our mind.  We expect to
eliminate the need for applications to store user's passwords in the
not-too-distant future.

--
Jim Wong (jw...@sugarsync.com)

On 1/31/12 1:09 PM, "Scotty" <craig.mcfarlane.sc...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scotty  
View profile  
 More options Feb 6, 5:32 am
From: Scotty <craig.mcfarlane.sc...@gmail.com>
Date: Mon, 6 Feb 2012 02:32:14 -0800 (PST)
Local: Mon, Feb 6 2012 5:32 am
Subject: Re: How to use like a 'real' file system
Not sure how it is simpler than I describe? In my tests it just
creates multiple files with exactly the same name when I POST a create
request. I haven't seen a 'conflict file' - and even if there were
one, how would I know about it - without enumerating the entire folder
after each POST/create call?

To my mind, you guys need a 'Get File/Folder Attributes' call which
ideally takes a proper file path (as understood by users) - or failing
that, the containing folder URL and file/folder NAME.

Even better would be a utility function which maps 'file/folder paths'
to your internal URL id scheme.

Regarding the password thing - this is easy to fix. Make the token so
that it doesn't expire (unless the user chooses to invalidate it.) If
you plan to jump on the OAuth bandwagon then you should consider the
mobile app use case - which is a truly awful user experience if forced
to switch to a browser then back to the app.

On Feb 6, 7:00 am, Jim Wong <jw...@sugarsync.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jim Wong  
View profile  
 More options Feb 7, 5:22 am
From: Jim Wong <jw...@sugarsync.com>
Date: Tue, 7 Feb 2012 10:22:13 +0000
Local: Tues, Feb 7 2012 5:22 am
Subject: Re: How to use like a 'real' file system
Thanks for the suggestions.  We will keep them in mind as we evolve the
system.

--
Jim Wong (jw...@sugarsync.com)

On 2/6/12 2:32 AM, "Scotty" <craig.mcfarlane.sc...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »