Updating many json files in Azure blob storage? -


I have ~ 1,000,000 JSON files, I would like to update every 30 minutes. Update is only enclosing a new array at the end of the existing content.

Uses the same code as a single update:

  CloudBlockBlob blockBlob = container.GetBlockBlobReference (blobName); Jobbject jObject = null; // If the blob is present, then we may need to update it. If (blockBlob.Exists ()) {MemoryStream memoryStream = new MemoryStream (); BlockBlob.DownloadToStream (MemoryStream); JObject = JsonConvert.DeserializeObject (encoding.UTF8.GetString (MemoryStream. ToArray ()) functioning; } // End of Blease is present if (null == jObject) {jObject = new Jobbject (); JObject.Add (new JProperty ("identifier", identifier)); } // Closing of the block did not exist JArray jsonArray = new JArray (); JObject.Add (New JProperty (string.Format ("Entries {0}", Timestamp. ToString ()), jsonArray); Foreign Currency (Miscellaneous Entries in New Entry) {JSNARRA.ed (new JobTech (new JPPrint ("Some ID", Entry.), New JProperty ("Some Value", Value)); } // the end of the loop string jsonString = JsonConvert.SerializeObject (jObject); // upload blockblock Properties Type Content = "Text / Jason"; Blockblock UploadFomstream (new memorystream (encoding.utf 8.gatebites (jasonstring)); Basically:  
  1. Check if the blob exists,
  2. If this happens, download the data and create a Jason object.
  3. If it has not, create a new object with the details.
  4. Push the blob update.

    Problems with it is performance demonstrations I have done a lot that I can do to increase the performance (updates run in five parallel threads and I use ServicePointManager.UseNagleAlgorithm Is set to false.

    It still runs at a slow pace, however, approximately 100,000 updates can take up to one hour.

    So I was basically guessed , My question will be:

    1. Do I use blue blob for this
    2. If yes, any suggestion for improving performance?

    Note: the original in the file There is a history of events and I can not re-generate the full file based on the existing data. Therefore, content is downloaded prior to updating.


Comments

Popular posts from this blog

Active Directory Authenticated Proxy Server with Squid or CNTLM -

java - @PluginTarget(Node.class) not registering as neo4j plugin -

python - Calculate STD manually using Groupby Pandas DataFrame -