17
Scala on Google App Engine Eishay Smith KaChing

A First Look At Scala On Google App Engine

Embed Size (px)

DESCRIPTION

A First Look At Scala On Google App Engine

Citation preview

Page 1: A First Look At Scala On Google App Engine

Scala on Google App Engine

Eishay SmithKaChing

Page 2: A First Look At Scala On Google App Engine

Who Am I

kaChing - Rocking the inventing world ! Scala @ LinkedIn Blogging http://www.eishay.comNewspipes

http://github.com/eishay/newspipeskaChing Twitter Bot

http://code.google.com/p/kaching-twitter/ Presented:

            "Absorbing Scala into Java Ecosystem"

Page 3: A First Look At Scala On Google App Engine

Google App Engine

Run your web apps on Google's infrastructure. Easy to build, easy to maintain, easy to scale.  

Now with Java And a host of languages  that run on the JVM

JRuby, Groovy, Scala, Jython, ...

Page 4: A First Look At Scala On Google App Engine

Tooling

EclipseGreat GAE support for Java with GWT and JDOSome problems coming to Scala

AntAll you needLonger development/test cycle

Oher IDEsNetbeansIDEA

Page 5: A First Look At Scala On Google App Engine

Scala and Google Web Toolkit (GWT)

GWT - quickly build and maintain complex & performant JavaScript front-end apps written in Java (NOT Scala)

GWT actually compiles the Java source code A GWT class should not reference any Scala class

Still, GWT is super cool, use it! 

You can still have 99% of the server side in ScalaUse Java only for service interfacesUse Scala for the rest

Page 6: A First Look At Scala On Google App Engine

Use interface

To buffer between Scala and GWT code

Page 7: A First Look At Scala On Google App Engine

Implement using the best language

 

Page 8: A First Look At Scala On Google App Engine

Use From GWT

 

Page 9: A First Look At Scala On Google App Engine

One XML to bind them all

 

Page 10: A First Look At Scala On Google App Engine

Regular HttpServlet

 

Page 11: A First Look At Scala On Google App Engine

With Regular Binding

 

Page 12: A First Look At Scala On Google App Engine

Scala @ JDO: Spelling it out

Similar to the Java JDOUsing the same annotations

Page 13: A First Look At Scala On Google App Engine

Scala @ JDO: ANT

The ORM enhancer works on the class filesBytecode instrumentationDoes not matter if its Java or Scala

Page 14: A First Look At Scala On Google App Engine

Scala @ JDO: Eclipse Support

Not really working since the IDE is looking for Java source files to instrumentThe solution is to use Eclipse Builders Have the ANT JDO builder building after compilationProvide an appengine.sdk path to the jar Eclipse use

Page 15: A First Look At Scala On Google App Engine

More Limitations

Same limitations as in JavaIO librariesThreading

Can't open new threads => Actors in a same thread mode Lift on a single threaded Actor is happy

Page 16: A First Look At Scala On Google App Engine

BuildingScalaScalac knows how to read java code !Needed for circular dependencies.

Page 17: A First Look At Scala On Google App Engine

We Are Hiring !