diff options
author | Pjotr Prins | 2016-06-16 16:07:57 +0000 |
---|---|---|
committer | Pjotr Prins | 2016-06-16 16:07:57 +0000 |
commit | 08e2b92e79247ba8d5b2135855081f1278461f50 (patch) | |
tree | 36c3f06ea7b09b54a999b2a00a9eff25b2406551 | |
parent | fb99ea4710aca3d96e316f37c5583edcbfb33e02 (diff) | |
download | genenetwork2-08e2b92e79247ba8d5b2135855081f1278461f50.tar.gz |
Doc: on gn_server
-rw-r--r-- | doc/Architecture.org | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/doc/Architecture.org b/doc/Architecture.org index c3b63b49..e8ffe69b 100644 --- a/doc/Architecture.org +++ b/doc/Architecture.org @@ -22,9 +22,26 @@ from a template named [[https://github.com/genenetwork/genenetwork2/blob/master/ the template you can find get the form gets filled by a Javascript routine defined in [[https://github.com/genenetwork/genenetwork2/blob/master/wqflask/wqflask/static/new/javascript/dataset_select_menu.js][data_select_menu.js]] which picks up a static JSON file for the menu. This static file is generated with -[[https://github.com/genenetwork/genenetwork2/blob/master/wqflask/maintenance/gen_select_dataset.py][gen_select_dataset.py]]. Note that this JSON data will soon be served -by gn_server, see [[#gnserver-rest][GnServer (REST)]]. +[[https://github.com/genenetwork/genenetwork2/blob/master/wqflask/maintenance/gen_select_dataset.py][gen_select_dataset.py]]. Note that this JSON data is served by +gn_server in the latest version, see [[#gnserver-rest][GnServer (REST)]]. + +When you hit a search with, for example, +'http://localhost:5003/search?species=mouse&group=BXD&type=Hippocampus+mRNA&dataset=HC_M2_0606_P&search_terms_or=&search_terms_and=MEAN%3D%2815+16%29+LRS%3D%2823+46%29+&FormID=searchResult' +it has the menu items as parameters. According to the routing table, +the search is executed and Redis caching is used (we'll probably +change that to gn_server). The logic is in search_result.py which +invokes database functions in +wqflask/dbFunction/webqtlDatabaseFunction.py, for example. The +receiving template lives at [[https://github.com/genenetwork/genenetwork2/blob/master/wqflask/wqflask/templates/search_result_page.html][search_result_page.html]]. ** GnServer (REST) The [[https://github.com/genenetwork/gn_server][GnServer REST API]] is built on high performance [[http://elixir-lang.org/][Elixir]] with [[https://github.com/falood/maru][Maru]]. +Mainly the GnServer serves JSON requests, for example to fetch data +from the database. To get the menu data in YAML you can do something like + +: curl localhost:8880/int/menu/main.json|ruby extra/json2yaml.rb + +(json2yaml.rb is in the gn_server repo). + + |