<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Thanks. I’m sorry for not making it clear that in my case the communication question is integral to my business logic. I certainly don’t want to abstract it away behind a general purpose tool which involves sequential fundamentals such as single threaded message queues. XMPP would inevitably come into play higher up in the application stack but I’d be hard-pressed to latch my design paradigm to the general messaging mindset. From my project’s perspective messaging would be of its many derivatives.<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>I’m interested in learning as much as possible from those who designed other more general purpose implementations such a you mentioned. I particularly found the RabbitMQ best practices article very useful. The general gist of those boils down to using your best understanding of your clients, data and resources to design your messages and message queues so bottlenecks are avoided as a result. That’s fine, when you know those things in advance which I simply don’t. Everything about my clients, data and resources would be constantly changing. I’d be a fool to try and predict any of it at design time and an idiot to then try impose my predictions on reality. But I am confident that I can abstract the nature of changes my clients, data and resources would changes would be subjected to well enough to design and build the code to measure and respond to those changes as and when they happen. In terms of the RabbitMQ best practices I mentioned, that would translate into adapting the design of my queues, nodes and messages back and forth based on transient, slow-changing and fast-acting changes – not what I’d call simple nor practical. <o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>I’ve managed to simplify the solution down to a single core datatype in which all data is stored, exchanged and referenced, ranging from a few bytes to as big as needed but with a large composite key. The obvious storage problem this introduces is overcome by applying the optimization techniques which Edgar Codd taught and many more dynamically at run-time based on measured meta-data as opposed to design time based on forecast-based modelling. While that may seem impossibly complex to pull off, it actually becomes brilliantly simple and easy once you’ve set up the environment at the appropriate level of abstraction. <o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:12.0pt;color:black'>From: </span></b><span style='font-size:12.0pt;color:black'>T Ty <tty.erlang@gmail.com><br><b>Date: </b>Wednesday, 6 November, 2019 at 11:04<br><b>To: </b>"marthin@lobeshare.co.za" <marthin@lobeshare.co.za><br><b>Cc: </b>Erlang Questions <erlang-questions@erlang.org><br><b>Subject: </b>Re: [Original] Re: Solving the right problem<o:p></o:p></span></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><p class=MsoNormal>I would suggest you ignore the Erlang/Elixir mode of thought as a starting point.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Your architecture is closely related to either XMPP or AMQP protocol and suggest you base it off these instead of heading straight down do a coding language. Of course I would be bias towards MongooseIM or RabbitMQ. This abstracts the entire communication question away and you can focus on the business logic. <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>In XMPP, each client device and server would be XMPP clients and both would communicate using simple text based coded messages. You automatically get federation and presence notification. Store and forward is automatically built in. XMPP is also moving towards addressing IoT devices which might further simplify your architecture.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>In RabbitMQ each client/server would have a two queue (in/out) and all communications goes through these. Multiple clients can share a single queue pair if they are grouped together e.g. all clients within the same geo-location. <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Cheers<o:p></o:p></p></div></div></div></body></html>