Upgrade to Pro — share decks privately, control downloads, hide ads and more …

slides.pdf

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

 slides.pdf

Avatar for Guilmour Rossi

Guilmour Rossi

July 10, 2017

More Decks by Guilmour Rossi

Other Decks in Programming

Transcript

  1. Plataforma aberta e colaborativa que reúne produções audiovisuais independentes e

    de livre exibição. Guilmour Rossi [email protected] Introdução a Banco de Dados
  2. 2

  3. 1. Sobre Plataforma aberta e colaborativa que reúne produções audiovisuais

    independentes, de livre exibição e que fazem pensar. Aberta: código­aberto! Colaborativa: Qualquer pessoa pode adicionar uma produção audiovisual. Documentários Filmes Séries Curta­metragens 3
  4. 1. Sobre Livre Exibição Só precisa o criador publicar/autorizar a

    exibição na internet. Copyleft Creative Commons Domínio Público Kopimi Cultura Livre 4
  5. 1. Sobre Cultura Livre O m o v i m

    e n t o p e l a c u l t u r a l i v r e é u m m o v i m e n t o s o c i a l q u e b u s c a a d e f e s a d a i g u a l d a d e d e d i r e i t o s p a r a t o d a s a s p e s s o a s e m r e l a ç ã o a o c o n h e c i m e n t o e à s o b r a s i n t e l e c t u a i s , c o m o f i l m e s , m ú s i c a , l i t e r a t u r a , p i n t u r a e t c . , p r o m o v e n d o a l i b e r d a d e p a r a d i s t r i b u i r e m o d i f i c a r o b r a s n a f o r m a d e c o n t e ú d o l i v r e p o r m e i o d a I n t e r n e t o u o u t r a s f o r m a s d e m í d i a . 5
  6. 1. Sobre Features: Streaming* das produções Separação por tags Autenticação

    do Usuário Adicionar novas produções Rating dos usuários Favoritar Assistir depois 6
  7. 1. Sobre Mas e o Streaming? HTTP (muito caro armazenamento

    e largura de banda) Origens distintas: Youtube Vimeo Realmente Libre: WebRTC 7
  8. 2. Tecnologias Linguagens HTML, CSS e JavaScript Frameworks Node.js, Express,

    Mongoose, Nunjucks, Bootstrap... Banco de Dados MongoDB Servidor Nginx Extras: Youtube API 8
  9. 2. Tecnologias Node.js Framework Javascript leve e eficiente. c o

    n s t h t t p = r e q u i r e ( ' h t t p ' ) c o n s t p o r t = 3 0 0 0 c o n s t r e q u e s t H a n d l e r = ( r e q u e s t , r e s p o n s e ) = > { c o n s o l e . l o g ( r e q u e s t . u r l ) r e s p o n s e . e n d ( ' O l á , M u n d o ! ' ) } c o n s t s e r v e r = h t t p . c r e a t e S e r v e r ( r e q u e s t H a n d l e r ) s e r v e r . l i s t e n ( p o r t , ( e r r ) = > { i f ( e r r ) { r e t u r n c o n s o l e . l o g ( ' A l g o d e u e r r a d o . ' , e r r ) } c o n s o l e . l o g ( ` S e r v i d o r i n i c i a d o n a p o r t a $ { p o r t } ` ) } ) 9
  10. 2. Tecnologias Npm (Node Package Manager) Similar ao pip, composer,

    rubygems... n p m i n s t a l l u u i d c o n s t u u i d V 1 = r e q u i r e ( ' u u i d / v 1 ' ) ; f i l e E n d N a m e = ' / p u b l i c / m e d i a / ' + u u i d V 1 ( ) + f i l e . n a m e ; 10
  11. 2. Tecnologias MongoDB Todos as produções: d b . g

    e t C o l l e c t i o n ( ' w a t c h e s ' ) . f i n d ( { } ) Todas as tags já criadas: d b . w a t c h e s . d i s t i n c t ( ' t a g s ' , { } , { } ) ; 11
  12. p e r m a l i n k :

    { t y p e : S t r i n g , u n i q u e : t r u e } , c r i a d o r : { t y p e : m o n g o o s e . S c h e m a . O b j e c t I d , r e f : ' U s e r ' } , l a y o u t : S t r i n g , t i t l e : S t r i n g , s u b t i t l e : S t r i n g , s i n o p s e : S t r i n g , y e a r : N u m b e r , i m g b g : S t r i n g , v i d e o : S t r i n g , t h u m b 4 8 0 : S t r i n g , t h u m b 1 3 0 : S t r i n g , r u n t i m e : S t r i n g , t a g s : { t y p e : [ ] , g e t : g e t T a g s , s e t : s e t T a g s } , f e a t u r e d : B o o l e a n , n _ e p s : N u m b e r , e p s : [ { l a s t : B o o l e a n , s u b t i t l e : S t r i n g , v i d e o : S t r i n g , t h u m b 4 8 0 : S t r i n g , t h u m b 1 3 0 : S t r i n g } ] } 12
  13. 3. Desafios e Soluções Tratar erros Formulários Web MongoDB ­

    NoSQL Apache ­> Nginx (SSL ­ Let's Encrypt) 14
  14. Próximos Passos Open­source WebRTC Vimeo API Features Rating dos usuários

    Favoritar Assistir depois Mais info. (Diretor, País de Origem, etc) 15