Start a Conversation

Unsolved

This post is more than 5 years old

1232

November 2nd, 2014 07:00

Atmos .Net API: Search stored objects by Metadata

I'm evaluating Atmos for our application. I have a requirement to search objects by metadata. Is this possible? Is Metadata indexed? What is the performance impact? .Net Code snippet for search will be helpful. Thanks!

281 Posts

November 3rd, 2014 07:00

No, Atmos does not support generic search by metadata.  That type of activity is still best served in a traditional database.  It does support some simple tagging (aka Listable Metadata) of objects to group them and list by tag.  For example, if your objects were blog posts you could tag them with "Atmos", "EMC", and "Cloud Storage".  Later you could come back and list all of the objects tagged with a particular tag (but not more complex things like the intersection of two tags).

However, there are some strict limitations to be aware of: each tag can only be associated with 6.5 million objects and there can be only 65000 tags per tag directory.  Also, once tags are created they cannot be deleted so they should not be used for transient values (an empty tag will persist but return no results).

There are some examples of using listable tags in the unit tests for the SDK.

5 Posts

November 3rd, 2014 10:00

Thanks for the response. Here is a case I need to address. A user can have a  photo that we store in multiple sizes behind the scene. The path is like in example below. If an image is deleted, I want to query by partial path /User/1000/photos/ba3f4d3a-c79a-4e22-b5ce-103d7832724b/ and delete all the photos. How do I do this?

/User/1000/photos/ba3f4d3a-c79a-4e22-b5ce-103d7832724b/LargePhoto/B2F550FA-E2B2-403B-937D-EE5E189C68CF

/User/1000/photos/ba3f4d3a-c79a-4e22-b5ce-103d7832724b/MediumPhoto/B2F550FA-E2B2-403B-937D-EE5E189C68AB

/User/1000/photos/ba3f4d3a-c79a-4e22-b5ce-103d7832724b/SmallPhoto/B2F550FA-E2B2-403B-937D-EE5E189C68DE

/User/1000/photos/ba3f4d3a-c79a-4e22-b5ce-103d7832724b/OriginalPhoto/B2F550FA-E2B2-403B-937D-EE5E189C6800

281 Posts

November 3rd, 2014 11:00

The Atmos namespace behaves like a filesystem, so you'd want to do a recursive delete on that directory.  See the deleteRecursively method in the test code here: https://code.google.com/p/atmos-dotnet/source/browse/trunk/EsuApiTest/EsuApiTest.cs#81

You could then call:

deleteRecursively(new ObjectPath("/User/1000/photos/ba3f4d3a-c79a-4e22-b5ce-103d7832724b/"));

Be sure to include a trailing slash on the ObjectPath so the SDK knows it's a directory.

5 Posts

November 4th, 2014 10:00

Worked great! Thanks

281 Posts

November 5th, 2014 07:00

Good to hear!  BTW, looking at your file naming convention above:

/User/{userid}/photos/{photoid}

Will you have more than 64k users or 64k photos per user?  With Atmos, we recommend you keep directory sizes lower than 64k items for performance reasons.  If you are going to exceed those limits, you may want to reconsider your naming conventions.

No Events found!

Top