how to contribute to serverless apache openwhisk opensource101 ncsu
TRANSCRIPT
@csantanapr
Apache OpenWhiskHow to contribute to Apache OpenWhiskOpenSource101 February 4th 2017
Carlos Santana, Senior Software Architect | @csantanapr
@csantanaprCarlos Santana
• IBM Cloud - Senior Software Engineer• Apache Committer (Cordova & OpenWhisk)• UPRM: BS, Electrical & Computer Engineering• NCSU: Masters, Computer Science
2
@csantanaprApache (apache.org)
• The Apache Software Foundation (ASF)• Non-profit 501(c)(3) corporation (1999)• Provide a foundation for open, collaborative
software development projects • Create an independent legal entity to which
companies and individuals can donate resources and be assured that those resources will be used for the public benefit
• Provide a means for individual volunteers to be sheltered from legal suits directed at the Foundation's projects;
3
@csantanaprOpenWhisk in a nutshell
„Event-action platform to execute code in response to events“
@csantanaprServers
Swift
Application
Container VMCF
2
Polling
1b
Request
1a
• Traditional model– Always up and listening– Continuous polling due to missing event
programming model– Charged even when idling– No auto-scaling
Process & idle
@csantanaprOpenWhisk is Serverless
• OpenWhisk– Introduces event programming model– Charges only for what is used– Auto-scales
Deploy action within millisecs,run it, free up resources
Trigger
1
Running action
Running action
Running action
3
OpenWhisk Engine
2 Pool of actions
Swift DockerJSJava Python
@csantanaprOpenWhisk programming model concepts
7
RuleTrigger
RuleAction
Package
@csantanapr
A Action: a stateless function (event handler)
@csantanaprAction: javascriptA
function main(params) {console.log(“Hello “ + params.name);return { msg: “Goodbye “ + params.name) };
}
@csantanapr
func main (params:[String:Any]) -> [String:Any] {var reply = [String:Any] ()if let name = params[“name”] as? String {
print(“Hello \(name)”)reply[“msg”] = “Goodbye \(name)”
}return reply
}
Action: SwiftA
@csantanaprAction: arbitrary binary in docker containerA
a.out whisk/blackbox
Dockerfile0100100101101
0100100101101
@csantanaprAction: sequenceA
:=
@csantanapr
T A
event event handler
R Rule: a mapping from a Trigger to an Action
Rule
@csantanapr
Quick Demo
@csantanapr
15https://www.raymondcamden.com/2017/02/02/working-with-openwhisk-triggers
rule
Event FunFunction
@csantanaprRoles
• User• Developer• Committer• Project Management Committee (PMC) Member
• http://www.apache.org/foundation/how-it-works.html#roles
16
@csantanaprUsers
• A user is someone that uses our software. They contribute to the Apache projects by providing feedback to developers in the form of bug reports and feature suggestions. Users participate in the Apache community by helping other users on mailing lists and user support forums.
17
@csantanaprBug Report
18
@csantanaprQuestions & Answers
19http://stackoverflow.com/questions/tagged/openwhisk
@csantanaprChat
20Invite: http://slack.openwhisk.org Login: https://openwhisk-team.openwhisk.org
@csantanaprDiscuss
21Subscribe: [email protected] Email: [email protected]
@csantanaprDevelopers
• A developer is a user who contributes to a project in the form of code or documentation. They take extra steps to participate in a project, are active on the developer mailing list, participate in discussions, provide patches, documentation, suggestions, and criticism. Developers are also known as contributors .
22
@csantanaprPull Request: Quick Doc Update
23
@csantanaprPull Request: Open
24
@csantanaprPull Request: Propose change
25
@csantanaprCommitters
• A committer is a developer that was given write access to the code repository and has a signed Contributor License Agreement (CLA) on file. They have an apache.org mail address. Not needing to depend on other people for the patches, they are actually making short-term decisions for the project. The PMC can (even tacitly) agree and approve it into permanency, or they can reject it. Remember that the PMC makes the decisions, not the individual committers.
26
@csantanaprPull Request: Triage by Committer
27
@csantanaprPull Request: Review & Merged
28
@csantanaprProject repositories
29
@csantanaprRepo Fork
30
@csantanaprGit Guidelines (Origin vs. Upstream)
31
@csantanaprPR: WIP & CI
32
@csantanaprPMC Member
• A PMC member is a developer or a committer that was elected due to merit for the evolution of the project and demonstration of commitment. They have write access to the code repository, an apache.org mail address, the right to vote for the community-related decisions and the right to propose an active user for committership. The PMC as a whole is the entity that controls the project, nobody else. In particular, the PMC must vote on any formal release of their project's software products.
33
@csantanapr
Thank You
@csantanaprOpenWhisk in a nutshell
• OpenWhisk…– allows you to focus on developing value-adding code– provides you with a flexible programming model for small agile teams– provides you with access to an open ecosystem of building blocks– allows you to compose powerful solutions using modern abstraction
and chaining– allows you to share and reuse what you have build– allows you to outsource load & calculation intensive tasks– only charges you for what you really use– is available as open solution in which you can participate
@csantanaprOpenWhisk in a nutshell
Serverless deployment & operations modelWe hide infrastructural and operational complexity allowing you to focus on coding: You provide code – we execute it!
Optimal utilization, fair pricing at any scaleWe provide you exactly with the resources you need – neither less nor more - and charge you only for code really being executed
Flexible programming model & powerful toolingWe support multiple languages (incl. Swift) and even the execution of custom logic via docker containers plus tools to declaratively chain your code snippets
Open & open ecosystemOpen to run anywhere to avoid any kind of vendor lock-in and to accelerate the development of a powerful ecosystem
@csantanaprSome usage scenariosBatch-Processing Multimedia Files like Images and Videos (using Box*, with Image Recognition or other Cognitive Services)
Reacting on Activities tied to Physical Locations (using Presence Insights, Push, Cognitive Services)
Reacting on Data (Streams) Received from the Internet of Things(using IoT Services, Cloudant & Spark)
Reacting on Keywords and Trends Detected by (Stream) Analysis (using Streaming Analytics & Insights for Twitter)
Reacting on Voice Commands(using Watson Speech-to-text)
Reacting on Monitored Data to Auto-Provision More Compute/Storage(using Monitoring. like Maximo)