-
![](https://cdn.hzrd149.com/5ed3fe5df09a74e8c126831eac999364f9eb7624e2b86d521521b8021de20bdc.png)
@ hzrd149
2025-02-06 16:41:25
rx-nostr and applesauce work really well together to build a simple DVM
I refactored my nostr:npub1mkvkflncllnvp3adq57klw3wge6k9llqa4r60g42ysp4yyultx6sykjgnu DVM to be a little simpler
Its now broken into two parts. first the relay subscription pipeline https://github.com/hzrd149/libretranslate-dvm/blob/master/src/index.ts
Then the job translation job itself https://github.com/hzrd149/libretranslate-dvm/blob/master/src/job.ts
Its using rxjs observables and AsyncGenerators so the code is very clean and reads from top to bottom instead of jumping around and calling all kinds of functions
And rx-nostr is handling all the relay connection (and re-connection) for me so the DVM shouldn't go offline anymore