school of haskellgbaz.github.io/slides/fpcompletetalk.pdf · soh design web based client ... ##...
TRANSCRIPT
![Page 1: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/1.jpg)
School of Haskell
Haskell Development CenterGregg Lebovitz
Director, Client Projects
FP Complete
![Page 2: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/2.jpg)
Agenda
● Explain Design Goals● Tell the story behind School of Haskell● Demonstrate current implementation● Give overview of School architecture● Discuss the service architecture● Present our Next Steps● Provide some target milestones
Copyright @2013 FP Complete3/26/2013
![Page 3: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/3.jpg)
Background
● FP Complete launched March 2012● Goal: Create a commercial Haskell platform● Current plan:
● SaaS develop and deploy in the cloud● Option to deploy on private cloud or VM● Near future: develop on private cloud or VM● Further out: configuration, monitoring, exception
tracing, interoperability, distributed applications.
Copyright @2013 FP Complete
![Page 4: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/4.jpg)
FP Complete Team
● Aaron Contorer – Founder and CEO● Bartosz Milewsky – Chief Architect● Michael Snoyman – Engineering Lead● Gregg Lebovitz – Product Management, Sales
Copyright @2013 FP Complete
![Page 5: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/5.jpg)
Haskell Development Center
Four Ingredients
● Learn● Develop● Build● Deploy
Copyright @2013 FP Complete
![Page 6: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/6.jpg)
Original Ideas
● Free Education IDE for Interactive Learning● Commercial IDE
● Cloud Deployment● Deployment on a Private VM or Private Cloud● Private VM version of the IDE● Desktop version of the IDE
● Enhanced Deployment Options● Application Services
Copyright @2013 FP Complete
![Page 7: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/7.jpg)
Current Roadmap
● School of Haskell● Haskell Development Center● Haskell Application Server● Distributed Haskell (Cloud Haskell?)
Copyright @2013 FP Complete
![Page 8: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/8.jpg)
The School of Haskell Story
● We wanted an early version of Education IDE● Interactive learning center● Lighter version of the IDE● Tools to create content● Tutorials embedded with editor with build and run
● The back end infrastructure was in place● Efficient and secure deployment system● Secure Content storage● Back up in GitHub
Copyright @2013 FP Complete
![Page 9: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/9.jpg)
School of Haskell Goals
● Interactive on-line service● Active code examples and exercises● Free Accounts● Support lots of users● Low service cost per user● Community contributed content● Easily leverage existing content
Copyright @2013 FP Complete3/26/2013
![Page 10: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/10.jpg)
School of Haskell Features
● User publishable content● Support of standards (GitHub Markdown)● Extensions for embedding active code
● Focus on relevant code sections● Feature to hide sections of irrelevant code● Option to Show all code sections● Active code editor● Button to build and run
● Publisher toolkit for creating Markdown content
Copyright @2013 FP Complete
![Page 11: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/11.jpg)
SoH Architecture
● Browser based client● Web based server (front end)● Isolated code execution containers (back end)● Standard cloud services (services)
Copyright @2013 FP Complete
![Page 12: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/12.jpg)
SoH Design
● Web based client / editor ● Written in Javascript using codemirror● Implements user code editor
● Tutorials in Markdown● Render content as HTML● Overlay codemirror on code snippets
● Controls to● Show hidden code sections● Build and run code
Copyright @2013 FP Complete
![Page 13: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/13.jpg)
Soh Front end services
● Code sent to front end for build and run● Two way communication with application
● Create “output window”● Send standard output to browser for display● Capture use input and send to application
● For Web tutorials● Launch an instance of web server● Code snippets served by web server● Frame for opening web server at a give URL
Copyright @2013 FP Complete
![Page 14: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/14.jpg)
Markdown Extensions
● Active Code```active Haskell Code ```
● Showing Code SnippetsMark visible code with “--show”
```active Haskell Code-- showHaskell Code Segment-- showHaskell Code ```
Copyright @2013 FP Complete3/26/2013
![Page 15: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/15.jpg)
Example Console App
## Console Application
Below is an example of a simple console application
``` active haskellmain = do putStrLn "Enter your name:" name <- getLine putStrLn $ "Hello, " ++ name ++ ", how are you?"```
3/26/2013 Copyright @2013 FP Complete
![Page 16: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/16.jpg)
Console App
3/26/2013 Copyright @2013 FP Complete
![Page 17: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/17.jpg)
Example Web App## Sample Yesod App
This app creates a yesod server and pages.
``` active haskell web{-# LANGUAGE TypeFamilies, QuasiQuotes, MultiParamTypeClasses, TemplateHaskell, OverloadedStrings #-}import Yesod
data MySite = MySiteinstance Yesod MySite
mkYesod "MySite" [parseRoutes| / HomeR GET /about AboutR GET|]
getHomeR = defaultLayout $ do [whamlet| Welcome to my web site! <br> <a href=@{AboutR}>About Me. |] toWidget [cassius| body background-color: #048 color: white a color: yellow |]getAboutR = defaultLayout [whamlet| Enough about me! <br> <a href=@{HomeR}>Back Home. |]main = warpEnv MySite```
3/26/2013 Copyright @2013 FP Complete
![Page 18: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/18.jpg)
Showing Code Snippets``` active haskell web{-# LANGUAGE TypeFamilies, QuasiQuotes, MultiParamTypeClasses, TemplateHaskell, OverloadedStrings #-}import Yesod
-- showdata MySite = MySiteinstance Yesod MySite
mkYesod "MySite" [parseRoutes| / HomeR GET /about AboutR GET|]
getHomeR = defaultLayout $ do [whamlet| Welcome to my web site! <br> <a href=@{AboutR}>About Me. |] toWidget [cassius| body background-color: #048 color: white a color: yellow |]getAboutR = defaultLayout [whamlet| Enough about me! <br> <a href=@{HomeR}>Back Home. |]main = warpEnv MySite-- show```
3/26/2013 Copyright @2013 FP Complete
![Page 19: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/19.jpg)
Example Snippet
3/26/2013 Copyright @2013 FP Complete
![Page 20: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/20.jpg)
Web App Output
3/26/2013 Copyright @2013 FP Complete
![Page 21: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/21.jpg)
Web Front End Design
● Written in Yesod● Whamlet, HTML, and Markdown for Web Pages● Engine for rendering Markdown● Cassius and CSS for Style Sheets● Fay for JavaScript (markdown can contain JS)
● Front end communicates via REST / JSON / AJAX
● All site static pages written in Markdown● Markdown pages can contain HTML
Copyright @2013 FP Complete
![Page 22: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/22.jpg)
Front End Functions
1. Serve Static Web Pages2. Create Dynamic Pages (e.g. tutorial list)3. Process Web Client Requests4. Brokers back end services5. Renders output from user applications
Copyright @2013 FP Complete
![Page 23: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/23.jpg)
Infrastructure
● Isolation services (back end)● Creates and populates isolated runtimes● Serves requests for compile and execution
● Web servers (front end)● Manages virtual hosts and routes HTTP requests● Runs School of Haskell and user web services
● Cloud services (service infrastructure)● Storage (databases, and files)● Email and Messaging● Repository (GitHub, private git repos)● Logging and event management
Copyright @2013 FP Complete
![Page 24: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/24.jpg)
Isolation Manager
● Manages isolation containers● Creates and populates containers● Launches build and execute processes● Sends stdout to front end service
● Isolation container options● LXC on a shared EC2 Instance● A private EC2 Instance● Created and destroyed on demand● Managed by the elastic load balancer
Copyright @2013 FP Complete
![Page 25: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/25.jpg)
Front End Services
● Used for deploying services● A collection of EC2 web instances● Provides request routing● Each web service assigned a host / port● Virtual host manager responsible for routing● Instances managed by front end EC2 balancer● Instances communicate with cloud services
Copyright @2013 FP Complete
![Page 26: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/26.jpg)
Cloud Services
● Can be any web based service● SoH uses
● S3, ● GitHub and git● Postgres (Heroku)● SimpleDB● SES● Loggly
Copyright @2013 FP Complete
![Page 27: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/27.jpg)
Add More Services
We will add more services based on
● Haskell Development Center requirements● Individual requirements● Customer demand for services
Copyright @2013 FP Complete
![Page 28: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/28.jpg)
Next Steps
● Haskell Cloud Development Center● Code Snipped based intelligent editor● Guided development● Integrated help and learning● Build, test, and deploy● Repository integration● Vetted libraries from Stackage● Scalability● Cabal import and export
Copyright @2013 FP Complete
![Page 29: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/29.jpg)
Next Steps
● Haskell Private Development Center● Same features as Cloud service● Deploy on public cloud or private VM● Available as a VM behind the firewall● Service is self managed● Updates from FP Complete
Copyright @2013 FP Complete3/26/2013
![Page 30: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/30.jpg)
Next Steps
● Application services● Configuration and deployment management● Health monitoring and profiling● Alert and event management● Runtime Analytics and Metrics● Control Management● Exception processing● Event and log consolidation
Copyright @2013 FP Complete
![Page 31: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/31.jpg)
Next Steps
● Interoperability● JVM● CLR● Improved C++● Java Application server support (e.g. Jboss)● Excel??
Copyright @2013 FP Complete
![Page 32: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/32.jpg)
Next Steps
● Distributed Services● Cloud Haskell??● Distributed service management● Value Add distributed service Libraries● Failover and redundancy
Copyright @2013 FP Complete
![Page 33: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/33.jpg)
Current Plans
● Alpha in April● Public beta by mid year● Some application services by end of year● Some JVM support by end of year
Copyright @2013 FP Complete
![Page 34: School of Haskellgbaz.github.io/slides/FPCompleteTalk.pdf · SoH Design Web based client ... ## Sample Yesod App This app creates a yesod server and pages. ``` active haskell web](https://reader034.vdocument.in/reader034/viewer/2022050404/5f82059371988100556c9349/html5/thumbnails/34.jpg)
That’s itThank you for your time!!
3/26/2013 Copyright @2013 FP Complete