Profiled with Java profiler.
-
For the best experience import with IntelliJ.
Execute in this order:
- Run
isp.example.service.ReactiveServiceApplication
- A Service application - Run
isp.example.client.ReactiveClientApplication
- A Spring backend client application - In order to start reactive front-end Angular application (requires node and npm):
- Run
cd reactive-front
- Run
npm install
- Run
npm start
- Run
- Observe logs of all the applications!
- Run
-
- ReactiveServiceApplication contains
localhost:8080
reactive endpoints:/event
- an infinite stream of events/event{id}
- get a specific event by id/users
- get a collection of all users/users{id}
- get a specific user by id/users/count
- get count of all users/users/by_name/{name}
- get a collection of users with a specified name
- ReactiveClientApplication is a command line Spring application that uses Spring's new
reactive web client
to read events from the Service's
/events
endpoint. - Reactive Angular client under
localhost:3000
- As of today (Jun 7, 2017), RsJs has some problems with SSE (Server Side Events). See: ReactiveX/rxjs#1644
- TypeScript has no EventSource definition. See: microsoft/TypeScript#13666
- Temporary workaround: using pure JavaScript EventSource implementation.
- ReactiveServiceApplication contains
-
- Consuming events with TypeScript and RxJs
- Format output date