Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimalistic (REST ?) API for interfacing (to Python , ...) #42

Open
2 tasks
breznak opened this issue Dec 11, 2015 · 3 comments
Open
2 tasks

Minimalistic (REST ?) API for interfacing (to Python , ...) #42

breznak opened this issue Dec 11, 2015 · 3 comments

Comments

@breznak
Copy link
Member

breznak commented Dec 11, 2015

Suggested parts of the API:

  • init() graph (start the application, not necessary, we can open the browser manually)
  • updateData(newBatch)

What are the right methods to interfacing JS calls?

  • a REST API?

Use-case:

  • I'd like to interface our graph from other language (python). My example usecase is running a HTM model:
htm = NuPIC.init()
graph = ... //open browser or somehow start the app

for ... :
  result = htm.compute(input)
  graph.updateData(result) // append new data

The API idea follows from my comment #40 (comment)

It could overcome the problem with polling updates to a file (impossible by Papa) while step updates are possible in DyGraphs, this could replace #17

@breznak
Copy link
Member Author

breznak commented Dec 11, 2015

CC @rhyolight would this work for you?
This python-to-JS must be something you have to solve in your "htm.smartthings..." repo, can you show me what the best approach to interfacing would be? (the REST,...)
@jefffohl This is another approach to #27 - if we could implement the graph.updateOptions() as you seggested to update with new data, then this could work (?) And potentially giving better functionality.
Or ideally both - API updates and updated-file polling.

@rhyolight
Copy link
Contributor

I think that the charting codebase here in this repo should be a client-only API for in-browser charting (like Dygraphs). If you want to create a server for relaying data into the charts, it would like be specific to one kind of data or another. I suggest that (the server-side work) be done in other projects and keep this repo client-only.

@breznak
Copy link
Member Author

breznak commented Dec 12, 2015

@rhyolight I disagree a bit here. Maybe we could discuss what each of us wants from the repo somewhere? I have a "tool for insight, exploring, presenting (anomaly) (time-series) data" in mind.
Anyway, maybe this issue should not say an API but a "method to add additional data" to an existing graph, grammatically. I've suggested that for the #17 - streaming data plotting - which I think is a feature that differentiates us from other tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants