Ports as Routes, sort-of

I was thinking about Chad’s post Chadtech/mail : Making ports act like http requests and the reactions it got.

I’ve become more comfortable with the Ports and Messages refrain. The issue that Chad tried to address is the ‘return’ message. The challenge is to go from some serialisable form of data to a Message that can be applied at the right level of the update hierarchy.

My observation is that we do that already with routing. We start with a url - a string - which we parse, and then provide handlers to that the routing data passes through one or more update functions before using the remaining data to do something to our model.

Could that be an easier way to conceptualise the handling of return messages?

I can’t immediately see why Routes and Port messages could be handled by the same update boilerplate, with just the lowest level leading to different handling.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.