For The JVM
Deven Phillips
Senior Software Engineer
Sungard Availability Services
July 2015
Java Users Group of Greater Louisville
1. Responsive
2. Resilient
3. Elastic
4. Message Driven
http://www.reactivemanifesto.org/
1. Fast Failure
2. Reliable Timeouts
3. Builds Confidence
1. Replication
2. Containment
3. Isolation
4. Recovery
5. Testing
1. Sharding
2. Replication
3. Scaling
4. Monitoring
1. Location Transparency
2. Loose Coupling
3. Fault Isolation
4. Error Delegation
https://gist.github.com/staltz/868e7e9bc2a7b8c1f754
/* * Fetch a list of Wikipedia articles asynchronously, with error handling. */ def fetchWikipediaArticleAsynchronouslyWithErrorHandling(String... wikipediaArticleNames) { return Observable.create({ subscriber -> Thread.start { try { for (articleName in wikipediaArticleNames) { if (true == subscriber.isUnsubscribed()) { return; } subscriber.onNext(new URL("http://en.wikipedia.org/wiki/"+articleName).getText()); } if (false == subscriber.isUnsubscribed()) { subscriber.onCompleted(); } } catch(Throwable t) { if (false == subscriber.isUnsubscribed()) { subscriber.onError(t); } } return (subscriber); } }); }
That's up to you to decide...
The answer varies depending on the application and the team and the company you are working for!
Let's Look At Some Code!