Hi, i'm an Android developer and just begin with rxJava.
I want to replace my AsyncTask by using RxJava.
With AsyncTask A for example i make multiple network sequential requests and database update in background : (Request 1 response from server Request2 response write1 to database) and then update mainThread
AsyncTask B is triggered by a firebase message and can too call server and write to database for exemple : (Request 3 response Request 4 response write2 to database) in backgournd and then update mainThread
As aynsctaskA and AsynctaskB can not run concurrently i'm sure that this two tasks will not overlap i can only have :
(Request 1 response from server Request2 response from server write1 to database) and then (Request 3 response Request 4 response write2 to database or
(Request 3 response Request 4 response write2 to database) and then (Request 1 response from server Request2 response from server write1 to database)
With Rx java i understand how to achieve the same work but how can i be sure that it will not overlap ? How can i avoid have for example : Request1 response Request3 response Request4 Request2 response write1 write 2 (in background) ?