Coordinating business processes

  • You joined parallel URL shortening services with combineLatest() and spawned multiple observable sequences with forkJoin().

  • You used buffering to improve the performance database queries.

  • You used observables to control the lifespans of non-observables like user sessions.

  • You saw how reactive databases allow you to orchestrate business flows involving permanent storage.

1.用combineLatest(),实现平行url短服务;用forkJoin(),处理大量的observable序列

combineLatest:

//combineLatest()
Rx.Observable.combineLatest(
Rx.Observable.of(42),
Rx.Observable.interval(1000).take(5))
.subscribe(console.log);

//-> [42, 0]
[42, 1]
[42, 2]
[42, 3]
[42, 4]

forkJoin:

//forkJoin()
Rx.Observable.forkJoin(
Rx.Observable.of(42),
Rx.Observable.interval(1000).take(5))
.subscribe(console.log); //-> [42,4]

2.使用了缓冲,提升数据库质量

3.使用了observable控制,像session一样的生命周期

4.响应式数据库,安排了涉及永久保存的处理业务流

results matching ""

    No results matching ""