Lifthub (rpscala #31)

1,201 views
1,170 views

Published on

Lifthub is a platform as a service for Lift based apps. It's in closed beta now. This presentation explains about the service and the technologies used.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,201
On SlideShare
0
From Embeds
0
Number of Embeds
153
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Lifthub (rpscala #31)

  1. 1. Lifthub #2 Lift Platform as a Service <ul><li>Kazuo KASHIMA </li></ul><ul><ul><li>@k4200 (English) </li></ul></ul><ul><ul><li>@kaigaiengineer (Japanese) </li></ul></ul><ul><ul><li>d.hatena.ne.jp/k4200 </li></ul></ul>
  2. 2. Table of Contents <ul><li>Introduction </li></ul><ul><li>Demo </li></ul><ul><li>Architecture </li></ul><ul><li>Program </li></ul><ul><li>Future </li></ul>
  3. 3. INTRODUCTION
  4. 4. What is Lifthub? (rpscala 26) <ul><li>In short, Lift version of Heroku. </li></ul><ul><ul><li>http:// heroku.com / </li></ul></ul><ul><li>Users can host Lift based apps. </li></ul><ul><ul><li>No complicated settings </li></ul></ul><ul><ul><li>Access via web and git </li></ul></ul><ul><li>Experimental project, at this moment. </li></ul><ul><li>http:// www.lifthub.net / </li></ul>
  5. 5. What is Lift? <ul><li>“ The most powerful, most secure web framework” </li></ul><ul><li>Has lots of cutting edge features. </li></ul><ul><ul><li>Seamless Ajax support </li></ul></ul><ul><ul><li>“ Designer friendly templates” (CSS selectors) </li></ul></ul><ul><ul><li>Security implemented by default (and behind the scene) </li></ul></ul><ul><li>Next Rails? </li></ul>
  6. 6. How to use Lifthub? <ul><li>Sign up and register your SSH public key. </li></ul><ul><li>Create a project. </li></ul><ul><ul><li>Choose a template (NEW) </li></ul></ul><ul><ul><li>Choose a database (Currently, only MySQL) </li></ul></ul><ul><li>Development </li></ul><ul><ul><li>git pull </li></ul></ul><ul><ul><li>git push </li></ul></ul><ul><li>Deploy the app using the UI. </li></ul><ul><li>Run & have fun! </li></ul>
  7. 7. DEMO
  8. 8. ARCHITECTURE
  9. 9. Old (rpscala 26) nginx MySQL Server Manager : : User applications Management application jetty Lifthub Port 80 Port 9000 Port 9001 Port 9xxx Port 8080 deploy start/stop requests create jetty a.war jetty b.war jetty x.war
  10. 10. New MySQL nginx MySQL Server Manager : User apps Management app Port 80 127.0.m.n deploy create/start/stop requests FreeBSD jail Process : GitRepo Manager 127.0.x.y Gitorious (ngix+passenger) create jetty a.war jetty x.war jetty Lifthub Scala Remote actor
  11. 11. Environment <ul><li>User applications </li></ul><ul><ul><li>Lift 2.2 and 2.3 based templates </li></ul></ul><ul><ul><li>Jetty 6 (7 will be supported soon.) </li></ul></ul><ul><ul><li>FreeBSD jail (FreeBSD 8.2) </li></ul></ul><ul><ul><li>Amazon EC2 </li></ul></ul><ul><li>Management application </li></ul><ul><ul><li>Lift 2.2 </li></ul></ul><ul><ul><li>Jetty 6 </li></ul></ul><ul><ul><li>Ubuntu 10.04.2 LTS </li></ul></ul><ul><ul><li>Sakura VPS </li></ul></ul>
  12. 12. Reverse proxy <ul><li>Each user app </li></ul><ul><ul><li>Runs in a jail (isolated environment). </li></ul></ul><ul><ul><li>Has a local IP address (127.0.x.y). </li></ul></ul><ul><li>*.lifthub.net -> 111.171.209.16 </li></ul><ul><li>Nginx works as a reverse proxy. </li></ul><ul><ul><li>http://appfoo.lifthub.net/ -> 127.0.m.n:8080 </li></ul></ul><ul><ul><li>http://appbar.lifthub.net/ -> 127.0.x.y:8080 </li></ul></ul>
  13. 13. Development cycle Lifthub Gitorious jetty MySQL ssh key Create user & Register ssh key Register Create project git pull Create Create git push Build & deploy a.war sbt package etc. proj-a proj-a proj-a sbt
  14. 14. PROGRAM
  15. 15. Components <ul><li>Web UI </li></ul><ul><ul><li>Lift native features </li></ul></ul><ul><ul><ul><li>MegaProtoUser </li></ul></ul></ul><ul><ul><ul><li>CRUDify </li></ul></ul></ul><ul><ul><ul><li>CSS Selectors </li></ul></ul></ul><ul><ul><li>External library </li></ul></ul><ul><ul><ul><li>JGit </li></ul></ul></ul><ul><ul><ul><li>Akka </li></ul></ul></ul><ul><li>Server Manager (Akka Remote Actor) </li></ul><ul><ul><li>Calls “sbt” command </li></ul></ul>
  16. 16. Components (cont’d) <ul><li>GitRepoManager (Akka Remote Actor) </li></ul><ul><ul><li>Calls ruby scripts to access Gitorious </li></ul></ul><ul><ul><li>https://github.com/k4200/gitorious-script </li></ul></ul>
  17. 17. Other programs and libraries <ul><li>Gitorious </li></ul><ul><ul><li>Github clone (?) </li></ul></ul><ul><ul><li>More features than gitosis. </li></ul></ul><ul><ul><li>Setup isn’t easy. </li></ul></ul><ul><ul><li>http://gitorious.org/gitorious </li></ul></ul><ul><li>JGit </li></ul><ul><ul><li>Java implementation of git </li></ul></ul><ul><ul><li>http://www.jgit.org/ </li></ul></ul><ul><li>Commons Exec </li></ul><ul><ul><li>http:// commons.apache.org /exec/ </li></ul></ul>
  18. 18. Tips <ul><li>sbt sub projects (rpscala 26) </li></ul><ul><ul><li>http://d.hatena.ne.jp/k4200/20110211/1297416108 </li></ul></ul><ul><li>Akka Remote Actors (coming soon?) </li></ul><ul><li>JGit </li></ul><ul><ul><li>http://d.hatena.ne.jp/k4200/20110304/1299244614 </li></ul></ul><ul><ul><li>http://d.hatena.ne.jp/k4200/20110321/1300691773 </li></ul></ul>
  19. 19. FUTURE
  20. 20. Schedule Date Plan ~ Apr Development (alpha) 2~3 users May Closed beta ~ 20 users June Beta ~ 100 users July Release
  21. 21. TODO <ul><li>Create more templates </li></ul><ul><ul><li>Different scenarios </li></ul></ul><ul><ul><li>Different components </li></ul></ul><ul><li>More components </li></ul><ul><ul><li>PostgreSQL </li></ul></ul><ul><ul><li>KVS </li></ul></ul><ul><ul><li>Document DBs </li></ul></ul><ul><ul><li>Media servers etc. </li></ul></ul>
  22. 22. TODO (cont’d) <ul><li>Resource management </li></ul><ul><ul><li>Memory (-Xmx) </li></ul></ul><ul><ul><li>Disk (quota ?) </li></ul></ul><ul><ul><li>CPU </li></ul></ul><ul><ul><ul><li>Best effort for non-paid users </li></ul></ul></ul><ul><ul><ul><li>Allocate separate EC2 instances to paid users? </li></ul></ul></ul><ul><li>Nice UI! </li></ul><ul><li>Documents and tutorials </li></ul>
  23. 23. Help needed! <ul><li>Testers </li></ul><ul><li>Developers </li></ul><ul><ul><li>Anyone interested in Scala and/or Lift </li></ul></ul><ul><li>Designer </li></ul>

×