Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where should Rx be used? [duplicate]

I'm thinking about bringing in Rx to my workplace but the more I learn about it the more I think it doesn't really give you an advantage.

We have a lot of server apps that take input data at one end and output it at the other end. Which is perfect for the actor model and "infinite" threading scalability, till now I've used ConcurrentQueues to implement message passing and I thought that Rx might be a good more functional alternative that can make concurrency more implicit that helps me move some of the data flow decisions from imperative code to the declarations of observables.

But reading about it and trying it I don't see much advantage over using regular old threads with ConcurrentQueues for message passing. What advantages does Rx give me? It is always said that even though .NET 4.5 made a lot of Rx obsolete (though async and Dataflow) it's still good for handling event streams. What cases present event streams and how do I identify them?

like image 665
Ziv Avatar asked Apr 09 '13 20:04

Ziv


People also ask

What is duplicate medication?

Therapeutic duplication is the practice of prescribing multiple medications for the same indication or purpose without a clear distinction of when one agent should be administered over another.

What is the purpose of numbering the prescription?

Prescription Number (Rx being an abbreviation for prescription). This number identifies YOUR prescription . Numbers are assigned in the order they are filled at the pharmacy. When calling in for a refill, providing this number can make for easy identification by pharmacy staff.

What is the second part of prescription?

There are four parts to a drug prescription. The first is the superscription, the symbol ℞ from the Latin recipe, meaning “take.” The second part is the inscription, specifying the ingredients and their quantities. The third part is the subscription, which tells the pharmacist how to compound the medicine.

How long do pharmacies keep prescription records Qld?

* Prescription records: At least three years. This applies to all dispensed medicines, irrespective of poisons schedule and will be electronic. * Claimable Pharmaceutical Benefit prescriptions: At least two years as per Medicare auditing requirements.


1 Answers

If you need to parallelize some tasks, use TPL.

If you need to perform asynchronous operations, use Task & async/await.

If you need to receive, filter and combine streams of events, use Rx. Note that Rx is not necessarily asynchronous - it is simply a model for dealing with event streams in the same way that LINQ is a model for dealing with collections.

Your use case sounds like the first option.

like image 55
Alex Avatar answered Oct 06 '22 19:10

Alex