Expand my Community achievements bar.

Handling multiple group

Avatar

Former Community Member
Hello,



I'm quite inspired by the example MultipleGroups included in
the sdk and I start implementing this feature on my project.



I create a group for each individual conversation between
users in a room. So I got a unique groupName identifying each group
of discussion.

However, during my tests, I realised that I will end up with
many group that won't be used.

So I need to clean the sharedModel dedicated to those unused
group.



And I'd like to know how to delete the collectionNode created
for each new group.



I've read in the doc that I could use a stream to gather
those collectionNode created for a group. And in deleting a stream,
It would delete everything linked to the deleted stream. But I
didn't quite catch how to make it happen.



Do you have any suggestion or example on how to adress this
problem ?
9 Replies

Avatar

Former Community Member
Hi ,



The best way to clean up your room is to go through the
DevConsole Air App provided with your SDK. Go into your room in
Devconsole, and clean those collectionnodes ( group nodes) you
don't need. Normally the nodes for audio/camera in groups have a
convention of groupName_nodeName by default. So, you should be able
to identify all the nodes. CocomoDevConsole is a very handy tool
not just for cleaning but also viewing what all nodes are there in
the room, the message items within the nodes as well as setting
some default Room Settings.

Please go through the docs for DevConsole for more details
about it.

Thanks

Hironmay Basu

Avatar

Former Community Member
Hi,



Actually, I'm using the AIR DevConsole to view and clean the
collectionNode, but I'm looking for an industrial mode to handle
those collectionNode created for a specific group.



In my project, I will end up managing too many groups to
consider the DevConsole interface as a solution. I'd prefer to
programmatically delete thoses CollectionNode when all the users
leave the group.



Do you have any solution in mind to help me ?



Thanks



Best Regards



Bobby

Avatar

Former Community Member
Hi,



You can use various paramters of NodeConfiguration for
retracting your items based on users leaving or the session being
closed.


http://livedocs.adobe.com/labs/acrobatcom/com/adobe/rtc/messaging/NodeConfiguration.html



You can use the parameter userDependantItems for retracting
items when an user leaves.

You can use sessionDependantItems for retracting items when a
session is closed.

Whenever you create a node , you need to use the correct
configuration you want.



Thanks

Hironmay Basu

Avatar

Former Community Member
Hello,



Actually, I've already manage my own items and nodes in the
collectionNode I created. But my issue, is that I end up with an
empty collectionNode (no nodes, nor items) and I have no way to
delete this collectionNode.



I'm wondering why there is no method in CollectionNode that
would alow to remove a collectionNode like
CollectionNode.remove(p_collectionNodeName:String).



Thx for your help

Bobby

Avatar

Former Community Member
Hi,



There is something called RootCollectionNode. In
com.adobe.rtc.util , you will find utilities like
RootCollectionNode and RoomCleaner. In a room, there is only one
RootCollectionNode and all the collectionNodes are child to it. You
can use this Class to add or remove the collection nodes you want
programmatically. RootCollectionNode class has API's for removing
collectionNodes.



Thanks

Hironmay Basu

Avatar

Former Community Member


Hi nguyen_b,



It's also worth noting that if you're not subscribing to
them, it's not a terrible drag on the system to leave old nodes
around on the service. We usually suggest allocating a swatch of
collectionNodes around and "recycling" them as necessary. As Basu
says, old collectionNodes can also be deleted with
RootCollectionNode.



nigel

Avatar

Former Community Member
I've checked RootCollectionNode and I still can't see the
method I should use to delete a collectionNode.



Could you help me in giving me an example of the syntax to
use ?



Thanks



Bobby

Avatar

Former Community Member
Hi Bobby,



Try _rootCollectionNode.removeNode("collectionNodeName");



nigel

Avatar

Former Community Member
Thanks guys for your help !



It works well.



Bobby