Programming Languages For The Cloud

13,348 views

Published on

CommunityOne 2009

Published in: Technology
1 Comment
2 Likes
Statistics
Notes
  • As a management instructor I appreciate viewing the work of others. This is among the greatest display on planning I've viewed.
    Sharika
    http://financeadded.com http://traveltreble.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
13,348
On SlideShare
0
From Embeds
0
Number of Embeds
373
Actions
Shares
0
Downloads
233
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide

Programming Languages For The Cloud

  1. 1. Programming Languages for the Cloud S304101 Ted Leung Principal Engineer, Sun Microsystems
  2. 2. I have questions... More questions than answers A kind of “Cambrian Explosion” of languages Is there any intersection? 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 2
  3. 3. Agenda Cloud Taxonomy Where languages intersect the cloud Security Concurrency Performance Distribution Operational Considerations Domain Specific Languages 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 3
  4. 4. Cloud Taxonomy 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
  5. 5. Cloud Taxonomy Utility/Efficiency 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
  6. 6. Cloud Taxonomy Next Gen Web Utility/Efficiency 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
  7. 7. Cloud Taxonomy Next Gen Web Utility/Efficiency Infrastructure aaS 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
  8. 8. Cloud Taxonomy Next Gen Web Utility/Efficiency Stack aaS Infrastructure aaS 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
  9. 9. Cloud Taxonomy Next Gen Web Utility/Efficiency Platform aaS Stack aaS Infrastructure aaS 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
  10. 10. Cloud Taxonomy Next Gen Web Software aaS Utility/Efficiency Platform aaS Stack aaS Infrastructure aaS 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
  11. 11. Cloud Taxonomy Next Gen Web Software aaS Utility/Efficiency Platform aaS Stack aaS StorageInfrastructure aaS 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
  12. 12. Cloud Taxonomy Next Gen Web Software aaS Utility/Efficiency Platform aaS Stack aaS Storage Compute aaS Infrastructure 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
  13. 13. Cloud Taxonomy Next Gen Web Software aaS Utility/Efficiency Platform aaS Virtual Machine Images Stack aaS Storage Compute aaS Infrastructure 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
  14. 14. Cloud Taxonomy Next Gen Web Software aaS Utility/Efficiency AppEngine Platform aaS Virtual Machine Images Stack aaS Storage Compute aaS Infrastructure 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
  15. 15. Cloud Taxonomy Next Gen Web Software aaS Utility/Efficiency AppEngine Heroku Platform aaS Virtual Machine Images Stack aaS Storage Compute aaS Infrastructure 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
  16. 16. Cloud Taxonomy Next Gen Web Software aaS Utility/Efficiency AppEngine Heroku Zembly Platform aaS Virtual Machine Images Stack aaS Storage Compute aaS Infrastructure 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
  17. 17. Cloud Taxonomy Next Gen Web Salesforce Software aaS Utility/Efficiency AppEngine Heroku Zembly Platform aaS Virtual Machine Images Stack aaS Storage Compute aaS Infrastructure 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
  18. 18. IaaS Issues No predefined software stack You have to do everything Languages cannot help much 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 5
  19. 19. Stack aaS Issues You get whatever language is in the stack Depends on the quality of the stack integration Languages can help; part of the stack integration Services are not explicitly part of the stack 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 6
  20. 20. PaaS in Depth 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 7
  21. 21. PaaS in Depth Non Relational DB 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 7
  22. 22. PaaS in Depth Non Relational DB BigTable 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 7
  23. 23. PaaS in Depth Non Relational DB BigTable Key/Value Stores 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 7
  24. 24. PaaS in Depth Non Relational DB BigTable Key/Value Stores CouchDB 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 7
  25. 25. PaaS in Depth Identity Non Relational DB BigTable Key/Value Stores CouchDB 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 7
  26. 26. PaaS in Depth MapReduce Identity Non Relational DB BigTable Key/Value Stores CouchDB 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 7
  27. 27. PaaS in Depth Asynchronous Messaging MapReduce Identity Non Relational DB BigTable Key/Value Stores CouchDB 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 7
  28. 28. PaaS in Depth Asynchronous Messaging MapReduce Identity XMPP Non Relational DB BigTable Key/Value Stores CouchDB 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 7
  29. 29. PaaS in Depth Asynchronous Messaging MapReduce Identity XMPP Queuing Non Relational DB BigTable Key/Value Stores CouchDB 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 7
  30. 30. PaaS in Depth Asynchronous Messaging MapReduce Identity XMPP Queuing Non Relational DB Payments BigTable Key/Value Stores CouchDB 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 7
  31. 31. PaaS Issues You get whatever language is in the platform Platform includes network services beyond language runtime Leads to a service oriented system Part of the difference is the quality of the integration 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 8
  32. 32. SaaS Issues SaaS applications may or may not be programmable The SaaS may have its own language Learning curve ahead Very good integration 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 9
  33. 33. Characteristics of Cloud Environments Multitenant Heterogeneous Scalability is a goal Elastic / Provisioned by machine Monitored/Audited Service Oriented 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 10
  34. 34. Agenda Cloud Taxonomy Where langauges intersect the cloud Security Performance Concurrency Distribution Operational Considerations Domain Specific Languages 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 11
  35. 35. Areas where languages intersect the Cloud Security / Resource Control Performance Concurrency Distribution Operational Considerations Domain Specific Languages 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 12
  36. 36. Agenda Cloud Taxonomy Where languages intersect the cloud Security Performance Concurrency Distribution Operational Considerations Domain Specific Languages 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 13
  37. 37. Requirements Multitenancy Auditability Resource Control Service security 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 14
  38. 38. Language Models Sandboxing • Java • PyPy • Google AppEngine Capabilities • Caja • Joe-E • E 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 15
  39. 39. Agenda Cloud Taxonomy Where languages intersect the cloud Security Performance Concurrency Distribution Operational Considerations Domain Specific Languages 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 16
  40. 40. Data center sizes • Google in 100,000’s • Facebook Hadoop in the 100’s (600 last count) Performance = reduction in the number of servers • Unladen Swallow Web site response times • interactive / rich applications • real time quotas • pushed back into the server tiers Yeah, and multicore 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 17
  41. 41. Agenda Cloud Taxonomy Where languages intersect the cloud Security Performance Concurrency Distribution Operational Considerations Domain Specific Languages 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 18
  42. 42. Transactional Memory Treat main memory as a database An MVCC database 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 19
  43. 43. Transactional Memory Pros People understand transactions Transactions compose 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 20
  44. 44. Transactional Memory Cons Inefficient Non abortable operations • I/O • Launch missile Still have to find critical sections / txn boundaries 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 21
  45. 45. !quot;#$%&'(%)*quot;+quot;,-./* 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 22
  46. 46. Actors 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 23
  47. 47. 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 24
  48. 48. 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 25
  49. 49. Futures A=Future(function, arg1, arg2 ...) 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 26
  50. 50. MapReduce 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 27
  51. 51. 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 28
  52. 52. Persistent Data Structures 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 29
  53. 53. Tuple Spaces 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 30
  54. 54. 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 31
  55. 55. Projects Transactional Memory • Haskell • Clojure Actors • Erlang • Scala • Axum/F# • Libraries galore Futures • Libraries (Java, Python, Ruby, etc) MapReduce • Libraries (Hadoop, Disco) Persistent Data Structures • Clojure 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 32
  56. 56. Projects Tuple spaces • Jini / Javaspaces • Gigaspaces • Blitz • Tspaces • Libraries galore 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 33
  57. 57. Agenda Cloud Taxonomy Where languages intersect the cloud Security Performance Concurrency Distribution Operational Considerations Domain Specific Languages 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 34
  58. 58. Runtime dynamic scalability • Lots of configuration needed = bad Erlang • distribution via message sending built in • error handling by crash and restart • OTP = rich framework for distributed applications 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 35
  59. 59. Agenda Cloud Taxonomy Where languages intersect the cloud Security Performance Concurrency Distribution Operational Consideration Domain Specific Languages 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 36
  60. 60. Monitoring Mainly a job for the language runtimes DTrace or other tracing 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 37
  61. 61. libc.so.1`_write+0x15 libc.so.1`_fflush_u+0x36 libc.so.1`fflush+0x43 libpython2.4.so.1.0`file_flush+0x2a libpython2.4.so.1.0`call_function+0x32a libpython2.4.so.1.0`PyEval_EvalFrame+0xbdf [ build/proto/lib/python/mercurial/transaction.py:49 (add) ] libpython2.4.so.1.0`PyEval_EvalCodeEx+0x732 libpython2.4.so.1.0`fast_function+0x112 libpython2.4.so.1.0`call_function+0xda libpython2.4.so.1.0`PyEval_EvalFrame+0xbdf [ build/proto/lib/python/mercurial/revlog.py:1137 (addgroup) ] libpython2.4.so.1.0`PyEval_EvalCodeEx+0x732 libpython2.4.so.1.0`fast_function+0x112 libpython2.4.so.1.0`call_function+0xda libpython2.4.so.1.0`PyEval_EvalFrame+0xbdf [ build/proto/lib/python/mercurial/localrepo.py:1849 (addchangegroup) ] libpython2.4.so.1.0`PyEval_EvalCodeEx+0x732 libpython2.4.so.1.0`fast_function+0x112 libpython2.4.so.1.0`call_function+0xda libpython2.4.so.1.0`PyEval_EvalFrame+0xbdf [ build/proto/lib/python/mercurial/localrepo.py:1345 (pull) ] libpython2.4.so.1.0`PyEval_EvalCodeEx+0x732 libpython2.4.so.1.0`fast_function+0x112 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 38
  62. 62. Agenda Cloud Taxonomy Where languages intersect the cloud Security Performance Concurrency Distribution Operational Considerations Domain Specific Languages 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 39
  63. 63. Salesforce.com Apex Multi-tenant code and data Higher level • the business logic level Statically typed Java like control structures 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 40
  64. 64. Apex Persistent object type (SObject) Embedded Salesforce query languages (2 of them) • comprehension like Transaction Control / Locking Triggers as a construct • before/after insert/update/delete/undelete 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 41
  65. 65. Apex Testing built in and coverage required by the platform SOA WSDL Generation 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 42
  66. 66. Apex Security Classes declared as with sharing or without sharing to enforce (or not) the current user’s sharing rules Sharing rules specified by organizations cloud admin Resource limiting (governing) • resources are limited in the runtime • can call a method to find out the values • different for different contexts 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 43
  67. 67. Apex: Concurrency No threads Futures 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 44
  68. 68. APEX: Tools Eclipse Plugin TextBox in Salesforce UI 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 45
  69. 69. Summary Many different cloud models Depending on the model, languages can help the cloud Primary contribution areas • Security • Performance • Concurrency • Distribution • Operational Considerations • Domain specific languages 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 46
  70. 70. For More Information Sun Cloud Home • http://sun.com/cloud My blog • http://www.sauria.com/blog My Twitter • @twleung 2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 47
  71. 71. Programming Languages for the Cloud S304101 Ted Leung ted.leung@sun.com @twleung

×