Add a uniqueness constraint on the ap_url field #79

Closed
opened 2018-06-23 17:21:16 +00:00 by elegaanz · 3 comments
elegaanz commented 2018-06-23 17:21:16 +00:00 (Migrated from github.com)
No description provided.
murrayjbrown commented 2018-09-17 20:46:59 +00:00 (Migrated from github.com)

I presume what's needed here is some way to disambiguate multiple instances on a domain, right? In which case this should be simply achieved by establishing an instance-specific path prefix; i.e., assuming instance names are unique, in plume-models/src/instance.rs:

pub fn compute_box(&self, prefix: &'static str, name: String, box_name: &'static str) -> String {
    ap_url(format!(
        "{instance_domain}/{instance_name}/{prefix}/{name}/{box_name}",
        instance_domain = self.public_domain,
        instance_name = self.name,
        ...
    ))
}
I presume what's needed here is some way to disambiguate multiple instances on a domain, right? In which case this should be simply achieved by establishing an instance-specific path prefix; i.e., assuming instance names are unique, in _plume-models/src/instance.rs:_ ```rust pub fn compute_box(&self, prefix: &'static str, name: String, box_name: &'static str) -> String { ap_url(format!( "{instance_domain}/{instance_name}/{prefix}/{name}/{box_name}", instance_domain = self.public_domain, instance_name = self.name, ... )) } ```
elegaanz commented 2018-10-06 18:37:29 +00:00 (Migrated from github.com)

@murrayjbrown sorry for the late reply, but that's not exactly the problem here: by adding this constraint, we would be sure we never store the same activity more than once.

@murrayjbrown sorry for the late reply, but that's not exactly the problem here: by adding this constraint, we would be sure we never store the same activity more than once.
murrayjbrown commented 2018-10-06 22:05:47 +00:00 (Migrated from github.com)

@BaptisteGelez This issue, then, is impropertly stated. The constraint should be placed, rather, on the uniquess of an activity identifier, which is just a part of what comprises a URL. (I had previously assumed such a basic constraint would have been implemented.)

@BaptisteGelez This issue, then, is impropertly stated. The constraint should be placed, rather, on the uniquess of an activity identifier, which is just a part of what comprises a URL. (I had previously assumed such a basic constraint would have been implemented.)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Plume/Plume#79
No description provided.