Improbable Icon

Forums

Entity read layer for client


#1

Hey,

I just switched to new layer feature. However I am a bit confused what should go into “Read A.C.L. Attribute” for client? I tried reading docs, but there was very little about it and only for write acl.

For example, I have snapshot in text format:

entity {
entity_id: 1
entity_state {
[schema.improbable.EntityAcl.component_extension] {
field1_read_acl {
field1_attribute_set {
field1_attribute: “game”
}
field1_attribute_set {
field1_attribute: “visual”
}
}
field2_component_write_acl {
key: 54
value {
field1_attribute_set {
field1_attribute: “game”
}
}
}
field2_component_write_acl {
key: 50
value {
field1_attribute_set {
field1_attribute: “game”
}
}
}
field2_component_write_acl {
key: 1235
value {
field1_attribute_set {
field1_attribute: “game”
}
}
}
}
[schema.improbable.Position.component_extension] {
field1_coords {
field1_x: 0
field2_y: 0
field3_z: 0
}
}
[schema.example.MyComponent.component_extension] {
field1_my_blabla: 0
}
[schema.improbable.Persistence.component_extension] {
}
}
}

Currently I have written “visual” layer for client, but that does not work. Also to be sure for write acl, I need to write the actual client name id?


#3

Hey @Manoo

Read ACL should be quite straightforward. What exactly do you mean by not working? Does Client worker not able to see the entity has Read ACL? Btw you don’t need to right Worker Name for write ACL unless you want to manually assign the authority to a worker. You also want to check if the attribute such like game really matches with the worker name or not.

Let me know how are you getting on with this.

Best Regards

Stan


#4

Thanks for response @Stan. Sorry for a unclear questions, still trying to figure out how everything works…

Okey I figure it out that write ACL for specific client requires “workerId:” prefix. So now client gets authority under my component as expected.

Any way, I’m still confused about read ACL. So currently I gave client worker layer named “visual” and I used it for all ACL read in entities - everything works (Same way as it was with attributes).


“bridge”: {
“worker_attribute_set”: {
“attributes”: [ “visual” ]
},

However, according the docs, I am not suppose to have layers for clients:
(Is it possible that attribute only treated as layer, if it is specified in load balancing? Maybe that is the reason why I am confusing it)


What about clients?#

Clients aren’t part of layers, and neither are the components they have authority over. If you want a client to have authority over a component, you leave that component out of layers, and specify that it’s assigned to that specific client instance instead.

If I correctly assume what is saying from docs, in what way I suppose to specify that read ACL for all clients?