locked
Order of blobs returned by blob storage service RRS feed

  • Question

  • Hi,

    I was working with one of our Cloud Storage Studio users today on listing blobs in a blob container. My expectation was that blobs returned by blob storage service are sorted alphabetically. However this was not the behavior I observed.

    In this particular case, the blob container contained a little over 3000 blobs and the blobs were returned in the following order:

    - Blobs starting with numbers e.g. 001_something_something.
    - Blobs starting with upper case letters e.g. A_something_something.
    - Blobs starting with lower case letters e.g. a_something_something.

    In each of these segments, blobs were ordered properly i.e. 001_something_something followed by 002_something_something and so on and so forth.

    So my question is: Are the blobs returned in a particular order or are they returned randomly?

    Any inputs regarding this would be highly appreciated.

    Thanks

    Gaurav Mantri

    Cerebrata Software

    http://www.cerebrata.com

     

    Thursday, October 13, 2011 7:22 PM

Answers

  • Hi,

    You can argue our document is not clear enough. But currently this is by design. And actually in ASCII, upper case characters are smaller than lower case characters. For example, if you write:
     
    Console.Write('B' < 'a');
     
    You will find true is written. While this outputs false:
     
    Console.Write('b' < 'a');
     
    But I agree the document should be clearer. You can add a community content on the document to submit a feedback.

     

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
    • Marked as answer by Gaurav Mantri Wednesday, October 19, 2011 5:36 AM
    Wednesday, October 19, 2011 5:23 AM

All replies

  • Hi,

    Your understanding is correct. Blobs are listed in alphabetical order in the response body. You can get the specified information at the bottom of this document. But the upper case letters come before lower case letters. May be the document is not clear enough.

     

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
    Friday, October 14, 2011 7:10 AM
  • Thanks Ming Xu,

    My impression with alphabetical sort (in this context) is that the blobs returned by storage service will be sorted in the following order:

    - blobs name starting with number followed by

    - blobs name starting with lower case alphabets followed by

    - blobs name starting with upper case alphabets

    The Wikipedia link you sent on alphabetical order does not talk about sorting mixed case words.

    It could be that my understanding regarding alphabetical sort may be incorrect.

    Thanks

    Gaurav

    Saturday, October 15, 2011 4:04 AM
  • Hi,

    You can argue our document is not clear enough. But currently this is by design. And actually in ASCII, upper case characters are smaller than lower case characters. For example, if you write:
     
    Console.Write('B' < 'a');
     
    You will find true is written. While this outputs false:
     
    Console.Write('b' < 'a');
     
    But I agree the document should be clearer. You can add a community content on the document to submit a feedback.

     

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
    • Marked as answer by Gaurav Mantri Wednesday, October 19, 2011 5:36 AM
    Wednesday, October 19, 2011 5:23 AM
  • Thanks Ming Xu. This makes sense.

    Regards

    Gaurav

     

    Wednesday, October 19, 2011 5:36 AM