Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
/ by Igor Lozynskyi
/ by Oleh Dokuka
RSocket - new
Reactive-Streams
protocol
2
For whom this talk:
/ Reactive programmers
/ Protocols geeks
/ Curious people
/ We assume, you know what Reactive is
Реактивный Хардкор
/ Oleh Dokuka
33
Igor Lozynskyi
Oleh DokukaРеактивный Хардкор
/ Oleh Dokuka
44
6
Agenda
/ Why RSocket?
/ What is RSocket?
/ How To RSocket?
Intro:
story
7
HTTP requests
WebSockets
WebSockets
RxJava JDBC
REST
WebSockets
RxJava WebSocket Server
WebSockets
RxJava JDBC
REST
RxJava
WebSockets
JDBC/HTTP/Clients
RxJava RxJava
WebSockets
JDBC/HTTP/Clients
RxJava WS
RxJava WebSocket
Server
Client
Pros
/ Don’t care about WS
/ Allows seamless reactive code
/ Designed for streams of data
Cons
/ Not very resource-efficient
/ No Backpressure support
/ Have to support RxWS library:
/ RxWS Server
/ RxWS Client
23
Efficient,
Application Level protocol
24
Binary
25
Binary
Format agnostic
Massive efficient for machine to machine
Built-in framing
Not human readable
Have to encode/deco...
26
Multiplexed
STREAM BLUE
STREAM YELLOW
STREAM RED
27
Multiplexed
28
Multiplexed
Efficient hardware utilization
Built-in logical streams within physical
stream
29
Bi-directional
STREAM BLUE
STREAM RED
30
Bi-directional
Client - Server just to start
Built-in peer to peer communication
31
Backpressure
Reactive-Streams
109
32
All features of Reactive Streams
Built-in signals materializing/dematerializing
Reactive-Streams
Backpressure
33
Interaction modes
Multi
34
Request-Response
Interaction modes
STREAM YELLOW
35
Most common interaction model
Useful for plain data exchange
Async and multiplexed
Request-Response
36
Fire-and-Forget
Interaction models
STREAM YELLOW
37
Optimized Request-Request response
Only transport delivery guaranties needed
Immediately release resources
Fire-and-For...
38
Request-Stream
Interaction models
STREAM YELLOW
39
Built-in one-way streaming
Backpressure support
Faster
Request-Stream
40
Stream-Stream
Interaction models
STREAM YELLOW
41
Built-in two-way streaming
Async, multiplexed (no-blocking)
Channel
42
Wide list of interaction modes
Efficient solutions for most common
interactions
Interaction modes
How to RSocket?
43
Demo
44
https://github.com/netifi/rsocket-talk-demo/tree/master/demo-1-rsocket-java
Echo:
45
46
Language agnostic
Demo
47
https://github.com/netifi/rsocket-talk-demo/tree/master/demo-2-rsocket-polyglot
Hello
48
49
Architecture
agnostic
50
Format agnostic
51
52
1
∞
Demo
53
https://github.com/netifi/rsocket-talk-demo/tree/master/demo-3-from-grpc-to-rsocket-rpc
54
HTTP/2 Flow Control
55
GRPC Flow
Control
Could impact Resilience
Could impact Performance
Demo
56
https://github.com/netifi/rsocket-talk-demo/tree/master/demo-3-from-grpc-to-rsocket-rpc
57
58
RSocket-RPC Flow Control
Built-it Backpressure - means Resilience
Pull-Push Flow control - means Performance
59
Transport agnostic
Demo
60
What else?
61
62
Metadata & Payload in frame
/ Can send a long with message any meta info
/ Could be used for encoding decoding purpose
63
Fragmentation
/ Any payload size
/ Transport take care of proper delivery by
chunks
64
Cancelation
/ Can safely cancel logical stream
65
Leasing
/ Server can control clients requests
/ Preserve server stability
66
Resumability
/ Designed for mobile network
/ Can resume streaming in case of network
partitioning / disrupting
67
Maintainers
68
Users
69
Frameworks
Proteus framework
Let’s look to
again
RxJava RxJava
WebSockets
JDBC/HTTP/Clients
Reactor Reactor
JDBC/HTTP/Clients
WebSockets
Reactor Reactor
JDBC/HTTP/Clients
74
Summary
/ Is not aimed to replace but enforce
75
76
77
78
79
Summary
/ Is not aimed to replace but enforce
/ Designed to save your money and time
/ Fast, low-latency, light-weight
80
Learn more
/ RSocket Talk - https://bit.ly/2DUVcZ8
/ RSocket Page - http://rsocket.io/
/oleh.dokuka
/OlegDokuka
/OlehDokuka
Q&A
Thank you!
/aigor
/siromaha
/ihor.lozinsky
2018
Nov 24
Presentation
Code
RSocket — new Reactive cross-network Protocol? Олег Докука и Игорь Лозинский
RSocket — new Reactive cross-network Protocol? Олег Докука и Игорь Лозинский
RSocket — new Reactive cross-network Protocol? Олег Докука и Игорь Лозинский
RSocket — new Reactive cross-network Protocol? Олег Докука и Игорь Лозинский
Nächste SlideShare
Wird geladen in …5
×

RSocket — new Reactive cross-network Protocol? Олег Докука и Игорь Лозинский

154 Aufrufe

Veröffentlicht am

Java meetup of Open Tech Week by Sigma Software, Odesa 2018

Veröffentlicht in: Software
  • Als Erste(r) kommentieren

RSocket — new Reactive cross-network Protocol? Олег Докука и Игорь Лозинский

  1. 1. / by Igor Lozynskyi / by Oleh Dokuka RSocket - new Reactive-Streams protocol
  2. 2. 2 For whom this talk: / Reactive programmers / Protocols geeks / Curious people / We assume, you know what Reactive is
  3. 3. Реактивный Хардкор / Oleh Dokuka 33 Igor Lozynskyi
  4. 4. Oleh DokukaРеактивный Хардкор / Oleh Dokuka 44
  5. 5. 6 Agenda / Why RSocket? / What is RSocket? / How To RSocket?
  6. 6. Intro: story 7
  7. 7. HTTP requests
  8. 8. WebSockets
  9. 9. WebSockets
  10. 10. RxJava JDBC REST WebSockets
  11. 11. RxJava WebSocket Server
  12. 12. WebSockets RxJava JDBC REST
  13. 13. RxJava WebSockets JDBC/HTTP/Clients
  14. 14. RxJava RxJava WebSockets JDBC/HTTP/Clients
  15. 15. RxJava WS
  16. 16. RxJava WebSocket Server Client
  17. 17. Pros / Don’t care about WS / Allows seamless reactive code / Designed for streams of data
  18. 18. Cons / Not very resource-efficient / No Backpressure support / Have to support RxWS library: / RxWS Server / RxWS Client
  19. 19. 23 Efficient, Application Level protocol
  20. 20. 24 Binary
  21. 21. 25 Binary Format agnostic Massive efficient for machine to machine Built-in framing Not human readable Have to encode/decode yourself
  22. 22. 26 Multiplexed
  23. 23. STREAM BLUE STREAM YELLOW STREAM RED 27 Multiplexed
  24. 24. 28 Multiplexed Efficient hardware utilization Built-in logical streams within physical stream
  25. 25. 29 Bi-directional STREAM BLUE STREAM RED
  26. 26. 30 Bi-directional Client - Server just to start Built-in peer to peer communication
  27. 27. 31 Backpressure Reactive-Streams 109
  28. 28. 32 All features of Reactive Streams Built-in signals materializing/dematerializing Reactive-Streams Backpressure
  29. 29. 33 Interaction modes Multi
  30. 30. 34 Request-Response Interaction modes STREAM YELLOW
  31. 31. 35 Most common interaction model Useful for plain data exchange Async and multiplexed Request-Response
  32. 32. 36 Fire-and-Forget Interaction models STREAM YELLOW
  33. 33. 37 Optimized Request-Request response Only transport delivery guaranties needed Immediately release resources Fire-and-Forget
  34. 34. 38 Request-Stream Interaction models STREAM YELLOW
  35. 35. 39 Built-in one-way streaming Backpressure support Faster Request-Stream
  36. 36. 40 Stream-Stream Interaction models STREAM YELLOW
  37. 37. 41 Built-in two-way streaming Async, multiplexed (no-blocking) Channel
  38. 38. 42 Wide list of interaction modes Efficient solutions for most common interactions Interaction modes
  39. 39. How to RSocket? 43
  40. 40. Demo 44 https://github.com/netifi/rsocket-talk-demo/tree/master/demo-1-rsocket-java
  41. 41. Echo: 45
  42. 42. 46 Language agnostic
  43. 43. Demo 47 https://github.com/netifi/rsocket-talk-demo/tree/master/demo-2-rsocket-polyglot
  44. 44. Hello 48
  45. 45. 49 Architecture agnostic
  46. 46. 50 Format agnostic
  47. 47. 51
  48. 48. 52 1 ∞
  49. 49. Demo 53 https://github.com/netifi/rsocket-talk-demo/tree/master/demo-3-from-grpc-to-rsocket-rpc
  50. 50. 54 HTTP/2 Flow Control
  51. 51. 55 GRPC Flow Control Could impact Resilience Could impact Performance
  52. 52. Demo 56 https://github.com/netifi/rsocket-talk-demo/tree/master/demo-3-from-grpc-to-rsocket-rpc
  53. 53. 57
  54. 54. 58 RSocket-RPC Flow Control Built-it Backpressure - means Resilience Pull-Push Flow control - means Performance
  55. 55. 59 Transport agnostic
  56. 56. Demo 60
  57. 57. What else? 61
  58. 58. 62 Metadata & Payload in frame / Can send a long with message any meta info / Could be used for encoding decoding purpose
  59. 59. 63 Fragmentation / Any payload size / Transport take care of proper delivery by chunks
  60. 60. 64 Cancelation / Can safely cancel logical stream
  61. 61. 65 Leasing / Server can control clients requests / Preserve server stability
  62. 62. 66 Resumability / Designed for mobile network / Can resume streaming in case of network partitioning / disrupting
  63. 63. 67 Maintainers
  64. 64. 68 Users
  65. 65. 69 Frameworks Proteus framework
  66. 66. Let’s look to again
  67. 67. RxJava RxJava WebSockets JDBC/HTTP/Clients
  68. 68. Reactor Reactor JDBC/HTTP/Clients WebSockets
  69. 69. Reactor Reactor JDBC/HTTP/Clients
  70. 70. 74 Summary / Is not aimed to replace but enforce
  71. 71. 75
  72. 72. 76
  73. 73. 77
  74. 74. 78
  75. 75. 79 Summary / Is not aimed to replace but enforce / Designed to save your money and time / Fast, low-latency, light-weight
  76. 76. 80 Learn more / RSocket Talk - https://bit.ly/2DUVcZ8 / RSocket Page - http://rsocket.io/
  77. 77. /oleh.dokuka /OlegDokuka /OlehDokuka Q&A Thank you! /aigor /siromaha /ihor.lozinsky 2018 Nov 24 Presentation Code

×