These are chat archives for connectordb/connectordb

23rd
Feb 2017
Daniel Kumor
@dkumor
Feb 23 2017 01:14
Glad you're interested!
Depending on your technical knowledge, you might want to wait for version 0.3.0 before installing, though! The new version should be out in 2 weeks or so.
And if you just want to get right into it, I really suggest using the development builds, as the last release did not have any plotting or analysis functionality!
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 07:16
I'm a developer myself and actually was thinking of contributing. First I'd have to use it for a while obviously to get the hang of it, but since I'm writing a selfquantification tool myself, why not pool our resources?
Daniel Kumor
@dkumor
Feb 23 2017 12:45
That would be wonderful! Let me know if ConnectorDB fits what you are trying to do!
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 18:16
From the functionality it seems like a nice fit. Now I'm just trying to set it up in a docker container to play nice with the rest of my infrastructure
Daniel Kumor
@dkumor
Feb 23 2017 19:32
If you create a dockerfile, could you open a PR with it? I'm sure it could be useful for others too.
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 19:36
sure
Nilesh Trivedi
@nileshtrivedi
Feb 23 2017 19:38
Dockerfile would be great. Then it can be set up with platforms like Cloudron.io
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 19:38
I did read through some of the code now and ConnectorDB seems to do a lot of orchestration (starting the databases and so on). this only happens if I run it with connectordb start, correct?
Daniel Kumor
@dkumor
Feb 23 2017 19:39
yes - start starts all databases
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 19:39
connectordb run just starts the frontend?
Daniel Kumor
@dkumor
Feb 23 2017 19:39
exactly
so you can have run with just a configuration file, which will connect to all of the databases
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 19:40
that's a json, correct?
Daniel Kumor
@dkumor
Feb 23 2017 19:40
yes - you can create one with "connectordb write"
for example, connectordb write config config.conf
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 19:41
ah, nice. so if I just do connectordb run config.json and have my databases configured in config.json, this skips all the orchestration?
Daniel Kumor
@dkumor
Feb 23 2017 19:41
yes
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 19:47
for compilation, do I really have to have redis and postgres installed?
Daniel Kumor
@dkumor
Feb 23 2017 19:47
for compiling, no
for running, yes
but postgres is optional, since it works with sqlite too
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 19:47
wait, do they have to be installed even if connectordb run the db with remote databases?
Daniel Kumor
@dkumor
Feb 23 2017 19:48
oh, no!
the databases are only needed for orchestration
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 19:48
ah, ok. I thought there were some hard dependencies or something
Daniel Kumor
@dkumor
Feb 23 2017 19:48
nope
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 19:48
that makes the docker a little easier :D
Daniel Kumor
@dkumor
Feb 23 2017 19:48
The dependencies are there because most people would probably want to have a one-line way to start things
which is install redis/postgres, run connectordb create, and connectordb start
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 19:50
I'll probably do a connectordb docker image and additional docker-compose config that would set up postgres and redis in their own containers
that'll be the most flexible setup I think
Daniel Kumor
@dkumor
Feb 23 2017 19:51
There is one annoyance that I noticed now, in that connectordb create sets up the relevant database tables. I think there is the option of setting up just postgres, or JUST redis one at a time
give me a moment to check
Yes, there is, BUT it creates a new postgres database in your chosen directory
connectordb create --sql config.json
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 19:54
that connects to my postgres and setups the needed tables?
Daniel Kumor
@dkumor
Feb 23 2017 19:55
err, sorry, connectordb create mydir --sql -c config.json creates a new postgres database in mydir
I don't think there is an option to connect to an existing database and set stuff up
give me a moment to see if adding such an option is easy
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 19:55
ok, yeah. that's what I thought. Guess I'll have to send a PR for that as well :D
I do have to admit it's an usual choice to just generate a new postgres DB
Daniel Kumor
@dkumor
Feb 23 2017 19:57
Yes, it is - the idea was that for most users, ConnectorDB's files would all be in an encrypted container
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 19:57
but it looks easy enough. it should just call dbutil.SetupDatabase
Daniel Kumor
@dkumor
Feb 23 2017 19:59
yes, I believe that will perform the correct operation
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 20:01
I can also help with the rewrite of the mobile app
Daniel Kumor
@dkumor
Feb 23 2017 20:01
Oh, that's great!
Are you familiar with React Native?
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 20:01
So far I only heard of it, haven't had the chance to try it out yet
Daniel Kumor
@dkumor
Feb 23 2017 20:02
The UI is finished for the most part, so that won't be much of an issue
the only thing left is reintegrating upgraded versions of the data-gathering code
I'm planning on doing that this weekend
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 20:02
yeah, I noticed that there is no data gathering code at all atm in the repo
Daniel Kumor
@dkumor
Feb 23 2017 20:03
it is still there, just in the old directory
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 20:03
ok, I was looking in the android directory^^
Daniel Kumor
@dkumor
Feb 23 2017 20:03
I am planning on readding it piece by piece
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 20:04
I also would like to add something like a middleware to connect to Moves, since that's where all of my location history is
Daniel Kumor
@dkumor
Feb 23 2017 20:04
Moves?
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 20:04
Daniel Kumor
@dkumor
Feb 23 2017 20:05
does it have an API?
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 20:05
yep
Daniel Kumor
@dkumor
Feb 23 2017 20:05
great! I'm planning to add sleep as android integration also
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 20:05
you'd add that to android app, right?
Daniel Kumor
@dkumor
Feb 23 2017 20:05
I should have the new skeleton of gathering code pretty much ready by the end of this weekend.
yes
ATM ConnectorDB itself doesn't have a plugin system. I am thinking about it, since integration with fitbit or withings would be very useful, but I don't yet know how to do it right.
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 20:07
I also plan on porting the python API to java since that's what I use most often
I probably would just have built a layer between connectordb and moves, that connects to moves, formats it for connectordb and puts it there
Daniel Kumor
@dkumor
Feb 23 2017 20:08
yes, currently I am gathering data from external services as cron jobs that connect to their APIs and insert to ConnectorDB
As a side note, the current Java API was made in 2 hours just to be enough for use in android.
I don't use Java often, so if you're willing to take over the java API, I'll give you push access
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 20:11
yeah, I can do that. I will have to get acquainted with the API before I'm going to start working on it though
Daniel Kumor
@dkumor
Feb 23 2017 20:11
The REST API is documented here: https://connectordb.io/docs/restapi.html
I'll give you access now, so you have free reign whenever you feel like it
Patrick Grosslicht
@pgrosslicht
Feb 23 2017 20:12
awesome, thanks
I'll probably gonna orient myself to the python api
Daniel Kumor
@dkumor
Feb 23 2017 20:13
yes, the Python API is the main one I personally support