Reactive Web Applications

50 %
50 %
Information about Reactive Web Applications

Published on September 24, 2015

Author: SpringCentral

Source: slideshare.net

1. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Stephane Maldini Rossen Stoyanchev

2. About the Speakers • • •

3. ReadListener WriteListener ServletInputStream ServletOutputStream • isReady read() write() •

4. request.getParameters()

5. java.util.concurrent

6. onSubscribe onNext* (onError|onComplete)? Publisher Subscriber Subscription request(n) cancel()

7. public interface ServerHttpRequest extends HttpRequest { Publisher<byte[]> getBody(); } public interface ServerHttpResponse extends HttpMessage { Publisher<Void> writeWith(Publisher<byte[]> publisher); }

8. public interface ServerHttpRequest extends HttpRequest { InputStream getBody(); } public interface ServerHttpResponse extends HttpMessage { OutputStream getBody(); }

9. ? ?

10. Publisher<T> <T>

11. Publisher

12. Publisher Streams.just('a' 'b' 'c') .take(2) .map(Character::toUpperCase) .consume(System.out::println);

13. Observable.just('a', 'b', 'c') .take(2) .map(Character::toUpperCase) .subscribe(System.out::println);

14. Observable-Observer Publisher-Subscriber

15. Demo: HeadFirst

16. rx.Observable rx.Subscriber

17. Publisher Subscriber

18. ,

19. Max(request) == Queue.capacity()

20. Publisher

21. Subscriber

22. Subscription.request(n)

23. @RequestMapping("/capitalize") @ResponseBody public Publisher<Person> capitalize(@RequestBody Publisher<Person> persons) { return persons.map(person -> { person.setName(person.getName().toUpperCase()); return person; }); } Publisher

24. @RequestMapping("/capitalize") @ResponseBody public Stream<Person> capitalize(@RequestBody Stream<Person> persons) { return persons.map(person -> { person.setName(person.getName().toUpperCase()); return person; }); } Stream

25. @RequestMapping("/capitalize") @ResponseBody public Observable<Person> capitalize(@RequestBody Observable<Person> persons) { return persons.map(person -> { person.setName(person.getName().toUpperCase()); return person; }); } Observable

26. function() { StreamService.connect("stream") .flatMap(unpackCsv) .subscribe(updateUI, logError, logComplete); } var unpackCsv = function (ev) { return Rx.Observable.from(ev.data ? ev.data.split("n") : []) .filter(discardEmpty) .map(csvToJson) }

27. Learn More. Stay Connected. Thank You for Listening! @smaldini / @rstoya05

Add a comment

Related pages

Reactive Web Applications with Play - Bernhardt

301 Moved Permanently. nginx/1.4.2
Read more

Manning | Reactive Web Applications

You‘ll come away with a solid understanding of how reactive web applications are architected, developed, tested, and deployed.
Read more

Reactive Web Applications: Covers Play, Akka, and Reactive ...

Manuel Bernhardt - Reactive Web Applications: Covers Play, Akka, and Reactive Streams jetzt kaufen. ISBN: 9781633430099, Fremdsprachige Bücher - Java
Read more

Reactive Web Applications

brief contents P ART 1G ETTING STARTED WITH REACTIVE WEB APPLICATIONS .....1 1 Did you say reactive? 3 2 Your first reactive web application 26
Read more

Reactive Web Applications - Manuel Bernhardt (Buch) – jpc

Das Buch Manuel Bernhardt: Reactive Web Applications jetzt portofrei für 39,02 Euro kaufen. Mehr von Manuel Bernhardt gibt es im Shop.
Read more

Reactive programming - Wikipedia

Meteor.js A full-stack, JavaScript-based, reactive web application development platform. ... REScala Reactive programming for OO applications.
Read more

Reactive Web Applications - Scala | XING

Sie setzen auf die gleichen innovativen Web-Technologien, wie die Marktführer? LinkedIn, Twitter, Walmart, Autoscout24 und viele mehr nutzen die ...
Read more

Reactive Web Applications - infoq.com

Stephane Maldini and Rossen Stoyanchev focus on where we are today with building reactive web applications. They take a look at the choice of runtimes, how ...
Read more

Building Reactive Web Applications - Welcome to webml.org

Building Reactive Web Applications Federico M. Facca Stefano Ceri Dipartimento di Elettronica e Informazione Politecnico di Milano P.za Leonardo da Vinci ...
Read more

The Reactive Manifesto

The Reactive Manifesto. ... Today applications are deployed on everything from mobile ... Reactive Systems can react to changes in the input ...
Read more