Open dckc opened 4 years ago
The name Media Service is pedantic. At the time of naming I may have gotten into the weeds amongst word definitions. I think I was using the plural version of medium, where the chosen definition of medium was "a means by which something is communicated or expressed".
It didn't end up as "email service" because the same setup can be used to secure phone numbers and communication with phones, or a facebook account, or anything really (future work). "media", confusingly, ended up as best word I could find at the time for this broader scope of communication functionality.
I'm not claiming createEmail
is clear (thank you for the feedback), but I'm not sure if mailbox is appropriate. Perhaps I can attempt to describe again and see if this matches what you expect.
To setup email domain from which I will send an email, I would create an EmailDomainIdentity, for example tristan.com
. This allows me to send email from @tristan.com
addresses. When I create an Email, I'm creating an alias, so, for example, having dan@example.com
as the email I want to send messages to, I create an Email for dan@example.com
, and receive sendEmail
capability. When I invoke sendEmail
capability, I specify me@tristan.com
as the from address, and the to address will (opaquely to me) be set to dan@example.com
. Is that what you got out of the docs?
Using long descriptive names, I would translate createEmail
as createEmailAddressProxy
and sendEmail
as sendToEmailAddressViaProxy
.
I also see how sendEmail
and deleteEmail
are confusing. The word "Email" in each has a different meaning. In sendEmail
, "email" means the message being sent. In deleteEmail
, "email" means the resource Email (the email address proxy alias thing). Naming is hard :(
"having dan@example.com as the email I want to send messages to"
That is: the email mailbox you want to send messages to, right? Email is an adjective. It's used as an abbreviation for email message and email mailbox (and probably email address sometimes too).
Capability literature overlaps with OOP literature quite a bit, so I'm used to noun phrases: " a send facet of a mailbox" for a capability rather than verb phrases such as sendEmail. But I suppose that's a matter of style.
But yes... the bigger problem is where email means one thing in sendEmail and another in deleteEmail.
The media service is intriguing, but the name is odd. The name "media service" suggests something about photo or video sharing. Why not "email service"? Or "email privacy service"?
Meanwhile... in the API,
createEmail
would be more clear ascreateMailbox
if I understand what it's doing.p.s. this is perhaps off topic for this repo, but I don't see another public discussion forum for the service.