Showing posts with label DIY. Show all posts
Showing posts with label DIY. Show all posts

Thursday, 2 March 2017

Intel Student Ambassador Program for AI: What Is It?

Intel Student Ambassador Program for AI: What Is It?

Image result for The Student Ambassador Program intel
In November of 2016 we announced the Intel® Software Student Developer Program, created to work collaboratively with students at innovative schools and universities doing great work in the Machine Learning and Artificial Intelligence space. As part of this program we also announced the Intel Student Ambassador Program for AI, an exciting new program for University students to engage with Intel around their work in Machine Learning, Deep Learning and Artificial Intelligence.  

What is the Student Ambassador program? 

Student Ambassadors

The Student Ambassador Program is a developer affinity program, designed to assist student experts in telling their story and share their expertise with other student data scientists and developers.  Intel is working with universities across the globe to introduce this program.  Those students invited into the program as Student Ambassadors are provided technical support, resources, and marketing to advance their own work through Intel software, tools, and hardware.  This program is primarily targeted toward graduate students, however, undergrads and PhD students can apply should they have the combined education, skill and time to fulfill program requirements (note: this program does not provide a college internship with Intel, nor does it provide placement for employment with Intel). 

What are the benefits of the Student Ambassador program? 

The Student Ambassador Program offers many benefits for the select students who are invited into the program.  These benefits include:
  • Formal association with Intel Corporation via branded swag and the Student Ambassador title 
  • Free software, tools and libraries from Intel
  • Direct access to their own instance on the Intel Xeon Phi powered AI cluster, to power the development and training of deep learning models
  • Access to early disclosure information (under NDA) during monthly meetings with Intel
  • Direct access to Intel engineers and resources to support their work and adoption and integration of Intel Architecture
  • Sponsored travel to support speakerships and/or training by or for the Student Ambassador
  • Sponsored funds to assist in hosting, training and speaking sessions at their campus to promote their work 

What are the expectations for Student Ambassadors? 

Student Ambassadors will continue in their role as long as the Student is able to and desires to continue as a Student Ambassador or upon their graduation, whichever comes first.  During their time as a Student Ambassador each is expected to complete the following:
  • Online posting of 2 technical articles to Intel's Developer website (software.intel.com)
  • Creation of an online profile and posting of at least 1 project to Intel's Developer Mesh website (devmesh.intel.com)
  • Host speaker of 1 or more Ambassador Labs, providing training about their work to a total of 125 students or more 

I'm interested. How do I get involved? 

For students or faculty interested in the Student Ambassador Program, there are multiple ways to engage with Intel and get involved:
  • Universities can invite Intel to come on campus for a half-day workshop to discuss the program and provide initial training on deep learning and artificial intelligence technologies supporting Intel architecture.  Visit this site and or contact Niven Singh for more information on setting up a workshop.  
  • For students directly interested in the Student Ambassador program we invite students to tell us a bit more about their work by posting information about their studies and or research to the Student Group on the Intel Developer Mesh website. Posting to this site helps Intel get a glimpse into the student work and helps demonstrates the students willingness and aptitude for sharing their experience with the community. After posting a project to Developer Mesh, students can complete and submit an online candidate form

How will Intel support the other students, not eligible or able to be a Student Ambassador? 

University Clubs
Intel is also able to support and sponsor student clubs at universities. With this program Intel is able to provide sponsorship funds to select university clubs.  Sponsorship funds help support a club's cost for meetings and gatherings, in exchange for the club discussing and sharing information about Intel support of Artificial Intelligence.  Select clubs will be provided with an AI training kit, including content and documentation to share and discuss during their meetings and gatherings. Select university clubs will be prioritized for guest speakerships by Intel or associated partners as resources are available. Those interested in being evaluated as a an Intel Student Program University Club can submit information for candidacy here.  
Intel is excited about the opportunity to work and engage directly with students who are shaping and advancing new work and use cases for Artificial Intelligence via campus workshops, Student Ambassadors, and University Clubs.  Our aim is to provide students and developers the resources and opportunity to have a voice and influence in driving AI forward.  Learn more on the Intel Student Ambassador site, check out the AI projects on Mesh, or contact Niven Singh directly for more information..
For more complete information about compiler optimizations, see  Optimization Notice.

How to Hack Wi-Fi: Choosing a Wireless Adapter for Hacking

Determine the chipset of a wireless card

Image result for Best Kali Linux Compatible USB Adapter / Dongles

Each year we make a list of the top Kali Linux compatible USB adapters an usually there are big changes.
 
Image result for Best Kali Linux Compatible USB Adapter / Dongles
 
This can always change of course at any time and we will update this post with any new information but 2016 has the same problems 2015 had.
 
The first problem is the 802.11ac protocol and a compatible USB adapter that will work with Kali.
 
802.11ac 5GHz USB dongles that will work with Kali are slow to come and hopefully will happen soon.

Introduction

IMPORTANT:
This section deals with a three related areas:
  • Determine the chipset of a wireless card
  • Determine the driver for a wireless card

Determine the chipset

There are two manufacturers involved with wireless cards. The first is the brand of the card itself. Examples of card manufacturers are Netgear, Ubiquiti , Linksys and D-Link. There are many, many manufacturers beyond the examples give here.
The second manufacturer is who makes the wireless chipset within the card. This is the most important company to know. Unfortunately, it is sometimes the hardest to determine. This is because card manufacturers generally don't want to reveal what they use inside their card. However, for our purposes, it is critical to know the wireless chipset manufacturer. Knowing the wireless chipset manufacturer allows you to determine which operating systems are supported, software drivers you need and what limitations are associated with them. The next section describes the operating systems supported and limitations by chipset.
You first need to determine what wireless chipset your card uses. This can be done by one or more of these techniques:
  • Search the internet for “<your card model> chipset” or “<your card model> linux”. Quite often you can find references to what chipset your card uses and/or other people's experiences.
  • Search the Forum
  • You may also have a look at windows driver file names, it's often the name of the chipset or the driver to use.
  • Check the card manufacturers page. Sometimes they say what chipset they use.
  • Have a look at lsusb -vv output for descriptions, USB id and kernel modules used. If the card is internal, do the same with lspci -vv.
  • Locate the FCC ID of your device. Enter the information into FCC Website and then browse the internal photos of the device.
pictures.aircrack-ng.org_fcc_id3.jpg

Here are some other resources to assist you in determine what chipset you have:


ChipsetSupported by airodump for WindowsSupported by airodump for LinuxSupported by aireplay for Linux
AtherosCardBus: YES
PCI: NO (see CommView)
PCI, PCI-E: YES
Cardbus/PCMCIA/Expresscard:YES
USB: YES(b/g/n)
New mac80211 Atheros drivers have native injection and monitoring support
AtmelUNTESTED802.11b YES
802.11g UNTESTED
UNTESTED
Broadcom bcm43xxOld models only (BRCM driver)YESMOSTLY (Forum thread) No fragmentation attack support. Recommend to use b43, see below.
Broadcom b43NOYes (1.0-beta2 and up, check here)Yes, check here
Centrino bNOPARTIAL
(ipw2100 driver doesn't discard corrupted packets)
NO
Centrino b/gNOYESNO (firmware drops most packets) ipw2200inject No fragmentation attack support.
Centrino a/b/gNOYESYES (use ipwraw or iwl3945)
Centrino a/g/n (4965)NOYESMOSTLY, see iwlagn. Fakeauth is currently broken.
Centrino a/g/n (5xxx)NOYESYES
Cisco AironetYES?Yes, but very problematicNO (firmware issue)
Hermes IYESOnly with airodump not airodump-ng and only with a specific firmwareNO (firmware corrupts the MAC header)
NdisWrapperN/ANeverNever
Prism2/3NOold kernels only ⇐2.6.20YES (PCI and CardBus only: driver patching required) NOTE: Prism2/3 does not support shared key authentication and the fragmentation attack. There is a critical bug and this chipset is not currently recommended. It may even affect other kernel versions. Also you must use old kernel ⇐2.6.20
USB: Only old kernel ⇐2.6.20 with linux-wlan-ng
PrismGT FullMACYESYESYES (driver patching recommended)
PrismGT SoftMACYESYES (requires p54 >=2.6.30)YES (requires p54 >=2.6.30)
RalinkNOYESYES, see rt2x00rt2500rt2570rt61 and rt73. Also see Ralink chipset comments later on this pager for important concerns.
RTL8180YESYESUNSTABLE (driver patching required)
RTL8185NOYESYES (mac80211 driver untested)
RTL8187B/RTL8197NOYESYES (2.6.27+, use the mac80211 driver with this patch)
RTL8187LUNTESTEDYES (driver patching required to view power levels)YES (driver patching recommended for injection and required to view power levels)
TI
(ACX100/ACX111)
NOYESYES (driver patching required) No fragmentation attack support. Please re-test fragmentation with the mac80211 driver + mac80211 frag patch!
ZyDAS 1201NOYESPartially but NOT RECOMMENDED (See patch for details)
ZyDAS 1211(B) softmacNOYESPartially but NOT RECOMMENDED (See patch for details). Atheros has acquired Zydas and renamed this chipset to AR5007UG.
ZyDAS 1211(B) mac80211NOYES (patching recommended)YES, but no fragmentation attack support yet.
Other mac80211 (ADMtek…)NOUNTESTED, but likely YESUNTESTED (YES for drivers with AP mode support)
Other legacy (Marvel…)NOUNKNOWNNO

Determine the driver

Once you have determined the chipset, check the driver section for which software driver you need. Software drivers connect the operating system to the hardware. The drivers are different for each operating system. There are also notes regarding limitations.
If you are deciding on which card to purchase, check the “Which is the best card to buy?” section on this page. There are many considerations that should go into your purchase decision:
  • Hardware compatibility with your existing equipment.
  • Price and availability of the card.
  • Availability of software drivers for your particular operating system and intended use of the software.
  • How active is development for the software drivers you need.
  • How much peer support and documentation is available for the card and software drivers.
It is not an easy decision to make. By considering these factors, it will help you make a more informed decision on what to purchase.

ChipsetWindows driver (monitor mode)Linux DriversNote
Atherosv4.2 or v3.0.1.12 or AR5000
(see this pagefor more information)
Madwifiath5k ath9kath9k_htc and ar9170/carl9170Atheros and Zydas USB 802.11n cards. The rest of atheros chipsets excluding the ones mentioned and MIMO series as well as fullMAC (these are rare, only found in embedded devices) should be supported.
Atherosath6klThird generation Atheros driver for mobile devices (AR6003)
Currently does not support injection
AtmelAtmel AT76c503aAT76C503/505A based USB WLAN adapters
AtmelAtmel AT76 USBAT76C503/505A based USB WLAN adapters, mac80211 driver
BroadcomBroadcom peek driverbcm43xxWindows: Old models only
Linux: always use latest -rc kernel
Broadcom with b43 driverb43b43 - An excellent and fully supported driver
Broadcom 802.11nbrcm80211FOSS wireless driver for BCM4313, BCM43224, BCM43225 chipsets
Currently does not support monitor/injection
Centrino bipw2100802.11b only
Centrino b/gipw2200See IPW2200 and RF-Mon. See more recent update info here See this thread for how to do injection.
Centrino a/b/gipw2915
ipw3945
iwl3945
ipw2915 uses ipw2200 driver (See this thread for alpha injection support.) For ipw3945 you can use the ipwraw-ng driveriwl3945 recommended on >=2.6.26, or see Live Distros for WifiWay which includes patches for injection.
Centrino a/g/niwlwifi4965AGN under development.
Cisco/AironetCisco PCX500/PCX504 peek driverairo-linux4500/4800/340/350 series, Firmware 4.25.30 recommended (see thisfor more info)
Hermes IAgere peek driverOrinoco
Orinoco Monitor Mode Patch
802.11b only and only with specific firmware (7.52)
NdiswrapperN/AndiswrapperUsing windows drivers in linux. It will never work with aircrack-ng
cx3110x
(Nokia 770/800)
cx3110xSupports monitor mode (flaky) but not injection
prism2/2.5LinkFerret or aerosolHostAP
wlan-ng
Use STA firmware >=1.5.6 (see Prism2 flashing)802.11b only, and only on old kernels ⇐2.6.20. See this forum entry regarding windows support.
prismGTPrismGT by 500brabusprism54only FullMAC cards works with aircrack on Linux. Deprecated driver, refer to p54.
prismGT (alternative)p54mac80211 based, requires >=2.6.30 for better softMAC support. Also supports PrismGT FullMAC and PrismGT USB based chipsets.
Ralinkrt2x00 or
RaLink RT2570USB Enhanced Driver or
RaLink RT73 USB Enhanced Driver
The entire rt2x00 family: rt2400pci, rt2500pci, rt2500usb, rt2800pci and rt2800usb can inject and monitor. Including PCI and USB chips on b/g/n.
Realtek 8180Realtek peek driverrtl8180-sa2400802.11b only
Realtek 8187Lr8187
rtl8187
Realtek 8187Brtl8187 (2.6.27+) or r8187b (beta)
TIACX100/ACX111/ACX100USB
ZyDAS 1201zd1201802.11b only
ZyDAS 1211zd1211rw plus patchExcellent USB chip with reliable aircrack-ng and general support

Monday, 27 February 2017

Heroku: Cloud Application Platform

Heroku: Cloud Application Platform


Image result for Heroku: Cloud Application Platform

What is Heroku?


Heroku is a container-based cloud Platform as a Service (PaaS). Developers use Heroku to deploy, manage, and scale modern apps. Our platform is elegant, flexible, and easy to use, offering developers the simplest path to getting their apps to market.
Heroku is fully managed, giving developers the freedom to focus on their core product without the distraction of maintaining servers, hardware, or infrastructure. The Heroku experience provides services, tools, workflows, and polyglot support—all designed to enhance developer productivity.
Heroku works with a wide variety of customers and partners. Learn more about how we support digital and software development agenciespartners, and enterprise companies.
Image result for Heroku: Cloud Application Platform

This is a high-level, technical description of how Heroku works. It ties together many of the concepts you’ll encounter while writing, configuring, deploying and running applications on the Heroku platform.
Read this document sequentially: in order to tell a coherent story, it incrementally unveils and refines the concepts describing the platform.
The final section ties all the definitions together, providing a deploy-time and runtime-view of Heroku.

Unleash your inner startup

Defining an application

Heroku lets you deploy, run and manage applications written in Ruby, Node.js, Java, Python, Clojure, Scala, Go and PHP.
An application is a collection of source code written in one of these languages, perhaps a framework, and some dependency description that instructs a build system as to which additional dependencies are needed in order to build and run the application.
Terminology (Preliminary): Applications consist of your source code and a description of any dependencies.
Dependency mechanisms vary across languages: in Ruby you use a Gemfile, in Python arequirements.txt, in Node.js a package.json, in Java a pom.xml and so on.
The source code for your application, together with the dependency file, should provide enough information for the Heroku platform to build your application, to produce something that can be executed.

Knowing what to execute

You don’t need to make many changes to an application in order to run it on Heroku. One requirement is informing the platform as to which parts of your application are runnable.
If you’re using some established framework, Heroku can figure it out. For example, in Ruby on Rails, it’s typically rails server, in Django it’s python <app>/manage.py runserver and in Node.js it’s the main field in package.json.
TerminologyProcfiles list process types - named commands that you may want executed.
For other applications, you may need to explicitly declare what can be executed. You do this in a text file that accompanies your source code - a Procfile. Each line declares a process type - a named command that can be executed against your built application. For example, your Procfile may look like this:
web: java -jar lib/foobar.jar $PORT
queue: java -jar lib/queue-processor.jar
This file declares a web process type and provides the command that needs to be executed in order to run it (in this case, java -jar lib/foobar.jar $PORT). It also declares a queue process type, and its corresponding command.
The earlier definition of an application can now be refined to include this single additional Procfile.
Terminology: Applications consist of your source code, a description of any dependencies, and a Procfile.
Heroku is a polyglot platform – it lets you build, run and scale applications in a similar manner across all the languages – utilizing the dependencies and Procfile. The Procfile exposes an architectural aspect of your application (in the above example there are two entry points to the application) and this architecture lets you, for example, scale each part independently. An excellent guide to architecture principles that work well for applications running on Heroku can be found inArchitecting Applications for Heroku.

Deploying applications

Git is a powerful, distributed version control system that many developers use to manage and version source code. The Heroku platform uses git as the primary means for deploying applications (there are other ways to transport your source code to Heroku, including via an API).
When you create an application on Heroku, it associates a new git remote, typically named heroku, with the local git repository for your application.
As a result, deploying code is just the familiar git push, but to the heroku remote instead:
$ git push heroku master
Terminology: Deploying applications involves sending the application to Heroku using either git, GitHub, Dropbox, or via an API.
There are many other ways of deploying applications too. For example, you can enable GitHub integration so that each new pull request is associated with its own new application, which enables all sorts of continuous integration scenarios. Or you can use Dropbox Sync, which lets you deploy the contents of Dropbox folders to Heroku. Finally, you can also use the Heroku API to build and release apps.
Deployment then, is about moving your application from your local system to Heroku - and Heroku provides several ways in which apps can be deployed.

Building applications

When the Heroku platform receives the application source, it initiates a build of the source application. The build mechanism is typically language specific, but follows the same pattern, typically retrieving the specified dependencies, and creating any necessary assets (whether as simple as processing style sheets or as complex as compiling code).
AdvancedBuildpacks lie behind the slug compilation process. Buildpacks take your application, its dependencies, and the language runtime, and produce slugs. They’re open source - enabling you to extend Heroku to other languages and frameworks.
For example, when the build system receives a Rails application, it may fetch all the dependencies specified in the Gemfile, as well as generate files based on the asset pipeline. A Java application may fetch binary library dependencies using Maven, compile the source code together with those libraries, and produce a JAR file to execute.
The source code for your application, together with the fetched dependencies and output of the build phase such as generated assets or compiled code, as well as the language and framework, are assembled into a slug.
Terminology: A slug is a bundle of your source, fetched dependencies, the language runtime, and compiled/generated output of the build system - ready for execution.
These slugs are a fundamental aspect of what happens during application execution - they contain your compiled, assembled application - ready to run - together with the instructions (the Procfile) of what you may want to execute.

Running applications on dynos

Heroku executes applications by running a command you specified in the Procfile, on a dyno that’s been preloaded with your prepared slug (in fact, with your release, which extends your slug and a few items not yet defined: config vars and add-ons).
Think of a running dyno as a lightweight, secure, virtualized Unix container that contains your application slug in its file system.
TerminologyDynos are isolated, virtualized Unix containers, that provide the environment required to run an application.
Generally, if you deploy an application for the first time, Heroku will run 1 web dyno automatically. In other words, it will boot a dyno, load it with your slug, and execute the command you’ve associated with the web process type in your Procfile.
You have control over how many dynos are running at any given time. Given the Procfile example earlier, you can start 5 dynos, 3 for the web and 2 for the queue process types, as follows:
$ heroku ps:scale web=3 queue=2
When you deploy a new version of an application, all of the currently executing dynos are killed, and new ones (with the new release) are started to replace them - preserving the existing dyno formation.
Terminology: Your application’s dyno formation is the total number of currently-executing dynos, divided between the various process types you have scaled.
To understand what’s executing, you just need to know what dynos are running which process types:
$ heroku ps
== web: 'java lib/foobar.jar $PORT'
web.1: up 2013/02/07 18:59:17 (~ 13m ago)
web.1: up 2013/02/07 18:52:08 (~ 20m ago)
web.2: up 2013/02/07 18:31:14 (~ 41m ago)

== queue: `java lib/queue-processor.jar`
queue.1: up 2013/02/07 18:40:48 (~ 32m ago)
queue.2: up 2013/02/07 18:40:48 (~ 32m ago)
Dynos then, are an important means of scaling your application. In this example, the application is well architected to allow for the independent scaling of web and queue worker dynos.

Config vars

An application’s configuration is everything that is likely to vary between environments (staging, production, developer environments, etc.). This includes backing services such as databases, credentials, or environment variables that provide some specific information to your application.
Heroku lets you run your application with a customizable configuration - the configuration sits outside of your application code and can be changed independently of it.
The configuration for an application is stored in config vars. For example, here’s how to configure an encryption key for an application:
$ heroku config:set ENCRYPTION_KEY=my_secret_launch_codes
Adding config vars and restarting demoapp... done, v14
ENCRYPTION_KEY:     my_secret_launch_codes
TerminologyConfig vars contain customizable configuration data that can be changed independently of your source code. The configuration is exposed to a running application via environment variables.
At runtime, all of the config vars are exposed as environment variables - so they can be easily extracted programatically. A Ruby application deployed with the above config var can access it by calling ENV["ENCRYPTION_KEY"].
All dynos in an application will have access to the exact same set of config vars at runtime.

Releases

Earlier, this article stated that to run your application on a dyno, the Heroku platform loaded the dyno with your most recent slug. This needs to be refined: in fact it loads it with the slug and any config variables you have assigned to the application. The combination of slug and configuration is called a release.
Terminology (Preliminary): Releases are an append-only ledger of slugs and config vars.
All releases are automatically persisted in an append-only ledger, making managing your application, and different releases, a cinch. Use the heroku releases command to see the audit trail of release deploys:
$ heroku releases
== demoapp Releases
v103 Deploy 582fc95  jon@heroku.com   2013/01/31 12:15:35
v102 Deploy 990d916  jon@heroku.com   2013/01/31 12:01:12
The number next to the deploy message, for example 582fc95, corresponds to the commit hash of the repository you deployed to Heroku.
Every time you deploy a new version of an application, a new slug is created and release is generated.
As Heroku contains a store of the previous releases of your application, it’s very easy to rollback and deploy a previous release:
$ heroku releases:rollback v102
Rolling back demoapp... done, v102
$ heroku releases
== demoapp Releases
v104 Rollback to v102 jon@heroku.com   2013/01/31 14:11:33 (~15s ago)
v103 Deploy 582fc95   jon@heroku.com   2013/01/31 12:15:35
v102 Deploy 990d916   jon@heroku.com   2013/01/31 12:01:12
Making a material change to your application, whether it’s changing the source or configuration, results in a new release being created.
A release then, is the mechanism behind how Heroku lets you modify the configuration of your application (the config vars) independently of the application source (stored in the slug) - the release binds them together. Whenever you change a set of config vars associated with your application, a new release will be generated.

Dyno manager

Part of the Heroku platform, the dyno manager, is responsible for keeping dynos running. For example, dynos are cycled at least once per day, or whenever the dyno manager detects a fault in the running application (such as out of memory exceptions) or problems with the underlying hardware that requires the dyno be moved to a new physical location.
Terminology: The dyno manager of the Heroku platform is responsible for managing dynos across all applications running on Heroku.
This dyno cycling happens transparently and automatically on a regular basis, and is logged.
Terminology: Applications that use the free dyno type will sleep. When a sleeping application receives HTTP traffic, it will be awakened - causing a delay of a few seconds. Using one of the otherdyno types will avoid sleeping.
Because Heroku manages and runs applications, there’s no need to manage operating systems or other internal system configuration. One-off dynos can be run with their input/output attached to your local terminal. These can also be used to carry out admin tasks that modify the state of shared resources, for example database configuration - perhaps periodically through a scheduler.
Here’s the simplest way to create and attach to a one-off dyno:
$ heroku run bash
Running `bash` attached to terminal... up, run.8963
~ $ ls
This will spin up a new dyno, loaded with your release, and then run the bash command - which will provide you with a unix shell (remember that dynos are effectively isolated virtualized unix containers). Once you’ve terminated your session, or after a period of inactivity, the dyno will be removed.
Changes to the filesystem on one dyno are not propagated to other dynos and are not persisted across deploys and dyno restarts. A better and more scalable approach is to use a shared resource such as a database or queue.
The ephemeral nature of the file system in a dyno can be demonstrated with the above command. If you create a one-off dyno by running heroku run bash, the Unix shell on the dyno, and then create a file on that dyno, and then terminate your session - the change is lost. All dynos, even those in the same application, are isolated - and after the session is terminated the dyno will be killed. New dynos are always created from a slug, not from the state of other dynos.

Add-ons

Applications typically make use of add-ons to provide backing services such as databases, queueing & caching systems, storage, email services and more. Add-ons are provided as services by Heroku and third parties - there’s a large marketplace of add-ons you can choose from.
Heroku treats these add-ons as attached resources: provisioning an add-on is a matter of choosing one from the add-on marketplace, and attaching it to your application.
For example, here is how to add the Heroku Redis backing store add-on to an application:
$ heroku addons:create heroku-redis:hobby-dev
Dynos do not share file state, and so add-ons that provide some kind of storage are typically used as a means of communication between dynos in an application. For example, Redis or Postgres could be used as the backing mechanism in a queue; then dynos of the web process type can push job requests onto the queue, and dynos of the queue process type can pull jobs requests from the queue.
The add-on service provider is responsible for the service - and the interface to your application is often provided through a config var. In this example, a REDIS_URL will be automatically added to your application when you provision the add-on. You can write code that connects to the service through the URL, for example:
uri = URI.parse(ENV["REDIS_URL"])
REDIS = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
Add-ons are associated with an application, much like config vars - and so the earlier definition of a release needs to be refined. A release of your applications is not just your slug and config vars; it’s your slug, config vars as well as the set of provisioned add-ons.
Much like config vars, whenever you add, remove or change an add-on, a new release is created.

Logging and monitoring

Heroku treats logs as streams of time-stamped events, and collates the stream of logs produced from all of the processes running in all dynos, and the Heroku platform components, into the Logplex- a high-performance, real-time system for log delivery.
It’s easy to examine the logs across all the platform components and dynos:
$ heroku logs
2013-02-11T15:19:10+00:00 heroku[router]: at=info method=GET path=/articles/custom-domains host=mydemoapp.heroku.com fwd=74.58.173.188 dyno=web.1 queue=0 wait=0ms connect=0ms service=1452ms status=200 bytes=5783
2013-02-11T15:19:10+00:00 app[web.2]: Started GET "/" for 1.169.38.175 at 2013-02-11 15:19:10 +0000
2013-02-11T15:19:10+00:00 app[web.1]: Started GET "/" for 2.161.132.15 at 2013-02-11 15:20:10 +0000
Here you see 3 timestamped log entries, the first from Heroku’s router, the last two from two dynos running the web process type.
You can also dive into the logs from just a single dyno, and keep the channel open, listening for further events:
$ heroku logs --ps web.1 --tail
2013-02-11T15:19:10+00:00 app[web.2]: Started GET "/" for 1.169.38.175 at 2013-02-11 15:19:10 +0000
Logplex keeps a limited buffer of log entries solely for performance reasons. To persist them, and action events such as email notification on exception, use a Logging Add-on, which ties into log drains - an API for receiving the output from Logplex.

HTTP routing

Depending on your dyno formation, some of your dynos will be running the command associated with the web process type, and some will be running other commands associated with other process types.
The dynos that run process types named web are different in one way from all other dynos - they will receive HTTP traffic. Heroku’s HTTP routers distribute incoming requests for your application across your running web dynos.
So scaling an app’s capacity to handle web traffic involves scaling the number of web dynos:
$ heroku ps:scale web+5
A random selection algorithm is used for HTTP request load balancing across web dynos - and this routing handles both HTTP and HTTPS traffic. It also supports multiple simultaneous connections, as well as timeout handling.

Tying it all together

The concepts explained here can be divided into two buckets: those that involve the development and deployment of an application, and those that involve the runtime operation of the Heroku platform and the application after it’s deployed.
The following two sections recapitulate the main components of the platform, separating them into these two buckets.

Deploy

  • Applications consist of your source code, a description of any dependencies, and a Procfile.
  • Procfiles list process types - named commands that you may want executed.
  • Deploying applications involves sending the application to Heroku using either git, GitHub, Dropbox, or via an API.
  • Buildpacks lie behind the slug compilation process. Buildpacks take your application, its dependencies, and the language runtime, and produce slugs.
  • slug is a bundle of your source, fetched dependencies, the language runtime, and compiled/generated output of the build system - ready for execution.
  • Config vars contain customizable configuration data that can be changed independently of your source code. The configuration is exposed to a running application via environment variables.
  • Add-ons are third party, specialized, value-added cloud services that can be easily attached to an application, extending its functionality.
  • release is a combination of a slug (your application), config vars and add-ons. Heroku maintains an append-only ledger of releases you make.

Runtime

  • Dynos are isolated, virtualized unix containers, that provide the environment required to run an application.
  • Your application’s dyno formation is the total number of currently-executing dynos, divided between the various process types you have scaled.
  • The dyno manager is responsible for managing dynos across all applications running on Heroku.
  • Applications that use the free dyno type will sleep after 30 minutes of inactivity. Scaling to multiple web dynos, or a different dyno type, will avoid this.
  • One-off Dynos are temporary dynos that run with their input/output attached to your local terminal. They’re loaded with your latest release.
  • Each dyno gets its own ephemeral filesystem - with a fresh copy of the most recent release. It can be used as temporary scratchpad, but changes to the filesystem are not reflected to other dynos.
  • Logplex automatically collates log entries from all the running dynos of your app, as well as other components such as the routers, providing a single source of activity.
  • Scaling an application involves varying the number of dynos of each process type.