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

Procrastination as a pattern for polyglot interchange

65574978201779e7de505767f2d49bef?s=47 tobias
January 24, 2013

Procrastination as a pattern for polyglot interchange

A look at ways to communicate between components in different languages, using JRuby & Clojure as examples in TorqueBox/Immutant.

65574978201779e7de505767f2d49bef?s=128

tobias

January 24, 2013
Tweet

Transcript

  1. AS A PATTERN FOR POLYGLOT INTERCHANGE TriClojure, January 2013 http://www.flickr.com/photos/celesteh/5465690016/

  2. Toby  Crawley @tcrawley gh:/tobias

  3. http://www.flickr.com/photos/bre/552152780/ The  right  tool

  4. http://www.flickr.com/photos/telstar/5987044822/ The  talent  pool

  5. http://www.flickr.com/photos/daviderickson/5737284021/ Embed

  6. Ruby  in  Clojure (example)

  7. Prose • everything  in  one  place • write  ruby  like

     clojure  (with  wrappers) • gh:/circleci/cljr • works  for  simple  things
  8. (cons) • grody • big  ball  of  state • mixed

     programming  models • type  conversion • dependency  management • see  Rohner  (Clojure/West)
  9. Clojure  in  Ruby (no  example)

  10. Prose • everything  in  one  place • write  clojure  like

     ruby  (with  wrappers) • gh:/kyleburton/jrclj • works  for  simple  things
  11. (cons) • mixed  programming  models • type  conversion • dependency

     management
  12. http://www.flickr.com/photos/avlxyz/2462060601 Separation  of   concerns

  13. Prose • deployment  independence • facilitates  separate  teams

  14. (cons) • deployment  complexity • conversion  overhead • integration  testing

  15. http://www.flickr.com/photos/jacksnell707/6488069287/ Communication

  16. http (example)

  17. Prose • you  already  know  it • you  (may)  already

     have  it
  18. (cons) • (may)  expose  a  private  interface • error/retry  handling

    • incidental  complexity • scaling? • endpoint  discovery
  19. database (ugh,  really?  no  example)

  20. Prose • you  already  know  it • you  already  have

     it • generally  good  at  coordination
  21. (cons) • using  the  db  for  transient  data • already

     a  bottleneck • polling  complexity
  22. messaging (example)

  23. Prose • less  compensatory  logic   • simple  scalability •

    distinct  endpoint
  24. (cons) • timeouts  still  an  issue • (possibly)  another  system

     to  manage • integration  testing
  25. http://www.flickr.com/photos/lajoso/2445777235 Sync/Async

  26. Prose • true  deployment  independence   • simplifies  the  requester

      • scalable • chainable
  27. (cons) • up  front  design • dealing  with  async  results

    • debugging  &  integration  tests
  28. http://www.flickr.com/photos/avlxyz/2462060601 General              Pattern http://www.flickr.com/photos/nostri-imago/300664816

  29. Resources • immutant.org • torquebox.org • gh:/tobias/procrastination-­sample-­code

  30. http://www.flickr.com/photos/10233859@N00/4801764538/ Shin Donkey Danke  schön!

  31. http://www.flickr.com/photos/coldtaxi/426162862/