question

77418369 avatar image
0 Votes"
77418369 asked 77418369 commented

Do we have to delete anchors that we don't need anymore?

Hi.
We develop AR apps for iOS using Azure Spatial Anchors.
I'd like to know about deleting anchors.

My understanding, we can delete anchors from supported platform(iOS, Android. Unity) but they don't support Web API.
When we need to clean up unnecessary anchors, we have to delete using iOS device.
I think this is not good idea for house keeping using iOS device.

So I have a question.
What if we don't delete unnecessary anchors and keep creating anchors, do you think will be a problem with that?

I would appreciate if you would give me a advice.
Thank you.

azure-spatial-anchors
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

asergaz avatar image
1 Vote"
asergaz answered 77418369 commented

Hello @77418369, the short answer is yes : Deleting anchors when no longer used is a good practice to include early on in your development process and practices, to keep your Azure resources cleaned up. See Delete Anchors Doc.

What if we don't delete unnecessary anchors and keep creating anchors, do you think will be a problem with that?

Yes there will be an unnecessary billing for anchors that you don't need anymore. Specially when you use Coarse relocalization. When using coarse relocalization azure spatial anchors service will find matching anchors and will bill the amount of ids loaded. You can neverteheless set the MaxCount of Ids to cap the cost in CoarseReloc, though still is a best practice that you delete the ones you don't need anymore.

---Updated answer---

From a performance perspective, there may be an impact to deleting certain anchors if you are leveraging anchor relationships. On the other side if you are using AnchorLocateCriteria::Strategy of VisualInformation when searching, then you are not taking advantage of anchor relationships, and deleting unused anchors should not have a performance impact.

When we need to clean up unnecessary anchors, we have to delete using iOS device. I think this is not good idea for house keeping using iOS device.

If you use the API sequence CloudSpatialAnchorSession::GetAnchorPropertiesAsync()->CloudSpatialAnchorSession::DeleteAnchorAsync() , this will make it such you do not have to first locate an anchor before deleting it.

You should also consider creating anchors with an expiration date.



Thanks!

Remember:
- Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
- Want a reminder to come back and check responses? Here is how to subscribe to a notification.








· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@asergaz
Thank you for your reply.
I understood that to keep cleaning Azure resource is the best practice.
It's good to know.

But we aren't going to use Coarse relocalization.

Here is how we use.
1. Start session and save anchors to ASA
2. Save anchor ids to DB
3. Find anchors using ids that is saved.

So when we find anchors, we use specific ids.
Let's say we create 2 anchors in another session.

  1. Creating Anchor
    SessionA
    1. Start session.
    2. Create anchor.(anchorId = AAA)
    3. Save anchorId to DB.

    SessionB
    1. Start session.
    2. Create anchor.(anchorId = BBB)
    3. Save anchorId to DB.

  2. Finding Anchor
    1. Start session.

    2. Find anchor by anchorId(=BBB)

If we don't need AAA, we don't use anchorId(=AAA) anymore.
Since AAA is not related to BBB, so AAA will be never searched.
I think it's not going to be problem unless unnecessary ids are searched.
What do you think?

In this case will we get any problems due to leaving AAA without deleting?
(ex: that affects the performance for finding.)









1 Vote 1 ·

@77418369 thank you for bringing more clarity on your question :). I can't see documentation mentioning we have lower performance when we have more Anchors and use Identifiers to locate our Anchors. Nevertheless I have pinged the Product Team to validate if there will be any other concerns ;).

Appreciate your time so far!


1 Vote 1 ·


@asergaz

Thank you for the confirmation.
Please let me know when you find out anything.

This is my last question.
Are you planning to provide Web API for Azure Spatial Anchors in the future?

Thank you.

1 Vote 1 ·
Show more comments