Code comments.
This commit is contained in:
@@ -4,7 +4,17 @@ import java.io.IOException;
|
||||
|
||||
/**
|
||||
*
|
||||
* Tolerant Reader is an integration pattern that helps creating robust communication
|
||||
* systems. The idea is to be as tolerant as possible when reading data from another
|
||||
* service. This way, when the communication schema changes, the readers must not break.
|
||||
*
|
||||
* In this example we use Java serialization to write representations of RainbowFish
|
||||
* objects to file. RainbowFish is the initial version which we can easily read and
|
||||
* write using RainbowFishSerializer methods. RainbowFish then evolves to RainbowFishV2
|
||||
* and we again write it to file with a method designed to do just that. However, the reader
|
||||
* client does not know about the new format and still reads with the method designed for
|
||||
* V1 schema. Fortunately the reading method has been designed with the Tolerant Reader
|
||||
* pattern and does not break even though RainbowFishV2 has new fields that are serialized.
|
||||
*
|
||||
*/
|
||||
public class App {
|
||||
|
Reference in New Issue
Block a user