Logs: freenode/#haskell
| 2020-09-26 05:53:43 | <dsal> | I use influxdb from Haskell quite a bit. My coworkers like prometheus, but I don't respond to their peer pressure. |
| 2020-09-26 05:53:43 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2020-09-26 05:53:45 | × | berberman quits (~berberman@2408:8207:256c:1c00:584e:a9ff:fe9b:d3fe) (Quit: ZNC 1.7.5 - https://znc.in) |
| 2020-09-26 05:54:07 | <Guest26> | hmm, yes, certainly it is not supposed to be doing this, metrics thing |
| 2020-09-26 05:54:08 | → | o1lo01ol1o joins (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) |
| 2020-09-26 05:54:19 | <fraktor> | Prometheus is not really great as a time-series database generally, but if you're doing metrics, then it's absolutely the tool (or a very good tool anyway) for the job. |
| 2020-09-26 05:54:38 | <Guest26> | im not |
| 2020-09-26 05:54:51 | <Guest26> | it was just a simple example of a time varying value |
| 2020-09-26 05:55:01 | × | Tops2 quits (~Tobias@dyndsl-095-033-024-124.ewe-ip-backbone.de) (Quit: Leaving.) |
| 2020-09-26 05:55:04 | <fraktor> | Okay. In that case, a time-series database with a Haskell backend is a good choice. I haven't used influxdb but I've heard good things. |
| 2020-09-26 05:55:09 | <Guest26> | but a random number based on time of day is a better example |
| 2020-09-26 05:55:13 | <fraktor> | If you don't mind me asking, what is the data that you're sending? |
| 2020-09-26 05:55:25 | → | thir joins (~thir@p200300f27f0fc60094e773283d7bf825.dip0.t-ipconnect.de) |
| 2020-09-26 05:55:32 | × | AmberJ_ quits (~AmberJ_@195.140.213.38) (Remote host closed the connection) |
| 2020-09-26 05:56:03 | <Guest26> | like i say, generally any json serializable, or perhaps binary serializable data. so generally any type that supports a generic instance. |
| 2020-09-26 05:56:29 | <fraktor> | Is it all time-series data? |
| 2020-09-26 05:56:35 | <EvanR> | a single random number based on the current time of day can be pretty bad |
| 2020-09-26 05:56:43 | <dsal> | Even 4? |
| 2020-09-26 05:56:53 | <EvanR> | 4 is one of the worst |
| 2020-09-26 05:56:53 | <Guest26> | but if it has to go to an SQL database so it can be read by the HTML page, then maybe this limits the type |
| 2020-09-26 05:57:09 | <fraktor> | I don't mean to pry but, what is the problem you're trying to solve? |
| 2020-09-26 05:57:23 | × | sand_dull quits (~theuser@185.217.69.182) (Ping timeout: 246 seconds) |
| 2020-09-26 05:57:30 | <Guest26> | fraktor: its not time series data persay, refreshing the webpage should just visualise the current database |
| 2020-09-26 05:57:47 | <Guest26> | it would be time series data if the database update were just simple addition of a new value |
| 2020-09-26 05:57:48 | <dsal> | What is "the current database" ? |
| 2020-09-26 05:58:05 | × | o1lo01ol1o quits (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) (Ping timeout: 240 seconds) |
| 2020-09-26 05:58:17 | <Guest26> | thats quite arbitrary - but for the sake of argument its a list of (time of day,double) |
| 2020-09-26 05:58:41 | <fraktor> | You can absolutely use Haskell as a backend for some kind of frontend, and that would solve that problem, but what on earth are you doing with it? |
| 2020-09-26 05:58:43 | <Guest26> | at least then i can imagine a simple HTML based visualisation thats just an xy graph |
| 2020-09-26 05:58:49 | <fraktor> | Like, what is the software you're writing trying to solve? |
| 2020-09-26 05:58:55 | <dsal> | Is a database even helpful? If your goal is to put all the data in a web page, then what does the database do here? |
| 2020-09-26 05:59:19 | <fraktor> | dsal: I think that they were saying they didn't want to use the database if possible |
| 2020-09-26 05:59:19 | <Guest26> | the database was for when i was thinking to visualise the data using R |
| 2020-09-26 05:59:38 | <Guest26> | the R tutorial here used an SQL server; https://www.r-bloggers.com/2018/07/real-time-data-visualization-using-r-and-data-extracting-from-sql-server/ |
| 2020-09-26 05:59:43 | <dsal> | I've never used R with a database. |
| 2020-09-26 05:59:50 | × | thir quits (~thir@p200300f27f0fc60094e773283d7bf825.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 2020-09-26 06:00:01 | <Guest26> | but if i dont use R, but a haskell powered webpage instead, maybe i dont need SQL |
| 2020-09-26 06:00:30 | → | mu_ joins (~mu@unaffiliated/mu) |
| 2020-09-26 06:00:39 | <fraktor> | What is this data? I'm really trying to understand what kind of data would have the properties you're describing. |
| 2020-09-26 06:00:41 | <Guest26> | the most important feature is to be able to somehow have the webpage read some data written to disk by the other haskell program producing the data |
| 2020-09-26 06:00:44 | <dsal> | You're just using words in places where they don't fit and that's a bit confusing. |
| 2020-09-26 06:01:07 | <dsal> | Web servers are pretty good at reading data from disk and serving it to web browsers. |
| 2020-09-26 06:01:21 | <Guest26> | % utc |
| 2020-09-26 06:01:21 | <yahb> | Guest26: ; <interactive>:111:1: error: Variable not in scope: utc |
| 2020-09-26 06:01:46 | <Guest26> | % getCurrentTime |
| 2020-09-26 06:01:47 | <yahb> | Guest26: ; <interactive>:112:1: error:; * Variable not in scope: getCurrentTime; * Perhaps you meant `getCurrentCCS#' (imported from GHC.Prim) |
| 2020-09-26 06:01:58 | <Guest26> | hmm, thats from Data.Time |
| 2020-09-26 06:02:29 | <Guest26> | [(UTCTime,Double)] |
| 2020-09-26 06:02:52 | × | Saukk quits (~Saukk@2001:998:dc:4a67:1c59:9bb5:b94c:4) (Remote host closed the connection) |
| 2020-09-26 06:02:57 | <fraktor> | I understand that's the format of the data. |
| 2020-09-26 06:03:02 | <dsal> | % getCurrentTime |
| 2020-09-26 06:03:03 | <yahb> | dsal: 2020-09-26 06:03:02.989582121 UTC |
| 2020-09-26 06:03:06 | <fraktor> | But like, what are you trying to accomplish with this software? |
| 2020-09-26 06:03:07 | → | berberman joins (~berberman@2408:8207:256c:4a80:584e:a9ff:fe9b:d3fe) |
| 2020-09-26 06:03:21 | <Guest26> | maybe i could write each data entry to its own file, but that seems bad. thats where i thought an SQL database that could be simultaniously updated by one process, and read by another process, would be good |
| 2020-09-26 06:03:22 | <fraktor> | I'm asking because a solution might already exist for what you're doing. |
| 2020-09-26 06:03:40 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-26 06:03:53 | × | ahri quits (~ahri@178.209.40.84) (Quit: Ping timeout (120 seconds)) |
| 2020-09-26 06:03:58 | <Guest26> | certainly not, the data is being calculated by another program, its impossible this would already exist |
| 2020-09-26 06:04:05 | <dsal> | Do you have a problem you're trying to solve? It just sounds like you have a few parts y ou want to be part of a solution, but you don't have a problem that will use all those parts. |
| 2020-09-26 06:04:14 | <Guest26> | you could think of it as a mass spring system for example |
| 2020-09-26 06:04:23 | <fraktor> | Oh, so you're running simulations? |
| 2020-09-26 06:04:26 | → | ahri joins (~ahri@178.209.40.84) |
| 2020-09-26 06:04:39 | <Guest26> | its just calculated data, that is output infrequently |
| 2020-09-26 06:04:59 | × | adamwespiser quits (~adam_wesp@209.6.42.110) (Ping timeout: 240 seconds) |
| 2020-09-26 06:05:00 | <Guest26> | and i want to have the time on the x axis of the plot in the html page |
| 2020-09-26 06:05:13 | <fraktor> | I see. So you do want a time-series database, but Prometheus is kinda the wrong tool. |
| 2020-09-26 06:05:22 | <Guest26> | so that the most up to data version is displayed on refreshing the page |
| 2020-09-26 06:05:59 | <dsal> | If you serve a file from a web server, it will serve the latest version of that file when requested. |
| 2020-09-26 06:06:09 | <fraktor> | May I suggest Grafana? It's an open-source visualization tool that can use whatever as a backend, I think including static files |
| 2020-09-26 06:06:10 | → | o1lo01ol1o joins (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) |
| 2020-09-26 06:06:12 | <Guest26> | the components i need are something equivalent to an SQL database for storing the data to, and something like a HTML page, that can do the visualization |
| 2020-09-26 06:06:27 | <dsal> | Yeah, I'm using grafana with influxdb. It's pretty great. |
| 2020-09-26 06:06:39 | → | justanotheruser joins (~justanoth@unaffiliated/justanotheruser) |
| 2020-09-26 06:06:42 | <dsal> | I liked not having to write that part. heh |
| 2020-09-26 06:07:03 | <fraktor> | In case you can't tell I've done DevOps stuff before, so Prometheus and Grafana are my go-to tools for system monitoring lol |
| 2020-09-26 06:07:09 | <dsal> | I've got a bunch of bits of haskell that read and write influxdb and a bunch of that stuff ends up in grafana. |
| 2020-09-26 06:07:32 | <dsal> | I've managed to never use prometheus. At this point, I'll just keep not using it .heh |
| 2020-09-26 06:07:39 | <Guest26> | this? http://hackage.haskell.org/package/grafana-0.2 https://en.wikipedia.org/wiki/Grafana |
| 2020-09-26 06:07:42 | <Guest26> | looks good |
| 2020-09-26 06:07:53 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds) |
| 2020-09-26 06:08:25 | <dsal> | It's very unlikely you want a grafana haskell lib. |
| 2020-09-26 06:08:29 | <fraktor> | I'd recommend using an intermediary DB now that I understand a little better, since that means you can run arbitrary queries on it. |
| 2020-09-26 06:08:37 | <Guest26> | and this https://hackage.haskell.org/package/influxdb https://en.wikipedia.org/wiki/InfluxDB |
| 2020-09-26 06:08:57 | <fraktor> | The Grafana haskell library is for when you want to write a custom interface with grafana, and using an intermediary database is simpler and more powerful. |
| 2020-09-26 06:09:01 | <Guest26> | ah, yeah, i thought SQL seemed better than trying to write to the disk |
| 2020-09-26 06:09:09 | <Guest26> | so is that where influxdb is advised? |
| 2020-09-26 06:09:09 | <fraktor> | Yep. InfluxDB and Grafana are a good pair from what I've heard |
| 2020-09-26 06:09:23 | <Guest26> | dsal: any chance of a demo? |
| 2020-09-26 06:09:45 | × | mu_ quits (~mu@unaffiliated/mu) (Read error: Connection reset by peer) |
| 2020-09-26 06:09:47 | <dsal> | "sql" and "write to the disk" aren't different things. |
| 2020-09-26 06:09:51 | <dsal> | I use sql to write to the disk. |
| 2020-09-26 06:09:58 | <dsal> | Let me see if I can find a good one. |
| 2020-09-26 06:09:59 | → | mu_ joins (~mu@unaffiliated/mu) |
| 2020-09-26 06:10:24 | <Guest26> | https://hackage.haskell.org/package/prometheus https://prometheus.io/ |
| 2020-09-26 06:10:30 | <Guest26> | im not sure about that... |
| 2020-09-26 06:10:39 | <Guest26> | i dont think metrics is the right idea here |
| 2020-09-26 06:10:51 | <fraktor> | Yeah, Prometheus is the wrong tool here |
| 2020-09-26 06:10:53 | <dsal> | You've made it really hard to have any idea what you're doing. |
| 2020-09-26 06:11:08 | × | o1lo01ol1o quits (~o1lo01ol1@bl8-213-81.dsl.telepac.pt) (Ping timeout: 272 seconds) |
All times are in UTC.