bringing haskell to the world
play

Bringing Haskell to the World www.fpcomplete.com Experience Report - PowerPoint PPT Presentation

Bringing Haskell to the World www.fpcomplete.com Experience Report Building Haskell Development and Deployment tools Gregg Lebovitz Director, Product Management FP Complete Company Goals Increase Haskell Adoption Make Haskell More


  1. Bringing Haskell to the World www.fpcomplete.com

  2. Experience Report Building Haskell Development and Deployment tools Gregg Lebovitz Director, Product Management FP Complete

  3. Company Goals • Increase Haskell Adoption • Make Haskell More Accessible • Offer Commercial Grade Tools and Support • Simplify Haskell Deployment • Support the Haskell Community • Leverage what the Community Offers

  4. FP Haskell Center • Web Front End – No Struggle Setup – Access to Help – Easy to Integrate with Haskell • Haskell Back End – Project Management – Provide Developer Feedback – Build System – Cloud Base Execution and Deployment • Cloud allows faster product evoluton

  5. Product Roadmap FP School of FP Haskell Center™ FP Haskell Center™ Non Haskell™ Cloud Cloud Professional Deployment IDE & Academic Personal March Sept. Oct. Dec. Q1 2013 2013 2013 2013 2014

  6. UI • UI Details – Backend Implemented in Yesod – Lots of Library Support (conduits, etc) – UI Uses Javascript (using Fay) – Heavy lifting done in Backend • Very few Issues surfaced

  7. Product Goals • Web Access (initially) • Live Feedback To Developer • Point and Click Build Process • Simple Project Management • Access to Source Repositories • Integrated Help and Documentation

  8. Challenges • Javascript Coding Issues • Stable set of libraries • Compiler Integration (feedback and errors) • Integrating with git • Running in the cloud • Deploying Applications • Billing system integration

  9. Stability Issues • Fay - Javascript – Eliminated most Javascript issues – Allowed us to focus on features not bugs • Create Stackage – Managed by Authors – Packages must be version compatible – Libraries are vetted, and tested – Commercial Support for Customers

  10. Code Analysis • Integrating GHC Via Library – Access to the Abstract SyntaxTree – Report Errors – Map Source Location to AST – Locate where Identifiers are Defined – Get Details about Types and Identifiers – Support Auto-complete • Do the same for HLint

  11. Beyond Errors (Future) • Once You have the Compiler Front End – Do Syntax Analysis – Recommend Code Improvements – Track Code Execution – Implement Debugging – Add Profiling Information – Improve Error Reporting – Understand performance issues

  12. Responsiveness and Stability • Challenges – Do code analysis – Provide Lots of Live User Feedback – But Make the UI “Snappy” • Solution – Separate the Web Front End and – Code Analysis Engines

  13. Separate Processes Front End Server Code Engine Compiler Frontend Code Analysis User GHC API Session Hlint API Code Analysis User GHC API Session Hlint API Code Analysis User GHC API Session Hlint API

  14. Running in the Cloud • Use LXC to create Isolation Containers – Each container is a mini machine – Includes a full runtime environment – Runs required system services – Provides ephemeral storage – Containers can run on shared systems – Share underlying resources to reduce footprint • OS, Libraries, and System Services

  15. Containers Distributed as Needed • Containers on dedicated and shared systems

  16. IDE Uses Isolation Containers • Front End handles requests from IDE • Initiates a User sandbox container • Loads Environment from Persistent Storage – Includes Active files – Project Settings – Previous State Settings • User work is Saved to Persistent Storage (S3)

  17. Managing Projects • Visual Representation of Projects • Projects Stored in Git Repositories • Contains Project Settings/Definition File • Repo Access Through Haskell gitlib-2 – Haskell robustness – Multiple backends • Git C library backend • GitHub C library backend • IDE Local repository stored in S3 • Others?

  18. Building Projects • IDE Code Generated by Backend Process – Uses Active GHC Front End – Generates Bytecode – Runs Bytecode in GHC Frontend Container – Exceptions leave IDE intact • Deployment Build System Uses Cabal APIs – Import existing cabal files – Preprocess CPP Macros – Build executables for deployment – Generate licenses for deployment executables

  19. Deploying Projects • Haskell Has No Standard Way To Deploy Apps • We Constructed A Deployment System – Compile Source to Executables • Haskell Libraries Linked Statically – Create Isolation Container – Install FP Application Server – Launch Instance (dedicated or shared) – Load Executable – Start Configuration Manager – Use Keter and Chef to Keep Things Running

  20. Billing • Billing Processor Provides SOAP APIs – Haskell SOAP Library Not Complete – Processor Supports gsoap • Gsoap generates C++ from WSDL Files – FFI Requires C Bindings – Must generate Isomorphic mappings to C++ data – Fortunately all Gsoap data delivered as strings • Limitations in GHC, Cabal, Linux made hard

  21. Summary • Haskell made development easier – Fewer Errors – Robust Code • Our tools reduced our development effort – Stackage for Compatible Libraries – Integrated Code Analysis Tools – Containers used everywhere for running code – Code, Build and Deploy • Haskell requires more commercial libraries – Billing Engine That Only Talks SOAP

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend