GithubHelp home page GithubHelp logo

dataserver's People

Contributors

dvdsk avatar

Stargazers

 avatar  avatar

dataserver's Issues

Dynamic time ranges

needs:

  • javascript and html changes to facilitate choosing an interval
  • mechanism to send multiple websocket packages for init data (js and rust changes)
  • averaging over existing data to lower data usage

slice index starts at 3 but ends at 2

Error in compression lib:

stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:71
             at libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:211
   3: std::panicking::default_hook
             at libstd/panicking.rs:227
   4: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:476
   5: std::panicking::continue_panic_fmt
             at libstd/panicking.rs:390
   6: rust_begin_unwind
             at libstd/panicking.rs:325
   7: core::panicking::panic_fmt
             at libcore/panicking.rs:77
   8: core::slice::slice_index_order_fail
             at libcore/slice/mod.rs:2340
   9: <core::ops::range::Range<usize> as core::slice::SliceIndex<[T]>>::index_mut
             at libcore/slice/mod.rs:2509
  10: core::slice::<impl core::ops::index::IndexMut<I> for [T]>::index_mut
             at libcore/slice/mod.rs:2327
  11: dataserver::httpserver::timeseries_interface::compression::encode
             at src/httpserver/timeseries_interface/compression.rs:51
  12: dataserver::send_test_data
             at src/main.rs:112
  13: dataserver::main
             at src/main.rs:216
  14: std::rt::lang_start::{{closure}}
             at libstd/rt.rs:74
  15: std::panicking::try::do_call
             at libstd/rt.rs:59
             at libstd/panicking.rs:310
  16: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:102
  17: std::rt::lang_start_internal
             at libstd/panicking.rs:289
             at libstd/panic.rs:392
             at libstd/rt.rs:58
  18: std::rt::lang_start
             at libstd/rt.rs:74
  19: main
  20: __libc_start_main
  21: _start

Encode plot request info in url

This would facilitate easier sharing of plots and setting a certain "page" as bookmark. For example temperature in the last day.

For possible format check industry standards

Crash on adding dataset access after adding telegram id

steps to reproduce:

  1. create new user
  2. add telegram id
  3. save
  4. [optional] try to use the bot (will show that the account has access)
  5. add dataset access (at least one field)
  6. save
  7. [optional] try to use the bot (will show that the account has no access)
  8. change telegram id for user
  9. save

=>

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: UserDatabaseError(UserNotInDb)', src/libcore/result.rs:1165:5
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:77
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:61
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1028
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1412
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:65
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:50
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:188
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:205
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:464
  11: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:373
  12: rust_begin_unwind
             at src/libstd/panicking.rs:302
  13: core::panicking::panic_fmt
             at src/libcore/panicking.rs:139
  14: core::result::unwrap_failed
             at src/libcore/result.rs:1165
  15: core::result::Result<T,E>::unwrap
             at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libcore/result.rs:933
  16: dataserver::menu::user::menu
             at src/menu/user.rs:61
  17: dataserver::menu::command_line_interface
             at src/menu/mod.rs:31
  18: dataserver::main
             at src/main.rs:94
  19: std::rt::lang_start::{{closure}}
             at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libstd/rt.rs:61
  20: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:48
  21: std::panicking::try::do_call
             at src/libstd/panicking.rs:287
  22: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:78
  23: std::panicking::try
             at src/libstd/panicking.rs:265
  24: std::panic::catch_unwind
             at src/libstd/panic.rs:396
  25: std::rt::lang_start_internal
             at src/libstd/rt.rs:47
  26: std::rt::lang_start
             at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libstd/rt.rs:61
  27: main
  28: __libc_start_main

long login

Logging in takes 600 millisec, from start op post call till end

panic on plot while running on rpi

log/trace

[12:11][dataserver::httpserver][TRACE] checking login       
[12:11][dataserver::httpserver][INFO] user logged in    returning file: "web/plot.js"                            
[12:11][dataserver::httpserver][TRACE] websocket connected
[12:11][dataserver::httpserver::websocket_client_handler][TRACE] sending data to client                            
[12:11][minimal_timeseries][DEBUG] header data {1545869954:0}                                                     
[12:11][minimal_timeseries][WARN] start TS earlier then start of data -> start_byte = 0                  
[12:11][minimal_timeseries][DEBUG] header data {1545869954: 0} 
[12:11][minimal_timeseries][DEBUG] start time: 2017-08-14 11:11:50.593609283 UTC, 1502709110;end_time: 2018-12-27 11:11:50.593635689 UTC, 1545909110 
[12:11][minimal_timeseries][DEBUG] start_byte: 1805
[12:11][minimal_timeseries][DEBUG] current_timestamp: 154586
9954, next_timestamp: 9223372036854775806, next_timestamp_pos: 14137, start_byte: 0, stop_byte:14130                 
memory allocation of 500000000 bytes failedAborted

X axis confusing

See the plot below, the x-axis is the minute part of the hour. however this is not intuitive if you look at it.

Suggestions for improvement:
add hours thus mm:ss -> hh:mm:ss
or switch to numb of minutes ago

image

Certificate file names confusing

unconfirmed but:

signed cert = keys/cert/cert
intermediate = keys/intermediate.cert
private key = keys/cert.key

see also datasplitter

Let datarouter store new data

This would allow us to directly return the nodes http requests, saving power by allowing sleep to resume earlier.

Deleting dataset results in panics

When a dataset is deleted on disk it still persists in the user database. The program assumes all datasets in a users metadata exist.

possible resolutions:
-check on user load if user info still valid
-add a delete function from server interface

Add Resolution and range based spec

instead of

  • SigDigits:
    name: temperature
    min_value: -20.0
    max_value: 60.0
    number_of_digits: 4

we could have

  • ResolutionAndRange:
    name: temperature
    min_value: -20.0
    max_value: 60.0
    resolution: 4

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.