<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Java API Concurrency with multiple users accessing app. in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-API-Concurrency-with-multiple-users-accessing-app/m-p/142232#M4499</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Izabella, to clarify, are all of the users of your app going to be connecting to the same&amp;nbsp;Dropbox account, or will they be linking their own accounts?&lt;/P&gt;</description>
    <pubDate>Wed, 17 Feb 2016 04:47:48 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2016-02-17T04:47:48Z</dc:date>
    <item>
      <title>Java API Concurrency with multiple users accessing app.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-API-Concurrency-with-multiple-users-accessing-app/m-p/142231#M4498</link>
      <description>&lt;P&gt;So I am developing a Spellchecker application. I am storing all the projects (books) on Dropbox. My application downloads and uploads files to Dropbox.&lt;/P&gt;
&lt;P&gt;The application will have multiple users who may possibly be accessing the same project at the same time. If two users finish processing the project at the same time (i.e. application starts to upload the same file at the same time to dropbox), I assume, one overwrites the other.&lt;/P&gt;
&lt;P&gt;This would cause a problem for me. I would like to program the application to acquire a lease on&amp;nbsp;a certain project, giving the user exclusive access to it.&amp;nbsp;The point is at this link&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/reference/webhooks" rel="nofollow noreferrer" target="_blank"&gt;https://www.dropbox.com/developers/reference/webhooks&lt;/A&gt; I saw something about leases.&lt;/P&gt;
&lt;P&gt;How do I implement a lease? In java in this dropbox API how to I assign exclusive access to a Dropbox folder for one user at a time?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:35:39 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-API-Concurrency-with-multiple-users-accessing-app/m-p/142231#M4498</guid>
      <dc:creator>Izabella S.</dc:creator>
      <dc:date>2019-05-29T09:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Java API Concurrency with multiple users accessing app.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-API-Concurrency-with-multiple-users-accessing-app/m-p/142232#M4499</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Izabella, to clarify, are all of the users of your app going to be connecting to the same&amp;nbsp;Dropbox account, or will they be linking their own accounts?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 04:47:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-API-Concurrency-with-multiple-users-accessing-app/m-p/142232#M4499</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-02-17T04:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Java API Concurrency with multiple users accessing app.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-API-Concurrency-with-multiple-users-accessing-app/m-p/142233#M4500</link>
      <description>&lt;P&gt;There is only one central account, like a database where all data is stored. Every different user accesses this central "database".&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 04:58:56 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-API-Concurrency-with-multiple-users-accessing-app/m-p/142233#M4500</guid>
      <dc:creator>Izabella S.</dc:creator>
      <dc:date>2016-02-17T04:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: Java API Concurrency with multiple users accessing app.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-API-Concurrency-with-multiple-users-accessing-app/m-p/142234#M4501</link>
      <description>&lt;P&gt;Thanks for clarifying.&amp;nbsp;The API was designed with the intention that each user would link their own Dropbox account, in order to interact with their own files. However, it is technically possible to connect to just one account. The SDKs don't offer explicit support for it and we don't recommend doing so, for various technical and security reasons.&lt;/P&gt;
&lt;P&gt;However if you did want to go this route, instead of kicking off the authorization flow, you would manually use an existing access token for your account and app. (Just be careful not to revoke it, e.g. via &lt;A href="https://www.dropbox.com/account/security" rel="nofollow noreferrer"&gt;https://www.dropbox.com/account/security&lt;/A&gt; .)&lt;/P&gt;
&lt;P&gt;In any case, the&amp;nbsp;Dropbox API doesn't offer any sort of file locking, so there isn't a good way to manage this,&amp;nbsp;but I'll be sure to pass this along as feedback. (The mention of leases in the webhooks documentation was in reference to hypothetical leasing you could build into your app's own code when handling changes, not about making calls to the&amp;nbsp;Dropbox API.)&lt;/P&gt;
&lt;P&gt;Anyway, for handling how files are uploaded, and how to prevent and manage conflicts, you should read about the different write modes available. E.g., if you're using the Java Core SDK:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v1.8.x/com/dropbox/core/DbxWriteMode.html" rel="nofollow noreferrer"&gt;https://dropbox.github.io/dropbox-sdk-java/api-docs/v1.8.x/com/dropbox/core/DbxWriteMode.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 05:10:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-API-Concurrency-with-multiple-users-accessing-app/m-p/142234#M4501</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-02-17T05:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Java API Concurrency with multiple users accessing app.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-API-Concurrency-with-multiple-users-accessing-app/m-p/142235#M4502</link>
      <description>&lt;P&gt;Alright, but for my purposes the entire point of storing these project son dropbox is to only have one central account where different users have access to the same projects (and especially same dictionary from which spellchecking happens).&lt;/P&gt;
&lt;P&gt;"However if you did want to go this route, instead of kicking off the authorization flow, you would manually use an existing access token for your account and app." -- Could you please be a little more technical? What exactly does this mean for the program.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note I am a little new to drobox developement, so it may be obvious.. But you are saying that I should use one access token (this is the one that finalise() was called on?) to connect to dropbox for every user? So that would mean that there is only ever one person accessing dropbox because there is only ever one access token generated?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 19:32:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-API-Concurrency-with-multiple-users-accessing-app/m-p/142235#M4502</guid>
      <dc:creator>Izabella S.</dc:creator>
      <dc:date>2016-02-17T19:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: Java API Concurrency with multiple users accessing app.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-API-Concurrency-with-multiple-users-accessing-app/m-p/142236#M4503</link>
      <description>&lt;P&gt;If you will only have your app connect to a single account, you need to only process the OAuth app authorization flow for that account once. From that point on, you would store and re-use that single access token.&lt;/P&gt;
&lt;P&gt;For example, if you are using the Java Core SDK, that is the token stored as "accessToken" in the &lt;A href="https://www.dropbox.com/developers-v1/core/start/java" target="_blank" rel="nofollow noreferrer"&gt;tutorial&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Then, whenever a user of your app needs&amp;nbsp;Dropbox functionality, you would use&amp;nbsp;a DbxClient made with&amp;nbsp;that stored access token, e.g., using &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v1.8.x/com/dropbox/core/DbxClient.html#DbxClient(com.dropbox.core.DbxRequestConfig,%20java.lang.String)" target="_blank" rel="nofollow noreferrer"&gt;this constructor&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 01:32:51 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-API-Concurrency-with-multiple-users-accessing-app/m-p/142236#M4503</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-02-18T01:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Java API Concurrency with multiple users accessing app.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-API-Concurrency-with-multiple-users-accessing-app/m-p/142237#M4504</link>
      <description>&lt;P&gt;Thanks, and what happens when two different people(on different computers) hypothetically try to access the same central Dropbox account at the same time, using the same access code?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 02:14:22 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-API-Concurrency-with-multiple-users-accessing-app/m-p/142237#M4504</guid>
      <dc:creator>Izabella S.</dc:creator>
      <dc:date>2016-02-18T02:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: Java API Concurrency with multiple users accessing app.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-API-Concurrency-with-multiple-users-accessing-app/m-p/142238#M4505</link>
      <description>&lt;P&gt;Exactly what happens depends on what API calls they're making. E.g., if they both try to read a file at the time time, that should be fine. On the other hand, if they both try to upload new versions of a single file at the same time, that will cause a conflict. Be sure to read through the write mode documentation I linked to earlier to understand the different modes and behaviors.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 02:15:58 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-API-Concurrency-with-multiple-users-accessing-app/m-p/142238#M4505</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-02-18T02:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Java API Concurrency with multiple users accessing app.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-API-Concurrency-with-multiple-users-accessing-app/m-p/142239#M4506</link>
      <description>&lt;P&gt;Alright, thanks a mill Greg.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 02:24:08 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-API-Concurrency-with-multiple-users-accessing-app/m-p/142239#M4506</guid>
      <dc:creator>Izabella S.</dc:creator>
      <dc:date>2016-02-18T02:24:08Z</dc:date>
    </item>
  </channel>
</rss>

