Hi all. I am getting back into making apps with Electric, so I am dustin' off my old https://nextjournal.com/N-litened/missionary-for-dummies tutorial to refresh my own understanding of #missionary, to fix mistakes, and maybe to finally complete it. I'd be happy if this tutorial could be helpful for beginners. Please let me know if you spot any places where I misunderstand things, or if some parts are not palatable for newcomers 🙏
Thank you very much! It's amazing article. looking forward for rest of topics. 👏 I am not afraid to compare it with acclaimed Zionomicon, and the comparison results in your favour. Everything is much clearer and compact (although, of course, Missionary is also much simpler then ZIO)...
@n.litened This is exactly what I was looking for. Really well written, with enough detail, useful context, and reflections along the way. Thank you so much for the writeup!
Thanks @n.litened I am using missionary since some 6 months; and thought I already know it all. But I did learn something new in your tutorial m/blk has unlimited threads, vs m/cpu has cpu number of threads. The original missionary docs were not so specific. I find it highly interesting, because blocking operations might return gigabytes of data, and so if I have unlimited number of threads, then it might be that this causes a core-dump due to excessive memory I guess. So good to know! Also very good to hear different people explain concepts with their own words - this really helps understanding!
Hello! Some kind of error when using another macro inside m/sp macro. Definitely it could be Telemere problem (that is also barely release candidate now), but maybe you know something about such behaviour? I never encountered it before...
(require '[taoensso.telemere :as tt]
'[missionary.core :as m])
(m/sp
(tt/trace! {:id ::test-trace :data {:a 1}}
(+ 1 1))))So m/sp rewrites your code into a state machine, and trace! is a super complicated macro with a giant expansion. I would guess that somewhere in that expansion is something that either m/sp doesn't support, or has a bug where it handles it incorrectly. In general, when running into a problem with m/sp code rewriting, I suggest to try to move as much as possible out of the m/sp. For example, write a function outside of the m/sp which uses trace! and call the function inside of m/sp, or perhaps call dispatch-signal! (https://github.com/taoensso/telemere/blob/master/projects/main/src/taoensso/telemere.cljc#L368) instead of using trace!. Note that either way you'll lose functionality such as getting the line number of the trace, but there may not be much help for that.
investigation needed, I filed an issue https://github.com/leonoel/missionary/issues/120