Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the difference between RxJava and Bolts?

I have done research on this, and I know that RXJava is using the observable pattern, and Bolts is relying on an executor. What framework would be good for handling tasks that need to be done in sequences?

I've heard of using singleExecutors, queues, chaining asynctasks, and these two frameworks. I've seen more people using bolts vs. rxjava but am curious to hear about peoples experiences between the two.

Thanks!

like image 437
reidisaki Avatar asked Jul 18 '16 16:07

reidisaki


1 Answers

I've used both in different projects and have done a migration from Bolts to RxJava. The simple answer to your question

What framework would be good for handling tasks that need to be done in sequences?

Is that you could easily use either framework to do this. They both:

  • Allow tasks to be chained one after another
  • Enable the executor, etc to be specified for each task
  • Allow errors to be captured and dealt with at a convenient time

However that is where Bolts functionality ends pretty much whilst RxJava just keeps on giving. The real power of RxJava lies in its operators which amongst other things allow you to transform, combine & filter data.

The learning curve for both frameworks is steep, RxJava is steeper...but it is considerably more powerful.

As an aside the method counts for the two libraries are

RxJava - 4605
Bolts  - 479
like image 133
Jahnold Avatar answered Oct 14 '22 08:10

Jahnold