EnergyLink App para mostrar información del mercado y resultados de las operaciones

Torkel Ödegaard e9fcca16bd updated to new golang/x/oauth2 před 11 roky
Godeps e9fcca16bd updated to new golang/x/oauth2 před 11 roky
_vendor f5b1b192a0 Macaron and sqllite před 11 roky
conf be781bdb98 Tried postgres před 11 roky
data b876d193c4 updated před 11 roky
grafana @ 47f226be3b ec98c201e4 Datasource options are now included in bootData před 11 roky
pkg e9fcca16bd updated to new golang/x/oauth2 před 11 roky
views f3132b4513 Trying a different approach to providing frontend settings před 11 roky
.bra.toml 26ec858903 Moved grafana bin file to bin folder před 11 roky
.gitignore 26ec858903 Moved grafana bin file to bin folder před 11 roky
.gitmodules 8154b4f60d search and save are 'working', barely před 11 roky
Dockerfile be781bdb98 Tried postgres před 11 roky
Makefile 27f07e9de2 Progress on data source admin před 11 roky
README.md d8d5516e24 Create README.md před 11 roky
grafana-pro e9fcca16bd updated to new golang/x/oauth2 před 11 roky
main.go 90ae59ccaf Fixed png rending před 11 roky
start_dependencies.sh be781bdb98 Tried postgres před 11 roky
todo.txt 05f9e5eef1 rendering před 11 roky
wercker.yml c04a2ababd added basic wercker file před 11 roky

README.md

grafana-pro

This is very much a Work in Progess. The architecture and organisation has changed many times and I am not very happy with the current structure and architecture. I started with a lot of unit tests and drove the design though that in the begining, but then having changed the code and structure (and web framework libs, and database) I sort of abandoned them. When the architecture is getting more stable I will write & require more unit & integration tests.

Architecture

I have researched a lot of go projects, found very few with a nice modular & loosly coupled archictecture. Go projects organize code very differently, some treat packages as global singletons (which reads nicely and is nice to work with but seems like a bad practice). I do miss generics for doing strongly typed but loosley coupled command/query style internal buss messaging.

The biggest challange for architecture is making Grafana Pro very modular in a way that all/most components can run inproc or in seperate process (usefull when running Grafana Pro in a large scale SaaS setup). Been investigating using ZeroMQ or NanoMsg to handle module communication (Both ZeroMQ and NanoMsg can handle inproc & tcp which a number of different topologies). Running Grafana Pro in a SaaS setup might warrant that the alerting stuff runs out of proc on other servers feeding of a queue for example, but for simple on prem stuff it would be cool if that could be run in the same process. I am also thinking that some stuff might need swapping out/in depending on the setup (plugin model or just interfaces with different implementations).

Building

  • Just added a simple make file (the main binary package is in pkg/cmd/grafana-pro)
  • Need to change to godep or some go lang dependency management system

Data access

Data access is very strange right now, instead of an interface I tried using public methods in the models package. These method pointers are assigned in when the sqlstore is initialized in pkg/store/sqlstore. This is probably a bad idea. I am thinking about either moving to simple interfaces. But I do not want a giant interface for all data acess. Would much prefe a simple generic command/query interface but golang lacks generics which makes this painful. But a generic command/query interface could still be good as it would make it easier to have some commands or queries handled buy out of proc components (or inproc if we used someting like ZeroMQ for communication). Or it could be overengineering thinking like this.

Grafana frontend

The grafana frontend is added as git submodule in order to easily sync with upstream grafana. There should be a symbolic link from ./grafana/src to ./public . Need to add this to the Makefile.

TODO

  • Add symbolik link between ./grafana/src ./public
  • Hash & Salt password
  • Unit tests for data access
  • I switched recently from rethinkdb to sql (using a simple mini ORM lib called xorm, might need to switch to a more popular ORM lib).