# Is acts as nested set safe in a concurrent environment?

**URL:** <https://www.ruby-forum.com/t/is-acts-as-nested-set-safe-in-a-concurrent-environment/53485>\
**Category:** Rails\
**Created:** [February 7, 2006, 11:56am UTC](https://www.ruby-forum.com/t/is-acts-as-nested-set-safe-in-a-concurrent-environment/53485 "2006-02-07T11:56:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gschaefer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8edcca/32.png) [@gschaefer](https://www.ruby-forum.com/u/gschaefer)\
**Post date:** [February 7, 2006, 11:56am UTC](https://www.ruby-forum.com/t/is-acts-as-nested-set-safe-in-a-concurrent-environment/53485/1 "2006-02-07T11:56:17Z")

</div>

Hi I was wondering if acts\_as\_nested\_set can be used safely with  
concurrently updates? The fact that so much of the tree needs to be  
rewritten on inserts concerns me. Is anyone actually using it. I  
noticed that the status of acts\_as\_nested\_set was unclear at the time  
the rails book was written.

Regards,

Glen

---

<div class="post-metadata">

**Author:** ![gschaefer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8edcca/32.png) [@gschaefer](https://www.ruby-forum.com/u/gschaefer)\
**Post date:** [February 7, 2006, 1:59pm UTC](https://www.ruby-forum.com/t/is-acts-as-nested-set-safe-in-a-concurrent-environment/53485/2 "2006-02-07T13:59:35Z")

</div>

Hi,

on a project of mine I’m messing around with b\_prime\_tree which is  
another  
nested\_set implementation by the creators of hieraki. But I’ve got the  
same  
“bad feelings” about larger trees and their updates that you seem to  
have.  
I’ve already thought about building my trees in xml files, since xml  
feels a  
so much more natural choice for trees than sql is, but am not yet  
willing to  
trade the niceties of ar (and pure rdbms relationships in general) for  
my  
trees.

keep us posted about your progress on trees.

Best Regards  
Jan P.

2006/2/7, Glen S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![gschaefer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8edcca/32.png) [@gschaefer](https://www.ruby-forum.com/u/gschaefer)\
**Post date:** [February 15, 2006, 3:47pm UTC](https://www.ruby-forum.com/t/is-acts-as-nested-set-safe-in-a-concurrent-environment/53485/3 "2006-02-15T15:47:10Z")

</div>

Make sure you download the most recent copy of the b\_prime\_tree library.  
(  
[http://www.hieraki.org/trac/browser/trunk/app/models/wiki/b\_prime\_tree.rb](http://www.hieraki.org/trac/browser/trunk/app/models/wiki/b_prime_tree.rb)  
)

Alex
