#Use pgo with Lustre

1 messages · Page 1 of 1 (latest)

blissful python
#

So, after creating a server components app with lustre, I wanted to connect to a pgo db and, while I already have the db connection in the model, I don't know if I should structure my db queries and mutations (i think that's the name of it) using events or something else. Could someone enlighten me?

odd gorge
#

you should wrap all these things as custom Effects and dispatch messages back to your application

blissful python
#

ok

odd gorge
#

a kinda core part of lustre applications is that the view and update functions are "pure", aka they dont perform side effects directly. instead we construct Effects and give them to the runtime to perform. This forces the result of those effects (if there is one) to come back into our application as a Msg so we're handling all this stuff in one place