SlideShare uma empresa Scribd logo
1 de 52
Baixar para ler offline
Blip technicznie, czyli
Inżynieria uzależnień
Co to jest ten blip?
blog na spidzie?
IRC 2.0?
kolejna FaJnA StRonKa?
Tak na początku myślą
  nowi użytkownicy.
A programiści,
zwykle mówią...
Mylą się jednak srodze.
        Bo blip, to też:
Mylą się jednak srodze.
        Bo blip, to też:
        • SMS
        • MMS
        • GaduGadu
        • Jabber (GTalk, SPIK, inne)
        • API
        • Widget
        • naGłos
        • naprawdę dynamiczne WWW
WWW to nie wszystko
                       24%

       42%


                        22%

             10% 2%




 WWW   GG     Jabber     SMS/MMS   API
Zacznijmy od nowa.
Programowanie w
 czasach zarazy.
Programowanie w
 czasach zarazy.
Osoby wrażliwe na piękno kodu
  prosimy o zamknięcie oczu.
LAMP? nie, dziękuję.
LAMP? nie, dziękuję.
• FreeBSD

• Lighttpd

• PostgreSQL (+Slony-I)

• Ruby + Rails

• one more thing..
Python + ekg!
Twitter nie dawał
  rady, więc..
Użyliśmy ANSI C!
Maszyneria
Maszyneria


• “zapomniany” pecet, webrick:3000
• hetzner.de
• pożyczone maszyny z rsync’em
• nokia 6310 na strychu
A potem wszystko
   zaoraliśmy.
   no, prawie wszystko.
Architektura jest banalna.
Darklord
Włada nami ciemny demon
Transporty to oddzielne wątki
~# darklord_ctl list_services
---
mms_transport:
  :thread_state: quot;#<Thread:0x2ba46d51fd78 sleep>quot;
  :uptime: 26h 55m 23s
gadu_gadu_transport:
  :thread_state: quot;#<Thread:0x2ba46d591978 sleep>quot;
  :uptime: 26h 55m 23s
jabber_transport:
  :thread_state: quot;#<Thread:0x2ba46d520520 sleep>quot;
  :uptime: 26h 55m 23s
sms_transport:
  :thread_state: quot;#<Thread:0x2ba46d591298 sleep>quot;
  :uptime: 26h 55m 23s
web_service:
  :thread_state: nil
  :uptime: 26h 55m 23s
zarządzalne w biegu
# darklord_ctl commands

commands

debug_start

debug_stop

list_services

service_restart

service_start

service_stop

stats

stop
raportujące usłużnie
# darklord_ctl stats gadu_gadu_transport
--- !map:Statistics
:last_incoming_message_received: 1197378880
:inbound_messages_received: 1168
:event_disconnect_count: 4
:inbound_messages_flood_protected: 17
:updates_handled: 1148
:outbound_messages_handled: 12386
:verifications_handled: 20
:inbound_messages_handled: 1168
:last_outgoing_message_sent: 2007-12-11 14:14:53
:outbound_messages_failures: 1
:event_conn_failed_count: 653
MMS
MMS
•Użytkownik wysyła na e-mail (m@blip.pl)
•Wiadomość trafia na serwer SMTP
•DarkLord pobiera za pomocą POP3
•E-mail jest oczyszczany za pomocą MMS2R
(do którego wykonaliśmy kontrybucję!)
•Odczytujemy wysyłający numer, szukamy u
nas
•Wysyłamy przez API żądanie POST razem z
załącznikami
•Potwierdzamy przyjęcie MMSa SMSem i...
Donos trafia na blipa!
SMS
SMS

•Użytkownik wysyła SMS na nasz numer

•SMS trafia do modemu GSM

•Gammu w trybie SMSD spięte z MySQLem

•SMSowy sługa DarkLorda pobiera i..
Informacja z ulicy
trafia prosto na blipa!
Jabber
Jabber


•Własny serwer ejabberd (niezależność, SRV)


•Biblioteka: xmpp4r


•Wątek jabber_transport działa jako klient
Gadu naGłos
Gadu naGłos

•Użytkownik dzwoni z telefonu lub Gadu
•WS z nagłosu pyta o to, czy chcemy słuchać?
•DarkLord decyduje czy ma czas na audiencję
•WS notyfikuje o nowej, pachnącej mp3
•DarkLord pobiera mp3 i przekazuje przez API
do Rails..
Wracam po szkole
i dzwonię na blipa!
Jak to się robi?
Ruby + Rails
nginx
Czemu nginx?
Czemu nginx?
•Bardzo mały

•Duże możliwości konfiguracyjne

•Nieco szybszy niż Lighttpd

•Lepsze możliwości rewrite’owania URLi

•Stabilny, nie cieknie, świetny jako reverse-proxy
GlusterFS
Czemu GlusterFS?
Czemu GlusterFS?
•Część GNU Clustering Platform (FS, HPC, EP)
•Agregacja wielu źródeł danych w jeden FS
•“Skalowalność ponad Petabajty”
•Różne schedulery, brak metadanych, moduły!
•Niezależny od sprzętu i systemu.
•Prosta konfiguracja
•FUSE
CruiseControl.rb
RCov - badanie pokrycie kodu testami
BDD - specyfikacja zamiast testów




User
- should add http:// to url when missing
- should not add http:// to url when already present
- should find users from GaduGadu contact list
- should not track anyone through im when no im configuration
- should send email invitations
PYTANIA?
K THX BAI


         Zbigniew Sobiecki
      zbigniew@sobiecki.name

Mais conteúdo relacionado

Destaque

10 steps to an award application
10 steps to an award application10 steps to an award application
10 steps to an award applicationmaruay songtanin
 
The integrated management system 2015
The integrated management system 2015The integrated management system 2015
The integrated management system 2015maruay songtanin
 
Evolution of design thinking วิวัฒนาการความคิดการออกแบบ
Evolution of design thinking วิวัฒนาการความคิดการออกแบบEvolution of design thinking วิวัฒนาการความคิดการออกแบบ
Evolution of design thinking วิวัฒนาการความคิดการออกแบบmaruay songtanin
 

Destaque (9)

Ortografía con wordle
Ortografía con wordleOrtografía con wordle
Ortografía con wordle
 
Scoring system
Scoring systemScoring system
Scoring system
 
Decoding leadership
Decoding leadershipDecoding leadership
Decoding leadership
 
10 steps to an award application
10 steps to an award application10 steps to an award application
10 steps to an award application
 
The integrated management system 2015
The integrated management system 2015The integrated management system 2015
The integrated management system 2015
 
Evolution of design thinking วิวัฒนาการความคิดการออกแบบ
Evolution of design thinking วิวัฒนาการความคิดการออกแบบEvolution of design thinking วิวัฒนาการความคิดการออกแบบ
Evolution of design thinking วิวัฒนาการความคิดการออกแบบ
 
Comment guidelines 2015
Comment guidelines 2015Comment guidelines 2015
Comment guidelines 2015
 
Board of directors
Board of directorsBoard of directors
Board of directors
 
Strategy definition
Strategy definitionStrategy definition
Strategy definition
 

Mais de Bootstrap

Rapid Prototyping With J Query
Rapid Prototyping With J QueryRapid Prototyping With J Query
Rapid Prototyping With J QueryBootstrap
 
Flash & web standards, Krzysztof Szafranek (Bootstrap 9.6)
Flash & web standards, Krzysztof Szafranek (Bootstrap 9.6)Flash & web standards, Krzysztof Szafranek (Bootstrap 9.6)
Flash & web standards, Krzysztof Szafranek (Bootstrap 9.6)Bootstrap
 
Salesguru.Pl na Bootstrapie
Salesguru.Pl na BootstrapieSalesguru.Pl na Bootstrapie
Salesguru.Pl na BootstrapieBootstrap
 
Bootstrap 9.4 - Hackerspaces - Christoffer Jerkeby, Olle Jonsson
Bootstrap 9.4 - Hackerspaces - Christoffer Jerkeby, Olle JonssonBootstrap 9.4 - Hackerspaces - Christoffer Jerkeby, Olle Jonsson
Bootstrap 9.4 - Hackerspaces - Christoffer Jerkeby, Olle JonssonBootstrap
 
Bootstrap 9.4 - Arduino - Witold Rugowski
Bootstrap 9.4 - Arduino - Witold RugowskiBootstrap 9.4 - Arduino - Witold Rugowski
Bootstrap 9.4 - Arduino - Witold RugowskiBootstrap
 
Getting Physical - Tomasz Kolinko (Bootstrap 9.4, Arduino)
Getting Physical - Tomasz Kolinko (Bootstrap 9.4, Arduino)Getting Physical - Tomasz Kolinko (Bootstrap 9.4, Arduino)
Getting Physical - Tomasz Kolinko (Bootstrap 9.4, Arduino)Bootstrap
 
Kokon a trzon. o2.pl 2005-2010
Kokon a trzon. o2.pl 2005-2010Kokon a trzon. o2.pl 2005-2010
Kokon a trzon. o2.pl 2005-2010Bootstrap
 
Monika Mosiewicz, Jak administrować społecznością i nie trafić przed sąd
Monika Mosiewicz, Jak administrować społecznością i nie trafić przed sądMonika Mosiewicz, Jak administrować społecznością i nie trafić przed sąd
Monika Mosiewicz, Jak administrować społecznością i nie trafić przed sądBootstrap
 
Co nowego w świecie Ruby\'ego
Co nowego w świecie Ruby\'egoCo nowego w świecie Ruby\'ego
Co nowego w świecie Ruby\'egoBootstrap
 
Doliny Krzemowej to tu nie będzie…
Doliny Krzemowej to tu nie będzie…Doliny Krzemowej to tu nie będzie…
Doliny Krzemowej to tu nie będzie…Bootstrap
 

Mais de Bootstrap (14)

Rapid Prototyping With J Query
Rapid Prototyping With J QueryRapid Prototyping With J Query
Rapid Prototyping With J Query
 
Flash & web standards, Krzysztof Szafranek (Bootstrap 9.6)
Flash & web standards, Krzysztof Szafranek (Bootstrap 9.6)Flash & web standards, Krzysztof Szafranek (Bootstrap 9.6)
Flash & web standards, Krzysztof Szafranek (Bootstrap 9.6)
 
dobry dizajn
dobry dizajndobry dizajn
dobry dizajn
 
Salesguru.Pl na Bootstrapie
Salesguru.Pl na BootstrapieSalesguru.Pl na Bootstrapie
Salesguru.Pl na Bootstrapie
 
Bootstrap 9.4 - Hackerspaces - Christoffer Jerkeby, Olle Jonsson
Bootstrap 9.4 - Hackerspaces - Christoffer Jerkeby, Olle JonssonBootstrap 9.4 - Hackerspaces - Christoffer Jerkeby, Olle Jonsson
Bootstrap 9.4 - Hackerspaces - Christoffer Jerkeby, Olle Jonsson
 
Bootstrap 9.4 - Arduino - Witold Rugowski
Bootstrap 9.4 - Arduino - Witold RugowskiBootstrap 9.4 - Arduino - Witold Rugowski
Bootstrap 9.4 - Arduino - Witold Rugowski
 
Getting Physical - Tomasz Kolinko (Bootstrap 9.4, Arduino)
Getting Physical - Tomasz Kolinko (Bootstrap 9.4, Arduino)Getting Physical - Tomasz Kolinko (Bootstrap 9.4, Arduino)
Getting Physical - Tomasz Kolinko (Bootstrap 9.4, Arduino)
 
Kokon a trzon. o2.pl 2005-2010
Kokon a trzon. o2.pl 2005-2010Kokon a trzon. o2.pl 2005-2010
Kokon a trzon. o2.pl 2005-2010
 
Szuku.pl
Szuku.plSzuku.pl
Szuku.pl
 
Monika Mosiewicz, Jak administrować społecznością i nie trafić przed sąd
Monika Mosiewicz, Jak administrować społecznością i nie trafić przed sądMonika Mosiewicz, Jak administrować społecznością i nie trafić przed sąd
Monika Mosiewicz, Jak administrować społecznością i nie trafić przed sąd
 
Co nowego w świecie Ruby\'ego
Co nowego w świecie Ruby\'egoCo nowego w świecie Ruby\'ego
Co nowego w świecie Ruby\'ego
 
Doliny Krzemowej to tu nie będzie…
Doliny Krzemowej to tu nie będzie…Doliny Krzemowej to tu nie będzie…
Doliny Krzemowej to tu nie będzie…
 
Textilla 15
Textilla 15Textilla 15
Textilla 15
 
Livechat 2008
Livechat 2008Livechat 2008
Livechat 2008
 

Blip technicznie, czyli inżynieria uzależnień...