I have yet to come across guidelines of using immutable objects by Pivotal for Spring Reactive programming. I may have missed this as there is a lot of documentation. I know that in functional langauges such as Haskell all objects are immutable. Immutablility is important on multi-threaded applications. If anybody has any documentation from Pivotal for using immutable objects for Spring Reactive can you please help me on this.
Asked
Active
Viewed 42 times
0
-
What kind of information are you looking for? What immutability means in the context of Java? How to create immutable objects in Java? How to use them in Spring Reactive programming? Or something else totally? And why does the documentation about mutability itself must be from Pivotal? – Tarmo Jun 13 '23 at 12:09
-
I am looking to see if they have any official recommendations of how immutability should be used in to their reactive framework, which a functional API. – shodz Jun 13 '23 at 15:13
-
1Immutability itself seems simple enough concept that I don't see why it would need separate documentation from Pivotal. All objects that move through flows (Mono's, Flux's) should be immutable (ie their final state is decided on constructiona and can't change later). Same applies to all services. Also never use ThreadLocal. That pretty much sums it up. Heres a really good post that might help you realise why and put everything into context: https://stackoverflow.com/a/70938031/3020903 – Tarmo Jun 14 '23 at 09:00