# Base Communication model

**URL:** <https://alloytools.discourse.group/t/base-communication-model/165>\
**Category:** Uncategorized\
**Created:** [June 23, 2021, 1:16pm UTC](https://alloytools.discourse.group/t/base-communication-model/165 "2021-06-23T13:16:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter.kriens](https://yyz2.discourse-cdn.com/free1/user_avatar/alloytools.discourse.group/peter.kriens/32/3_2.png) [@peter.kriens](https://alloytools.discourse.group/u/peter.kriens)\
**Post date:** [June 23, 2021, 1:16pm UTC](https://alloytools.discourse.group/t/base-communication-model/165/1 "2021-06-23T13:16:00Z")

</div>

I want to model MQTT, a message based protocol for publish-subscribe. Does anybody have a good base model for message based communication models that supports unreliable communication and connections breaking?

---

<div class="post-metadata">

**Author:** ![hwayne](https://yyz2.discourse-cdn.com/free1/user_avatar/alloytools.discourse.group/hwayne/32/67_2.png) [@hwayne](https://alloytools.discourse.group/u/hwayne)\
**Post date:** [June 24, 2021, 5:32am UTC](https://alloytools.discourse.group/t/base-communication-model/165/2 "2021-06-24T05:32:44Z")

</div>

None that I’m aware of, so I started work on a base model. Will try to get it up when it’s done.

---

<div class="post-metadata">

**Author:** ![peter.kriens](https://yyz2.discourse-cdn.com/free1/user_avatar/alloytools.discourse.group/peter.kriens/32/3_2.png) [@peter.kriens](https://alloytools.discourse.group/u/peter.kriens)\
**Post date:** [June 24, 2021, 8:00am UTC](https://alloytools.discourse.group/t/base-communication-model/165/3 "2021-06-24T08:00:26Z")

</div>

> so I started work on a base model

Great!

Can you work on such a base model in a place where I can contribute/comment? Will you leverage the new temporal features?

---

<div class="post-metadata">

**Author:** ![hwayne](https://yyz2.discourse-cdn.com/free1/user_avatar/alloytools.discourse.group/hwayne/32/67_2.png) [@hwayne](https://alloytools.discourse.group/u/hwayne)\
**Post date:** [June 24, 2021, 4:45pm UTC](https://alloytools.discourse.group/t/base-communication-model/165/4 "2021-06-24T16:45:50Z")

</div>

Sure, I’ll throw up a gist when I have something. I stick to official versions for teaching purposes, so I’m not using the new temporal features.

---

<div class="post-metadata">

**Author:** ![hwayne](https://yyz2.discourse-cdn.com/free1/user_avatar/alloytools.discourse.group/hwayne/32/67_2.png) [@hwayne](https://alloytools.discourse.group/u/hwayne)\
**Post date:** [June 25, 2021, 12:37am UTC](https://alloytools.discourse.group/t/base-communication-model/165/5 "2021-06-25T00:37:45Z")

</div>

Have a draft up: [Pub-Sub for Alloy · GitHub](https://gist.github.com/hwayne/363fc2ca8130cbc9352f4bf7390807e6)

Plan to also write a prose breakdown to people learning Alloy, once we decide the model isn’t terrible or anything

EDIT: This is implicit, but one of the ways it models “unreliable communication” is that we _don’t_ have the fact that `all s: Sub, m: Message | some t: Time | (m -> t) in s.received`.
