GAE(Google App Engine)의 지원언어로 드디어 자바가 등장했다. 기존에 지원되던 파이썬에 비해서 자바가 가지는 장점은 단지 자바언어에 제한되지 않고 자바플랫폼(JVM)에서 동작하는 다른 언어들도 지원 가능하다는 점이다. 따라서 Ruby(JRuby), Groovy, Scala, Javascript(Rhino) 등으로 만든 애플리케이션도 GAE/J에서 개발 및 배포가 가능하다.

스프링소스에서는 잽싸게 GAE가 Groovy를 지원한다고 홍보하면서 개발방법과 예제를 보여주는 블로그 글을 올렸고, JRuby의 Ola BIni도 JRUBY ON RAILS ON GOOGLE APP ENGINE 라는 글에서 (J)Ruby on Rails 애플리케이션을 GAE에서 사용하는 방법을 설명하고 있다. 백그라운드 자바기술(아마도 하이버네이트?)에 매여있는 Grails가 아직 GAE지원을 못하고 있는 것에 비해서 가벼운 JRuby on Rails는 ActiveRecord를 대신할 간단한 GAE DataStore wrapper를 이용해서 일단 동작하는 것은 가능한가 보다.

GAE/J는 JDK6의 대부분의 기능을 지원(사실은 허용)한다. 가장 궁금했던 구글의 초대형 데이터 서비스를 이용하는 데이타처리 부분은 JDO2와 JPA1을 통해서 지원한다. RDB가 아니니 JDBC는 안될 것이라고 예상하긴 했지만, JDO2의 등장은 조금 의외였다. JDO2가 JPA1보다 좀 더 유연한 데이터저장소를 다룰 수 있기 때문에 아마도 선택한 것이 아닌가 싶은데, 아무튼 제대로 빛도 못보고 JPA에 밀려 퇴출되었던 JDO의 재등장이 매우 흥미롭다. 구글의 데이터 처리 기능과 연동하는 JDO/JPA의 구현 엔진은 DataNucleus라는 오픈소스 JDO/JPA구현을 활용했다고 한다.

아직 earlylook(베타)이니 안정화되고 본격적으로 활용되려면 적지 않은 시간이 필요할 듯 싶다. 구글에는 Joshua Bloch을 비롯한 자바의 탑 클래스 엔지니어들이 대거 포진하고 있으니 뭐 알아서 잘 준비하고 있겠지.

 

일단 스프링 애플리케이션이 동작하는가가 내 최대의 관심사이므로 간단한 샘플을 만들어서 GAE/J에 배포해봤다. GAE/J 플러그인 다운받고 한 5분만에 완성해서 올린 것이니 뭐 샘플이라고 하기도 민망하지만.

GAE/J 프로젝트 템플릿에서 만들어준 서블릿에서 직접 ApplicationContext를 하나 만들어서 빈을 가져와 실행하는 간단한 것이다. Spring3.0 4월 7일자 빌드 라이브러리를 가지고 테스트 해본 결과는 성공.

아래에 있는 것처럼 Hello인터페이스를 구현한 빈을 만들고, 이를 호출해서 결과를 돌려주는 아주 간단한 기능이지만, 그 안에 Spring 3.0의 core, asm, bean, context 모듈이 동작하고 commons-logging과 log4j도 문제없이 처리된다는 것을 확인하기에는 충분했다.

public class HelloImpl implements Hello {
    public String sayHello(String name) {
        return "Hello " + name;
    }
}

http://tobyepril.appspot.com/hello 에서 실행해볼 수 있다.

 

다음주까지 끝내야 하는 프로젝트에 바빠서 더 이상 손을 대보지는 못하겠지만, 여유가 생기면 SpringMVC, Bean Scanning, JPA 등까지 모두 사용해보는 제대로된 GAE/J용 샘플을 만들어볼 생각이다. 스프링이 지원하는 JPA의 로드타임 bytecode enhancer기능이 사용가능한지가 의문인데, 아마도 JVM옵션을 건드려야 하니 안될 것 같다.

하지만 이클립스 3.3, 3.4에서 동작하는 GAE/J 플러그인을 사용하면 빌드를 할 때마다 DataNucleus Enhancer를 동작시켜주니 큰 불편은 없을 듯.

 

GAE/J에 대해서 제일 감탄한 것은 이클립스 플러그인으로 제공하는 개발환경이다. 프로젝트 생성부터, Jetty로 만들어진 테스트용 로컬서버에 배포하는 것, GAE서버에 deploy하는 것까지 모두 이클립스 안에서 간단히 처리 가능하다. 앞으로는 프레임워크건 뭐건, 이클립스에서 동작하는 편리한 툴이 함께 제공되지 않으면 경쟁에서 밀릴 수 밖에 없지 않을까하는.. 이 불안감은 뭔가..

Related posts:

  1. Java와 생산성
  2. Spring과 Google Guice의 협력을 통한 DI 애노테이션 표준화 작업 시작
  3. 편리한 Google Deskbar
  4. Maven 의존관계 수렁에 빠지다
  5. JRuby/JRor + Spring
  6. Ruby와 Ruby On Rails
  7. JRuby의 활용
  8. Spring 상식퀴즈 (1) – DI 태클하기
  9. Spring 3.0 (13) Context 모듈의 선택 라이브러리 분석
  10. 유쾌한 이슈처리 재촉 메일
  11. Inside Spring (5) PropertyPlaceholderConfigurer를 @Bean으로 정의해서는 안되는 이유
  12. Spring 3.0 EL (Spel)을 이용한 AssertThrows 확장 (1)
  13. Spring 3.0 (2) R-518 스프링의 새 모듈 OXM(Object/XML Mapping)
  14. Spring 3.0 (56) @Bean 사용의 주의사항
  15. Spring 3.0 (58) Static Class를 XML없이 빈으로 등록하기

Facebook comments:

to “Google App Engine for Java에서 Spring 3.0 사용하기”

  1. Good info. Lucky me I ran across your site by accident (stumbleupon). I’ve saved it for later.

  2. Origami, are your self property? It would be this sort of a very good good results for the complex global in direction of put into action the Eastern artwork of paper folding into the equipment that are in the direction of be needed in the direction of continue to be inside of lifestyle in just the in the vicinity of upcoming.

  3. There is certainly a lot to find out about this topic. I really like all the points you made.

  4. Good post. I learn something totally new and challenging on websites I stumbleupon every day. It will always be exciting to read through articles from other writers and use something from their web sites.

  5. I really like it when individuals come together and share thoughts. Great blog, continue the good work!

  6. I’m excited to find this web site. I need to to thank you for your time for this particularly wonderful read!! I definitely really liked every little bit of it and I have you book-marked to look at new stuff on your website.

  7. Excellent article! We are linking to this particularly great article on our site. Keep up the good writing.

  8. I would like to thank you for the efforts you’ve put in writing this website. I really hope to see the same high-grade blog posts by you later on as well. In truth, your creative writing abilities has inspired me to get my own blog now ;)

  9. Can I simply just say what a comfort to find someone that really understands what they’re discussing online. You certainly understand how to bring a problem to light and make it important. A lot more people ought to check this out and understand this side of the story. I can’t believe you are not more popular because you most certainly possess the gift.

  10. I loved your article.Really looking forward to read more. Great.

  11. wow, awesome blog article.Thanks Again. Want more.

  12. After exploring a handful of the blog posts on your site, I really like your way of writing a blog. I saved it to my bookmark website list and will be checking back soon. Please check out my website as well and let me know how you feel.

  13. You’ve made some decent points there. I checked on the internet for more info about the issue and found most people will go along with your views on this web site.

  14. I have to thank you for the efforts you have put in penning this site. I am hoping to see the same high-grade blog posts from you in the future as well. In fact, your creative writing abilities has inspired me to get my own blog now ;)

  15. Thanks for the post.Thanks Again. Will read on…

  16. Thanks so much for the blog post.Thanks Again. Much obliged.

  17. I could not refrain from commenting. Very well written.

  18. Greetings! Very useful advice in this particular post! It’s the little changes that produce the biggest changes. Thanks a lot for sharing!

  19. You are so awesome! I don’t suppose I have read through a single thing like this before. So wonderful to discover someone with genuine thoughts on this topic. Really.. thank you for starting this up. This web site is something that’s needed on the web, someone with a bit of originality.

  20. This blog was… how do you say it? Relevant!! Finally I’ve found something which helped me. Thanks!

  21. I truly love your blog.. Great colors & theme. Did you develop this web site yourself? Please reply back as I’m attempting to create my own personal site and want to know where you got this from or just what the theme is named. Cheers!

  22. This is the perfect blog for anybody who wishes to understand this topic. You understand a whole lot its almost tough to argue with you (not that I really will need to…HaHa). You certainly put a new spin on a subject which has been written about for decades. Great stuff, just excellent.

  23. Way cool! Some extremely valid points! I appreciate you penning this post plus the rest of the site is very good.

  24. It’s hard to find experienced people on this topic, but you seem like you know what you’re talking about! Thanks

  25. Way cool! Some extremely valid points! I appreciate you penning this post plus the rest of the website is really good.

  26. Thank you for your article post.Really thank you! Great.

  27. Hi, I do think this is a great website. I stumbledupon it ;) I am going to revisit once again since i have book marked it. Money and freedom is the greatest way to change, may you be rich and continue to help other people.

  28. You need to be a part of a contest for one of the finest sites on the internet. I am going to recommend this blog!

  29. Saved as a favorite, I really like your blog!

  30. I must thank you for the efforts you’ve put in penning this site. I am hoping to check out the same high-grade blog posts by you later on as well. In truth, your creative writing abilities has motivated me to get my very own website now ;)

  31. Your style is unique compared to other folks I have read stuff from. I appreciate you for posting when you’ve got the opportunity, Guess I’ll just book mark this page.

  32. I’m impressed, I have to admit. Rarely do I come across a blog that’s both educative and engaging, and let me tell you, you’ve hit the nail on the head. The issue is something that too few folks are speaking intelligently about. I am very happy I came across this in my hunt for something relating to this.

  33. I value the article.Thanks Again. Will read on…

  34. Hello, I think your website could be having internet browser compatibility problems. Whenever I look at your site in Safari, it looks fine however, when opening in I.E., it has some overlapping issues. I merely wanted to give you a quick heads up! Apart from that, fantastic website.

  35. Very good write-up. I definitely love this website. Continue the good work!

  36. It’s difficult to find well-informed people in this particular topic, however, you seem like you know what you’re talking about! Thanks

  37. I really enjoy the article post.Much thanks again. Really Cool.

  38. Excellent write-up. I definitely love this website. Continue the good work!

  39. I like it when folks come together and share ideas. Great site, keep it up.

  40. xjupIO wow, awesome post.Thanks Again. Really Cool.

  41. Aw, this was a really nice post. Taking the time and actual effort to generate a great article… but what can I say… I hesitate a whole lot and never manage to get anything done.

  42. Muchos Gracias for your article post.Really looking forward to read more. Cool.

  43. Hello! Someone inside my Facebook group contributed this website around, and so I came to offer it a peek. I’m taking pleasure in the information. I’m book-marking and will be tweeting this to my fans! Wonderful blog and awesome design and style.

  44. Everything is very open with a precise explanation of the challenges. It was truly informative. Your website is very helpful. Thank you for sharing.

  45. Right here is the right web site for anybody who really wants to understand this topic. You know so much its almost tough to argue with you (not that I really will need to…HaHa). You certainly put a new spin on a topic which has been discussed for decades. Great stuff, just excellent.

  46. I’m impressed, I must say. Rarely do I come across a blog that’s both educative and interesting, and without a doubt, you have hit the nail on the head. The problem is something that not enough folks are speaking intelligently about. Now i’m very happy that I stumbled across this during my search for something relating to this.

  47. Can I simply say what a relief to find someone that actually knows what they’re discussing on the net. You actually understand how to bring a problem to light and make it important. More people really need to look at this and understand this side of the story. I was surprised you’re not more popular because you most certainly have the gift.

  48. I truly love your website.. Very nice colors & theme. Did you create this amazing site yourself? Please reply back as I’m hoping to create my own website and would love to find out where you got this from or just what the theme is named. Kudos.

  49. Appreciate you sharing, great article post.Much thanks again. Great.

  50. Having read this I believed it was extremely enlightening. I appreciate you spending some time and effort to put this short article together. I once again find myself personally spending way too much time both reading and posting comments. But so what, it was still worth it!

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© 2017 Toby's Epril Suffusion theme by Sayontan Sinha