Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Desarrollando aplicaciones con Ubuntu One
Search
Roberto Alsina
June 04, 2012
Programming
1
2.1k
Desarrollando aplicaciones con Ubuntu One
Charla dada en UbuconLA el 3/6/2012
Roberto Alsina
June 04, 2012
Tweet
Share
More Decks by Roberto Alsina
See All by Roberto Alsina
Python en el browser
ralsina
0
92
Python 2 debe morir
ralsina
0
520
Programando Cross-Platform
ralsina
1
2.3k
Haciendo trampa: Trucos para programar menos
ralsina
1
2.3k
Hacer una cosa, pero hacerla bien
ralsina
1
1.3k
libreto.pdf
ralsina
0
110
Other Decks in Programming
See All in Programming
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
640
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
130
AIコーディングの理想と現実 2026 | AI Coding: Expectations vs. Reality 2026
tomohisa
0
1.2k
技術検証結果の整理と解析をAIに任せよう!
keisukeikeda
0
110
2026/02/04 AIキャラクター人格の実装論 口 調の模倣から、コンテキスト制御による 『思想』と『行動』の創発へ
sr2mg4
0
730
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
210
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
2
530
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
490
atmaCup #23でAIコーディングを活用した話
ml_bear
4
750
AI時代でも変わらない技術コミュニティの力~10年続く“ゆるい”つながりが生み出す価値
n_takehata
2
680
モジュラモノリスにおける境界をGoのinternalパッケージで守る
magavel
0
3.5k
Windows on Ryzen and I
seosoft
0
220
Featured
See All Featured
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
Visualization
eitanlees
150
17k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
300
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
310
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
67
37k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
150
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
470
The browser strikes back
jonoalderson
0
770
Transcript
Desarrollando Aplicaciones con Ubuntu One Les Habla: Roberto Alsina Cualquier
cosa, interrumpan, no hay problema. 1
Qué es Ubuntu One • Servicio de storage online •
File sync • Music Store / Music Streaming • U1DB 2
Sync Client 3
APIs • Accounts • Files API • Music Streaming •
U1DB 4
Accounts • Ubuntu Desktop • Websites • Windows • Hagalo
usted mismo 5
Autorización en Ubuntu Usando ubuntuone.platform.credentials: @defer.inlineCallbacks def get_credentials(): tool =
CredentialsManagementTool() creds = yield tool.register() oauth_consumer = oauth2.Consumer( creds['consumer_key'], creds['consumer_secret']) oauth_token = oauth2.Token( creds['token'], creds['token_secret']) 6
Autorización en Django OAuth 1.0a. Usando django_oauth_client: @oauth_token_required('ubuntuone') def create_volume(request):
client = get_client(request.user, 'ubuntuone') response, content = client.request( 'https://one.ubuntu.com/api/file_storage/v1/volumes/~/Shoreham', 'PUT') return redirect('/accounts/profile/') 7
Hágalo Usted Mismo Bueno, es OAuth, fijáte. 8
Files • Volúmenes • Listar/Bajar/Subir/Borrar archivos • Publicar archivos •
Interacción con Sync 9
En Websites @oauth_token_required('ubuntuone') def create_volume(request): client = get_client(request.user, 'ubuntuone') response,
content = client.request( 'https://one.ubuntu.com/api/file_storage/v1/volumes/~/Shoreham', 'PUT') return redirect('/accounts/profile/') 10
En Ubuntu Es Via DBus: /folders method com.ubuntuone.SyncDaemon.Folders.create(path:s) 11
U1DB • Datos estructurados • Sincronizada • Distribuída • Online
y Offline 12
Plataformas • Ubuntu/Windows/OS X - Python - SQLite • Ubuntu
- Vala - SQLite • Ubuntu/Windows/OS X - C - SQLite • Web - javascript - localStorage • Android - Java - SQLite • iOS - Objective-C - SQLite 13
Documentos • create_doc • put_doc • revisiones • delete_doc •
get_doc / get_docs 14
Índices Es un poco más denso, vean el manual? OK!
15
Crear Índices {"firstname": "John", "surname", "Barnes", "position": "left wing"} ID
jb {"firstname": "Jan", "surname", "Molby", "position": "midfield"} ID jm {"firstname": "Alan", "surname", "Hansen", "position": "defence"} ID ah {"firstname": "John", "surname", "Wayne", "position": "filmstar"} ID jw create_index("by-firstname", ["firstname"]) 16
Usar el Índice get_from_index( "by-firstname", [("John", )]) Devuelve una lista
de IDs. 17
Más Ejemplos get_from_index("by_firstname", [("J*")]) get_from_index("by_firstname", [("Jan"), ("Alan")]) 18
Ejemplo import json, u1db db = u1db.open(":memory:", create=True) doc1 =
db.create_doc(json.dumps({"key": "value"}), doc_id="testdoc1") doc2 = db.create_doc(json.dumps({"key": "value"}), doc_id="testdoc2") for doc in db.get_docs(["testdoc2","testdoc1"]): print doc.doc_id Resultado: testdoc1 testdoc2 19
Syncing • API REST • Cliente / Servidor • Conflictos
20
Conflictos • Obtenés un ConflictedDoc • Pensás • Llamás a
resolve_doc 21
Imaginación 22
Preguntas y (Ojalá) Respuestas email:
[email protected]
twitter: @ralsina 23