All Questions
6
questions
0
votes
1
answer
267
views
Returning a Stream of Entities using a Transactor inside a Resource in Doobie
I'm trying to implement a query that returns the extracted information inside a fs2.Stream. I defined the Jobs algebra:
trait Jobs[F[_]] {
def all(): fs2.Stream[F, Job]
}
Then, I implemented an ...
0
votes
1
answer
191
views
Parallelizing operations within a ConnectionIO transaction
So I have a program in which I get a list of file paths from a database, delete those files on the filesystem and finally delete the file paths from the database. I put all operations inside a ...
0
votes
1
answer
664
views
How to publish an FS2 Stream generated by Doobie to Kafka
I want to publish a long list of events into Kafka consuming an fs2.Stream that corresponds to a very big list of DB rows that will eventually cause an Out Of Memotry error if compiled to List.
So, ...
1
vote
0
answers
290
views
Is it possible to push values to Kafka asynchronously using cats.effect.IO and FS2 Streams while returning an HTTP response immediately?
The problem that I'm trying to solve can be described as follows:
A k8s scheduler calls each Monday morning an HTTP endpoint of my Finagle/Finch application
The HTTP endpoint will handle the request ...
2
votes
2
answers
2k
views
Save Doobie stream from database to file
Doobie select returns an fs2.Stream(doobie.ConnectionIO, String). If we need to write it to file the obvious option is to call stream.compile.toList.transact(transactor) and then save this list to ...
0
votes
0
answers
371
views
Reading using doobie
I have defined repository:
trait Repo[F[_]] {
def findAll: Stream[F, Stop]
}
and it's implementation:
class DoobieRepo[F[_]: Sync](xa: Transactor[F]) extends Repo[F] {
override def findAll: ...