Programming Languages For The Cloud - Presentation Transcript
Programming Languages for the Cloud
S304101
Ted Leung
Principal Engineer, Sun Microsystems
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
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
Cloud Taxonomy
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
Cloud Taxonomy
Utility/Efficiency
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
Cloud Taxonomy
Next Gen Web
Utility/Efficiency
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
Cloud Taxonomy
Next Gen Web
Utility/Efficiency
Infrastructure aaS
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
Cloud Taxonomy
Next Gen Web
Utility/Efficiency
Stack aaS
Infrastructure aaS
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
Cloud Taxonomy
Next Gen Web
Utility/Efficiency
Platform aaS
Stack aaS
Infrastructure aaS
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 4
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
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
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
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
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
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
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
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
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
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
PaaS in Depth
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 7
PaaS in Depth
Non Relational DB
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 7
PaaS in Depth
Non Relational DB
BigTable
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 7
PaaS in Depth
Non Relational DB
BigTable Key/Value Stores
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 7
PaaS in Depth
Non Relational DB
BigTable Key/Value Stores
CouchDB
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 7
PaaS in Depth
Identity
Non Relational DB
BigTable Key/Value Stores
CouchDB
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 7
PaaS in Depth
MapReduce
Identity
Non Relational DB
BigTable Key/Value Stores
CouchDB
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 7
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
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
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
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
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
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
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
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
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
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
Requirements
Multitenancy
Auditability
Resource Control
Service security
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 14
Language Models
Sandboxing
• Java
• PyPy
• Google AppEngine
Capabilities
• Caja
• Joe-E
• E
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 15
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
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
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
Transactional Memory
Treat main memory as a database
An MVCC database
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 19
Transactional Memory Pros
People understand transactions
Transactions compose
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 20
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
!\"#$%&'(%)*\"+\",-./*
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 22
Actors
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 23
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 24
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 25
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
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
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
Monitoring
Mainly a job for the language runtimes
DTrace or other tracing
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 37
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
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
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
Apex
Testing built in and coverage required by the platform
SOA WSDL Generation
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 42
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
Apex: Concurrency
No threads
Futures
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 44
APEX: Tools
Eclipse Plugin
TextBox in Salesforce UI
2009 CommunityOne Conference: WEST | developers.sun.com/events/communityone 45
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
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
Programming Languages for the Cloud
S304101
Ted Leung
ted.leung@sun.com @twleung
0 comments
Post a comment