Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Data Models For initial entities #2

Open
bketelsen opened this issue May 23, 2015 · 19 comments
Open

Create Data Models For initial entities #2

bketelsen opened this issue May 23, 2015 · 19 comments
Assignees

Comments

@bketelsen
Copy link
Contributor

See wiki for initial list of entities.

@bketelsen
Copy link
Contributor Author

Data models in Protobufs v3 for GRPC/GoKit compatibility

@eduncan911
Copy link
Collaborator

https://github.com/gopheracademy/congo/wiki/System-Entities

Reading over the list, how about for Attendees:

Attendee

  • contact info
  • belongs to an event
  • can attend multiple events
  • can attend be a member of multiple conferences
  • be notified of new events for a specific conference (subscribe/opt-in)

EDIT:
In other words, a single "attendee" shared across all conferences and events?

Or perhaps, a single "attendee" per conference, shared across multiple events?
^- this last option would keep it multi-tenant in nature, not sharing users.

@bketelsen
Copy link
Contributor Author

What is being a "member of multiple conferences"?

@bketelsen
Copy link
Contributor Author

WIP of one entity at github.com/bketelsen/congo (see /series/series.go)

@flowchartsman
Copy link
Collaborator

So we don't have to jump around, here is the list of entities

@eduncan911
Copy link
Collaborator

@bketelsen

I was thinking of scratching that, per my last comment (in the edit). To keep it multi-tenanted "conferences", an attendee would only belong to a single conference - not multiples.

@bketelsen
Copy link
Contributor Author

I think it's probably best to keep users assigned at a SERIES level
Repeat GopherCon attendees can save some registration time, but registering for OSCON you'd create a new "account" which belonged to the OSCON series

@flowchartsman
Copy link
Collaborator

Something like this maybe? Then, depending on context, you could just not send the full list of activities or people. For example, when viewing an activity, all attendees have empty attending, and when viewing a person, all attending entries would have empty attendees.

message Activity {
  required int64 id = 1;
  required string name = 2;
  repeated Person attendees = 3;
  //etc.
}
message Person {
  required int64 id = 1;
  required string fname = 2;
  required string lname = 3;
  optional string email = 4;
  repeated Activity attending = 5;
  //etc.
}

@flowchartsman
Copy link
Collaborator

Or, if you wanted to avoid context switching, omit the repeateds above and go with relational messages? Someone with more protobuf experience want to chime in?

message ActivityDetails {
  required Activity activity = 1;
  repeated Person attendees = 2;
  //etc
}

@bketelsen
Copy link
Contributor Author

I like the relational messages better

@bketelsen
Copy link
Contributor Author

so @alaska are you taking the first stab at the entities while @eduncan911 works on the first pass of the router/REST bits?

@eduncan911
Copy link
Collaborator

I think we should keep the same domain naming conventions.

person renamed to attendee?
On May 24, 2015 2:07 PM, "Brian Ketelsen" [email protected] wrote:

so @alaska https://github.com/alaska are you taking the first stab at
the entities while @eduncan911 https://github.com/eduncan911 works on
the first pass of the router/REST bits?


Reply to this email directly or view it on GitHub
#2 (comment).

@flowchartsman
Copy link
Collaborator

Sure thing. That was only an illustrative example anyway. I'll get a pull request out sometime this evening or tomorrow.

@eduncan911
Copy link
Collaborator

@bketelsen yep, the first pass will be stubs for whatever we'll want inside

@bketelsen
Copy link
Contributor Author

https://github.com/frab/frab/blob/master/db/schema.rb
Someone else was kind enough to think through this -- as pointed out by @brianredbeard

@brianredbeard
Copy link

One thing I would call out is making more of the fields optional. (i.e. 'gender' was required in the original and I committed specific changes to our copy to make it optional). It's good as a starter framework.

@flowchartsman
Copy link
Collaborator

No worries there, at least if we're still committed to this protobuf thang. All fields are optional in proto3. "required" and "optional" no longer have any meaning to protobuf.

@flowchartsman
Copy link
Collaborator

I'm guessing protobuf has been abandoned since the messages dir and accompanying files have been removed. Should we close this issue, or continue it forward with the revised scheme?

@bketelsen
Copy link
Contributor Author

let's keep it open, since it isn't protobuf specific. I'm trying goa [1] on for size right now

[1] goa.design

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants