lightweight SOA
with web widgets
      Phillip Calçado
   http://fragmental.tw
SOAP/WS-*
   vs.
  REST
X
SOAP/WS-*
   vs.
  REST
15 tv channels
8 radio stations
19 magazines & newspapers



     500+ web sites
800 videos
900,000 visits
    every day
previous architecture
pretty picture
                               Corporate
                               Database




                      ...
real world
Media Encoder

                  SQL
                               Corporate                      xyz.globo.co...
two main problems
1) audio and
video production

2) integration with
other sites
1) audio and
video production
Media Encoder




                   Corporate
                   Database




                video.globo.com
Media Encoder




                   Corporate
                   Database




Media Encoder

                video.globo.com
multiple
Media Encoder




                                              Corporate



   instances
                       ...
Media Encoder




                   Corporate
                   Database

 v1.0




Media Encoder

                video...
multiple
Media Encoder




                                       Corporate
                                       Databas...
2) integration
with other sites
Media Encoder




                   Corporate      xyz.globo.com



                   Database




                video...
main
Corporate
            integration
Database
            point
xyz.globo.com




Corporate      Table C
Table B
                         xyz.globo.com




DatabaseTable D
Table A       ...
X
                         xyz.globo.com




Corporate      Table C
Table B
                         xyz.globo.com




Dat...
xyz.globo.com




Corporate       View C
Table B
                         xyz.globo.com




DatabaseTable D
Table A       ...
xyz.globo.com




        Corporate      View C
       View B
                                xyz.globo.com

Table E    Ta...
no contracts                                   xyz.globo.com




 Corporate               View C
          View B
        ...
Corporate
                     Database

Ratings                                                 Ratings




Video     Sho...
Corporate
                     Database

Ratings                                                 Ratings




Video     Sho...
40% code
                           Corporate
                           Database


                       duplication
   ...
the new architecture
pretty picture
                               Corporate
                               Database




                      ...
pretty picture
                                Media
                               Services




                         ...
real world
Media Encoder

                HTTP
                                Media                    xyz.globo.com
    ...
1) audio and
video production
multiple        multiple
Media Encoder




          +          Corporate
instances       versions
                     Da...
multiple              multiple
Media Encoder




          +                Corporate
instances             versions
     ...
Media Encoder

            http://mediaservices/v1/media/135
                                        Corporate
           ...
Media Encoder




                   Corporate
                   Database

 v1.0




Media Encoder

                video...
HTTP
Media Encoder



                 POST media/v1.0


 v1.0
                                       Media
              ...
2) integration
with other sites
no              code
             +
contracts duplication             xyz.globo.com




   Corporate             View C
  ...
no              code
             +
contracts duplication             xyz.globo.com




   Corporate             View C
  ...
Corporate
                     Database

Ratings                                                 Ratings




Video     Sho...
Media
            Services
Ratings


                                          logic
Video                  Show




     ...
Code Duplication

    40%

    35%

    30%

    25%

    20%

    15%

    10%

     5%

     0%
Database Integration    ...
evolving
<set>                             <set>
      <video id=quot;1quot;/>                   <video id=quot;1quot;/>

         ...
<set>
      <video id=quot;1quot;/>

                           json/xml
      <video id=quot;2quot;/>
      <video id=quo...
real world
   Media                    xyz.globo.com
  Services




                  HTTP


          HTTP
              ...
real world
   Media                     xyz.globo.com
  Services




                                             JavaScri...
<script type=quot;text/javascriptquot;
src=quot;http://video.globo.com//Wdgts/9461.htmlquot;>
</script>
<script type=quot;...
Code Duplication

    40%

    35%

    30%

    25%

    20%

    15%

    10%

     5%

     0%
Database Integration    ...
Code Duplication

    40%

    35%

    30%

    25%

    20%

    15%

    10%

     5%

     0%
Database Integration    ...
some problems
• managing Service Versioning is still
  hard, keep just the previous version
  and only if needed
• URI ver...
Thank you!
   Phillip Calçado
http://fragmental.tw
This work is licensed under a Creative Commons
    Attribution-Share Alike 2.5 Australia License

http://creativecommons.o...
TV Globo and Globo.com are
  trademarks in Brazil and
      other countries.
    Used by permission.
lightweight SOA  with web widgets
lightweight SOA  with web widgets
lightweight SOA  with web widgets
lightweight SOA  with web widgets
lightweight SOA  with web widgets
Upcoming SlideShare
Loading in …5
×

lightweight SOA with web widgets

8,443 views

Published on

Presented at Australian Architecture Forum 2008:
http://www.architectureforum.net.au/Pages/Agenda.aspx

Published in: Technology, Business
  • Be the first to comment

lightweight SOA with web widgets

  1. 1. lightweight SOA with web widgets Phillip Calçado http://fragmental.tw
  2. 2. SOAP/WS-* vs. REST
  3. 3. X SOAP/WS-* vs. REST
  4. 4. 15 tv channels 8 radio stations 19 magazines & newspapers 500+ web sites
  5. 5. 800 videos 900,000 visits every day
  6. 6. previous architecture
  7. 7. pretty picture Corporate Database video.globo.com Media Encoder xyz.globo.com Media Encoder Media Encoder Media Encoder Media Encoder Internet Movie Sound Picture
  8. 8. real world Media Encoder SQL Corporate xyz.globo.com Database SQL SQL SOAP SQL SQL HTML video.globo.com SOAP HTML Internet Media Transfer Protocol
  9. 9. two main problems
  10. 10. 1) audio and video production 2) integration with other sites
  11. 11. 1) audio and video production
  12. 12. Media Encoder Corporate Database video.globo.com
  13. 13. Media Encoder Corporate Database Media Encoder video.globo.com
  14. 14. multiple Media Encoder Corporate instances Database Media Encoder video.globo.com managed by different companies with different interests and schedules
  15. 15. Media Encoder Corporate Database v1.0 Media Encoder video.globo.com v1.1.1
  16. 16. multiple Media Encoder Corporate Database versions v1.0 Media Encoder video.globo.com hard to know who is using what v1.1.1
  17. 17. 2) integration with other sites
  18. 18. Media Encoder Corporate xyz.globo.com Database video.globo.com
  19. 19. main Corporate integration Database point
  20. 20. xyz.globo.com Corporate Table C Table B xyz.globo.com DatabaseTable D Table A xyz.globo.com xyz.globo.com video.globo.com
  21. 21. X xyz.globo.com Corporate Table C Table B xyz.globo.com DatabaseTable D Table A xyz.globo.com xyz.globo.com video.globo.com
  22. 22. xyz.globo.com Corporate View C Table B xyz.globo.com DatabaseTable D Table A xyz.globo.com xyz.globo.com video.globo.com
  23. 23. xyz.globo.com Corporate View C View B xyz.globo.com Table E Table F Database View D View A xyz.globo.com xyz.globo.com video.globo.com
  24. 24. no contracts xyz.globo.com Corporate View C View B xyz.globo.com Table E Table F Database View D View A xyz.globo.com just get what you want xyz.globo.com from my tables video.globo.com
  25. 25. Corporate Database Ratings Ratings Video Show Video Show xyz.globo.com video.globo.com Internet
  26. 26. Corporate Database Ratings Ratings Video Show Video Show same logic xyz.globo.com video.globo.com Internet
  27. 27. 40% code Corporate Database duplication Ratings Ratings Video Show Video Show same logic xyz.globo.com video.globo.com among different systems developed by different people Internet
  28. 28. the new architecture
  29. 29. pretty picture Corporate Database video.globo.com Media Encoder xyz.globo.com Media Encoder Media Encoder Media Encoder Media Encoder Internet Movie Sound Picture
  30. 30. pretty picture Media Services video.globo.com Media Encoder xyz.globo.com Media Encoder Media Encoder Media Encoder Media Encoder Internet Movie Sound Picture
  31. 31. real world Media Encoder HTTP Media xyz.globo.com Services HTTP HTTP SOAP HTML video.globo.com HTML Internet Media Transfer Protocol
  32. 32. 1) audio and video production
  33. 33. multiple multiple Media Encoder + Corporate instances versions Database v1.0 Media Encoder video.globo.com v1.1.1
  34. 34. multiple multiple Media Encoder + Corporate instances versions Database v1.0 versioned Media Encoder video.globo.com services v1.1.1
  35. 35. Media Encoder http://mediaservices/v1/media/135 Corporate Database v1.0 http://mediaservices/v2/media/135 Media Encoder http://mediaservices/v3/media/135 video.globo.com v1.1.1
  36. 36. Media Encoder Corporate Database v1.0 Media Encoder video.globo.com v1.1.1
  37. 37. HTTP Media Encoder POST media/v1.0 v1.0 Media Services Media Encoder HTTP POST media/v1.1.1 v1.1.1
  38. 38. 2) integration with other sites
  39. 39. no code + contracts duplication xyz.globo.com Corporate View C View B xyz.globo.com Table E Table F Database View D View A xyz.globo.com xyz.globo.com video.globo.com
  40. 40. no code + contracts duplication xyz.globo.com Corporate View C View B xyz.globo.com Table E Table F Database View D View A web sites as xyz.globo.com xyz.globo.com service clientsvideo.globo.com
  41. 41. Corporate Database Ratings Ratings Video Show Video Show same logic xyz.globo.com video.globo.com Internet
  42. 42. Media Services Ratings logic Video Show xyz.globo.com video.globo.com Internet
  43. 43. Code Duplication 40% 35% 30% 25% 20% 15% 10% 5% 0% Database Integration Web Services
  44. 44. evolving
  45. 45. <set> <set> <video id=quot;1quot;/> <video id=quot;1quot;/> xml <video id=quot;2quot;/> <video id=quot;2quot;/> <video id=quot;3quot;/> <video id=quot;3quot;/> </set> </set> ? xyz.globo.com video.globo.com <div> <div> <h2>video title</h2> <h2>video title</h2> html <p>description <p>description description</p> description</p> </div> </div>
  46. 46. <set> <video id=quot;1quot;/> json/xml <video id=quot;2quot;/> <video id=quot;3quot;/> </set> JavaScript Widgets <div> <h2>video title</h2> html <p>description description</p> </div>
  47. 47. real world Media xyz.globo.com Services HTTP HTTP HTML video.globo.com HTML Internet
  48. 48. real world Media xyz.globo.com Services JavaScript HTTP Widgets HTML video.globo.com JavaScript Internet
  49. 49. <script type=quot;text/javascriptquot; src=quot;http://video.globo.com//Wdgts/9461.htmlquot;> </script> <script type=quot;text/javascriptquot;> var c = new WidgetContext( {'id':'4413','type':'show'},{}); var a = new CalendarBox(c,false); a.render; </script>
  50. 50. Code Duplication 40% 35% 30% 25% 20% 15% 10% 5% 0% Database Integration Web Services
  51. 51. Code Duplication 40% 35% 30% 25% 20% 15% 10% 5% 0% Database Integration Web Services Widgets API
  52. 52. some problems • managing Service Versioning is still hard, keep just the previous version and only if needed • URI versioning can be problematic, we made it optional and added an http header • it’s very hard to be fully RESTful, be pragmatic • strong primitives are flexible
  53. 53. Thank you! Phillip Calçado http://fragmental.tw
  54. 54. This work is licensed under a Creative Commons Attribution-Share Alike 2.5 Australia License http://creativecommons.org/licenses/by-sa/2.5/au/
  55. 55. TV Globo and Globo.com are trademarks in Brazil and other countries. Used by permission.

×