Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Learning Resources for the Uninitiated - Backend #15

Closed
dcgoss opened this issue Jul 23, 2016 · 3 comments
Closed

Learning Resources for the Uninitiated - Backend #15

dcgoss opened this issue Jul 23, 2016 · 3 comments

Comments

@dcgoss
Copy link
Member

dcgoss commented Jul 23, 2016

Branching off from cognoma/cognoma#15, and in similar fashion to cognoma/machine-learning#7 and cognoma/frontend#2, here are some resources for people to become familiar with the backend world.

@dcgoss
Copy link
Member Author

dcgoss commented Jul 23, 2016

Here is a comment (cognoma/cognoma#15 (comment)) from @awm33:

I can cover some buzz words we use.

REST API

A web APIs (aka API, HTTP API, web service) are what allows computers to talk to each other, from servers across a data center to servers across the world, even the web browser you are using to view this comment. Representational state transfer (REST, aka a REST API) is one way to design such a web API, and currently a very popular one.

Beginners Guide

Work/job/task Queue

When you click a button or do an action in a web browser, the server on the other end does a little bit of work. When power UIs, it only does a few milliseconds of work and returns a result quickly. For complex tasks, it takes more time, a web browser can't wait for minutes or hours. Complex tasks may also require a large amount of computational resources, like transforming 10k scanned documents into text. This is where task queues and task management comes in. It manages complex tasks and distributes them among many "workers" which are other servers, potentially thousands. Sometimes people use the term job or task, they are the same in this context.

Django

There are many ways to implement a REST API. Django is a python framework that the project has chosen to implement REST APIs in. This is one of hundreds or thousands of frameworks in the wild, across many languages, like python, javascript, Java, Go, Ruby, etc.

@dcgoss
Copy link
Member Author

dcgoss commented Jul 23, 2016

Django
Django is very important to Cognoma. Django is a python-based web framework that that makes building an "application server" (processing requests and returning responses) much simpler than doing it from scratch.

Web Server
Traditionally a web application (ex. Django) will receive requests via a web server. When the user sends a request, the web server receives the request and can do things like reroute to other servers, limit the file size of requests, coordinate SSL/HTTPS, and more. Examples of these are nginx, apache, etc. Nginx is pretty popular in the python world.

WSGI
WSGI is a python-specific standard that bridges web servers and application servers. A "WSGI server" allows a web server and an application server to talk/interact. Examples of WSGI servers are uWSGI and Gunicorn.

Django REST Framework
Django REST Framework is an add-on/package that you can add to Django, which allows you to easily implement what is called a REST (representational state transfer) API (application program interface). Some people only use Django to fill in HTML templates and return web pages to requests. However, if for example you wanted to interface with a phone application or if you want to allow developers to interact with your web application programmatically, a REST API created with the help of "DRF" (Django REST Framework) gives you a super flexible and powerful way to return data to user requests in a standardized and readable format (normally JSON). DRF puts many tools and libraries at your hand, and the project has extensive documentation. Here are two guides: one and two.

@dcgoss
Copy link
Member Author

dcgoss commented Apr 16, 2017

Migrated the information from this issue to the Wiki.

@dcgoss dcgoss closed this as completed Apr 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant