It really depends a lot on the mechanism you use to access the data. If you have very scalable access to data and many threads, using some form of static access to the data of the stream can be beneficial.
If you do not have scalable data access, your provider does not support multiple threads for each process, or you just do not need scalability at this moment, using a singlet with the appropriate synchronization is simpler and easier to implement.
For most business-style applications, I personally find that a singleton approach is easier to maintain, and probably better - if not for any other reason, but much simpler, much easier to test effectively. Having multiple threads for accessing data is probably not required, since accessing data is probably not a bottleneck that affects usability (if you design batch requests correctly as well).
source
share