vangav open source - backend; a backend generator (generates more than 90% of the code needed for big scale backend services)
tech | ref |
---|---|
cassandra | apple's cassandra deployment has over 75,000 nodes storing over 10PB of data |
play framework | play framework powers linkedin's 500,000,000 members backend |
akka | akka helps power e-shopping for hundreds of millions of amazon members |
datastax drivers | datastax processes over 1,000,000,000,000 cassandra requests for netflix per day |
utility | options |
---|---|
backend generator | design in json and generate 90+% of the code for a service + several utilities |
security | facebook/google auth, oauth 2, transaction tokens, encryption, ... |
networks | twilio, mail gun, rest client, rest jobs, ... |
push notifications | ios, android, ... |
geo services | geo grids, reverse geo coding, geo hashing, ... |
dispatcher/worker | dispatchable queries, push notifications, emails, sms, ... |
and more ... | periodic jobs, thread pools, facebook graph api, snow flake ids (twitter's ids), compression, client generator, exceptions, geometry, metrics, deep vangav mighty integration, ... |
template | services | features | db tables | code: total | code: generated |
---|---|---|---|---|---|
7 | 47 | 52 | 67,715 + 190,996 | 238,465 (92.17%) | |
analytics writer & reader | 2 | 9 | 4 | 67,715 + 10,252 | 74,552 (95.62%) |
3 | 7 | 7 | 67,715 + 7,834 | 74,408 (98.49%) | |
geo server | 1 | 3 | 3 | 67,715 + 2,691 | 70,300 (99.85%) |
calculate sum | 1 | 1 | 0 | 67,715 + 544 | 68,258 (99.99%) |
time | effect |
---|---|
5 min | first service (vos_calculate_sum) generated and running |
20 min | second service (vos_geo_server) generated and running |
5-7 days | finished all templates: command of all utilities, multi-service backends |
1-2 weeks | full command of modifying/extending the underlying backend |
thereafter | best-in-class-level in implementing top class backend services, finishing a year's worth of work every month |
python2.7 -V
and the output should be Python 2.7.10
cd ~/Downloads
wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
tar -zxvf Python-2.7.10.tgz
sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libgdbm-dev libc6-dev libbz2-dev libsqlite3-dev tk-dev libssl-dev
cd ~/Downloads/Python-2.7.10/
sudo ./configure
sudo make altinstall
python2.7 --version
on YouTube
5-10 min: this tutorial explains how to generate and use the first vangav backend service
vos_calculate_sum is a service that takes a two floats (a and b) request and returns a double (c) response representing the summation of a and b
my_services
- this is the directory to contain both of vos_backend and all the services generated using itvos_backend.zip
project (from the green clone or download
button up there) inside the workspace directory created in (1) and unzip itvos_backend-master
to vos_backend
my_services/vos_calculate_sum
controllers.json
from vos_backend/vangav_backend_templates/vos_calculate_sum/
to the directory my_services/vos_calculate_sum
created in (1)cd
to my_services/vos_backend/tools_bin
java -jar backend_generator.jar new vos_calculate_sum
to generate the servicey
for using the config directory in order to use controllers.json
for generatingn
for generating a worker service (using workers is explained in a separate section)com.vangav.vos_calculate_sum.controllers.calculate_sum
, method processRequest
should be as follows in order to complete the request-to-response logic @Override
protected void processRequest (final Request request) throws Exception {
// use the following request Object to process the request and set
// the response to be returned
RequestCalculateSum requestCalculateSum =
(RequestCalculateSum)request.getRequestJsonBody();
// set response's value
((ResponseCalculateSum)request.getResponseBody() ).set(
requestCalculateSum.a + requestCalculateSum.b);
}
cd
to my_services/vos_calculate_sum
./_run.sh
http://localhost:9000/calculate_sum?a=1.2&b=2.3
- this returns 3.5
a
and b
values in the request string in (1)a
to "xyz", don't set b
, ...) to get a sense of how the default error response looks like (error responses are explained in depth in a separate section)in the terminal session where you started the service press control + d
on YouTube
on YouTube
bad request
and internal error
; those exceptions can be returned to the client and loggable (in database, text files, ...)