missionary

timur 2024-10-19T10:12:08.128839Z

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 🙏

❤️ 12
2024-10-21T19:53:36.415729Z

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)...

❤️ 1
flightcubs 2024-10-22T06:43:59.276479Z

@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!

❤️ 1
awb99 2024-10-19T13:35:10.367769Z

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!

❤️ 1
2024-10-19T17:39:36.175089Z

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))))

Andrew Wilcox 2024-10-23T08:29:38.246369Z

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.

👍 1
leonoel 2024-10-23T21:12:55.459839Z

investigation needed, I filed an issue https://github.com/leonoel/missionary/issues/120

🙏 1