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
2.1k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Desarrollando aplicaciones con Ubuntu One
Charla dada en UbuconLA el 3/6/2012
Roberto Alsina
June 04, 2012
More Decks by Roberto Alsina
See All by Roberto Alsina
Python en el browser
ralsina
0
99
Python 2 debe morir
ralsina
0
530
Programando Cross-Platform
ralsina
1
2.4k
Haciendo trampa: Trucos para programar menos
ralsina
1
2.3k
Hacer una cosa, pero hacerla bien
ralsina
1
1.4k
libreto.pdf
ralsina
0
110
Other Decks in Programming
See All in Programming
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
370
メールのエイリアス機能を履き違えない
isshinfunada
0
230
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.7k
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
150
仕様駆動開発の消費期限
watany
19
7.7k
20260722_microCMSで考える、AI時代のコンテンツ運用設計
yosh1
0
380
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
680
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
770
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
160
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
2.8k
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
4
1.9k
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
180
Featured
See All Featured
From π to Pie charts
rasagy
0
260
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
200
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.7k
Fireside Chat
paigeccino
42
4k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
240
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
210
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
3
420
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
460
Exploring anti-patterns in Rails
aemeredith
3
460
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.1k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
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