Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Rejectkaigi 2010

2,879 views

Published on

  • DubiousはRailsぽく書けるWebフレームワークって、すげ〜!
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Rejectkaigi 2010

  1. 1. Sunday, August 29, 2010
  2. 2. Mirah/Dubious John Woodell Takeru Sasaki RejectKaigi 2010 2 Sunday, August 29, 2010
  3. 3. Thank you for using "AppEngine/JRuby” "AppEngine/JRuby" 3 Sunday, August 29, 2010
  4. 4. Spin-up? Yes, this is a problem... 4 Sunday, August 29, 2010
  5. 5. ...but now you can use Mirah and Dubious "Mirah/Dubious" 5 Sunday, August 29, 2010
  6. 6. Mirah is a staticly typed language, that uses type-inference Mirah Ruby JVM 6 Sunday, August 29, 2010
  7. 7. Now, how does it work? (minus a few boring details) 7 Sunday, August 29, 2010
  8. 8. First, JRuby’s Parcer creates AST JRuby AST mirahp -e "puts 'RubyKaigi'+(167*12+6)" Script Body Call(println) Call(out) Constant(System) Call(+) String("RubyKaigi") Call(+) Call(*) Fixnum(167) Fixnum(12) Fixnum(6) 8 Sunday, August 29, 2010
  9. 9. Then, the AST becomes JVM bytecode AST bytecode mirah -e "puts 'RubyKaigi'+(167*12+6)"; javap -c DashE RubyKaigi2010 Compiled from DashE public class DashE extends java.lang.Object{ public static void main(java.lang.String[]); Code: 0: getstatic #12; //Field java/lang/System.out:Ljava/io/PrintStream; 3: ldc #14; //String RubyKaigi 5: sipush 167 8: bipush 12 10: imul 11: bipush 6 13: iadd 14: invokestatic #20; //Method java/lang/String.valueOf:(I)Ljava/lang/ String; 17: invokevirtual #24; //Method java/lang/String.concat:(Ljava/lang/ String;)Ljava/lang/String; 20: invokevirtual #30; //Method java/io/PrintStream.println:(Ljava/lang/ String;)V 23: return public DashE(); Code: 0: aload_0 1: invokespecial #36; //Method java/lang/Object."<init>":()V 4: return 9 } Sunday, August 29, 2010
  10. 10. "Pure JVM bytecode" We don't need a Runtime. This is very, very fast! bytecode JRuby Runtime 10 Sunday, August 29, 2010
  11. 11. Dubious is Web framework for Mirah Dubious Mirah Web *du bi ous[ djbis | dj- ] [ ] [1] (( )) … ((of, about, as to ...)). [2] > 11 Sunday, August 29, 2010
  12. 12. Write Rails-style code, it runs on Google App Engine GoogleAppEngine Rails 12 Sunday, August 29, 2010
  13. 13. Here’s code from Dubious, this is not Rails! Rails Dubious 13 Sunday, August 29, 2010
  14. 14. Dubious controllers will be familiar Sunday, August 29, 2010
  15. 15. Mirah can use ERb templates Sunday, August 29, 2010
  16. 16. The models are simple (no schema) Sunday, August 29, 2010
  17. 17. It really works, and spins-up in ~1sec Spinup. 17 Sunday, August 29, 2010
  18. 18. It isn’t "Dubious" Thank you! http://mirah.org http://dubious-demo.appspot.com @johnwoodell & @urekat 18 Sunday, August 29, 2010
  19. 19. Sunday, August 29, 2010

×