Giter Site home page Giter Site logo

hermanbanken / rxfiddle Goto Github PK

View Code? Open in Web Editor NEW
162.0 14.0 9.0 12.63 MB

Visualize your Observables

Home Page: https://rxfiddle.net

License: MIT License

HTML 5.40% JavaScript 0.49% Java 9.93% Shell 0.49% TypeScript 79.03% CSS 4.66%
rx rxjs5 rxjs4 rxjava visualizer debugger reactive-programming

rxfiddle's Introduction

RxFiddle

RxFiddle is a debugger for Reactive Extensions (Rx).

Features

  • visualises structure of Observables in graph diagram,
  • visualises construction of and data flow through Observable sequences in Marble Diagrams,
  • supports live fiddling with input streams,
  • generates tests for Observable sequences.

Collectors

RxFiddle works by means of a visualizer and collectors which can parse syntax and instrument (compiled) code to collect the lifecycle of Observables:

  • creation of Observable sequences
  • subscriptions in a Observable sequence
  • onNext, onError and onComplete events in Observable sequence

Existing collectors:

Contribute

Every help is welcome improving RxFiddle, either by improving the visualiser or creating custom collectors for your favorite Rx-library.

See CONTRIBUTING.md

Footnote

RxFiddle is part of my Masters thesis.

Herman Banken

rxfiddle's People

Contributors

hermanbanken avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rxfiddle's Issues

Troubleshooting browser env. -- getting to work with redux-observables

My file app.reducer.js looks like this:

import * as Rx from 'rxjs';
import RxFiddle from 'rxfiddle';
import { combineReducers, applyMiddleware, compose, createStore } from 'redux';
import logger from 'redux-logger';
import { createEpicMiddleware } from 'redux-observable';
import { authReducer } from './auth/auth.reducer';
import { messengerReducer } from './messenger/messenger.reducer';
import { modalReducer } from './modals/modal.reducer';
import epic from './app.epic';

new RxFiddle({
    Rx,
}).openWindow();

const reducer = combineReducers({
    auth: authReducer,
    messenger: messengerReducer,
    modal: modalReducer,
});

export const store = createStore(
    reducer,
    compose(applyMiddleware(createEpicMiddleware(epic), ...(process.env.ENV === 'DEV' || process.env.FORCE_DEV) ? [logger] : [])),
);

I get the following error when I run the application:

Uncaught TypeError: Cannot read property 'prototype' of undefined
    at new Instrumentation (rxfiddle.js:446)
    at RxFiddle../node_modules/rxfiddle/rxfiddle.js.RxFiddle.instrumentRx5 (rxfiddle.js:1075)
    at RxFiddle../node_modules/rxfiddle/rxfiddle.js.RxFiddle.subscribe (rxfiddle.js:982)
    at RxFiddle../node_modules/rxfiddle/rxfiddle.js.RxFiddle.openWindow (rxfiddle.js:1024)
    at Module../src/app.reducer.js (app.reducer.js:13)
    at __webpack_require__ (bootstrap:63)
    at Module.<anonymous> (bundle-1.7.1r-1.js:181364)
    at Module../src/router/router.js (bundle-1.7.1r-1.js:181534)
    at __webpack_require__ (bootstrap:63)
    at Module.<anonymous> (app.js:1)
    at Module../src/app.js (bundle-1.7.1r-1.js:169098)
    at __webpack_require__ (bootstrap:63)
    at Module../src/index.js (index.js:1)
    at __webpack_require__ (bootstrap:63)
    at Object.0 (bundle-1.7.1r-1.js:181661)
    at __webpack_require__ (bootstrap:63)

Where rxfiddle.js:446 points to Rx.subjects.prototype being undefined

RxJS 6 support

Hi!

Is this tool going to support the newest version of rxjs?

TypeError: Function.prototype.toString is not generic

The following code gives an error

function id(x){return x;}


var o1 = Rx.Observable.just(2,3,4)
  .expand(x => Rx.Observable.ofWithScheduler(Rx.Scheduler.async, x * x))
  .take(10)
  .map(id)
  .filter(x => true)
  .map(id)
  .map(id)
  .map(id)
  .map(id)
  .map(id)
  .map(id)
  
var o2 = Rx.Observable.just(1)
  .map(id)
  

o1.merge(o2).subscribe()

Visualisation of timestamp() incorrect

Overview and performance for large applications

One open problem of RxFiddle is scalability and overview. RxFiddle can instrument large applications just fine. As an example I instrumented RxFiddle with itself and this works. The data collection works and can be exported to JSON.

The problem lies with the performance of rendering the dependency graphs. The graph structure can become huge when using higher order streams. The layout is based on the StoryFlow paper and my custom implementation of what they describe is clearly not optimal. The layout works in different phases:

  • ranking (DAG rank from Dagre)
  • ordening of nodes per rank (each rank corresponds to a time slice from StoryFlow)
    • calculate weighted medians of connected nodes
    • transpose using storyflow method (minimizing crossings) in 2 passes (1 up, 1 down)
    • check if cost of ordering (amount of crossings) is less than before
    • repeat iteratively (20 times, up down sweeping) until cost becomes stable
  • priority layout
    • realign nodes in iterative fashion (storyflow methodology) assigning x/y coordinates to nodes
  • render SVG

For many nodes the ordering and priority layouting becomes very heavy as it is polynomial.

By reducing the amount of nodes we can greatly improve the experience.

Any ideas are welcome. I like to work to something like Tensorflow Graph Visualization which happens to be open source.

Thanks for the RxFiddle.

Its a good idea and thanks for developing it. Would you mind uploading a final thesis report(pdf version)?I would like to read it. Thanks again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.