Soar: Conversor de Texto para Audio(mp3)
-
Upload
nielson-santana -
Category
Education
-
view
2.523 -
download
6
Transcript of Soar: Conversor de Texto para Audio(mp3)
Botando uma idéia em ação com Flask e OpenShift
Nielson Avelino de Santana
20 de Outubro
www.soarmp3.com.br
Nielson Avelino de Santana
• Co-fundador da Umbú
• Licenciando Ciência da Computação - UFRPE
• @nielsonnas
Tecnologias usadas no Soar
• Flask;
• Eventlet
• OpenShift
Porque Flask?
• Fácil
• Simples
• Rápido
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
if __name__ == "__main__":
app.run(debug = True)
Eventlet
• Biblioteca concorrente de rede;
• Similar a threads, mas sem blocking I/O;
Eventlet
urls = ["http://www.google.com/intl/en_ALL/images/logo.gif",
"https://wiki.secondlife.com/w/images/secondlife.jpg",
"http://us.i1.yimg.com/us.yimg.com/i/ww/beta/y3.gif"]
import eventlet
from eventlet.green import urllib2
def fetch(url):
return urllib2.urlopen(url).read()
pool = eventlet.GreenPool() //Cria um vetor de threads
for body in pool.imap(fetch, urls): //Mapea urls para a função fetch
print "got body", len(body)
OpenShift – quota free
• 3 gear(512MB) e escaláveis;
• 1 GB por gear;
• Node.js, Ruby, Python, PHP, Perl, and Java;
• Deploy usando o git;
• Sem restrições de banda.
Links
• Eventlet: http://eventlet.net/
• Flask: http://flask.pocoo.org/
• OpenShift:
o https://openshift.redhat.com/
o https://openshift.redhat.com/community/get-started
Obrigado!