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. I have not checked in here for some time since I thought it was getting boring, but the last several posts are good quality so I guess I’ll add you back to my daily bloglist. You deserve it my friend :)

  2. Keep up the wonderful work , I read few blog posts on this web site and I believe that your site is really interesting and has got bands of wonderful information.

  3. Hello, i feel that i noticed you visited my website so i got here to return the want?.I’m trying to to find issues
    to enhance my site!I suppose its ok to use some of your ideas!!

  4. Hi my loved one! I want to say that this post is amazing, great written and come with almost all significant infos. I’d like to look more posts like this.

  5. Pretty section of content. I just stumbled upon your site and in accession capital to assert that I get in fact enjoyed account your blog posts. Any way I’ll be subscribing to your feeds and even I achievement you access consistently quickly.

  6. My coder is trying to convince me to move to .net from
    PHP. I have always disliked the idea because of the
    costs. But he’s tryiong none the less. I’ve been using Movable-type on a number of websites for about a
    year and am nervous about switching to another platform.
    I have heard good things about blogengine.net. Is there a way I can import all my wordpress posts into it?
    Any kind of help would be really appreciated!

  7. I’m not sure where you’re getting your information, but good topic. I needs to spend some time learning much more or understanding more. Thanks for great info I was looking for this information for my mission.

  8. Oh my goodness! Incredible article dude! Thank you so much, However I am encountering issues with your RSS. I don’t understand the reason why I am unable to subscribe to it. Is there anybody else having identical RSS problems? Anyone who knows the answer will you kindly respond? Thanks.

  9. I got what you intend, saved to my bookmarks , very decent website .

  10. There is definately a lot to find out about this subject. I love all the points you have made.

  11. Good article. I’m going through a few of these issues as well..

  12. This site certainly has all of the info I wanted about this subject and didn’t know who to ask.

  13. Very nice blog post. I certainly love this website. Stick with it!

  14. I couldn’t resist commenting. Well written!

  15. Good blog you’ve got here.. It’s difficult to find high quality writing like yours nowadays. I honestly appreciate people like you! Take care!!

  16. I blog often and I seriously thank you for your information. The article has really peaked my interest. I am going to take a note of your site and keep checking for new information about once per week. I subscribed to your Feed too.

  17. Undeniably consider that that you stated. Your favourite justification seemed to be at the internet the simplest factor
    to be aware of. I say to you, I definitely get irked even as other people consider worries that they plainly do not
    recognize about. You managed to hit the nail upon the top and also defined out the entire thing without having side-effects , people can take a signal.
    Will likely be back to get more. Thanks

  18. Great site you have got here.. It’s difficult to find high-quality writing like yours these days. I seriously appreciate individuals like you! Take care!!

  19. Right here is the perfect website for everyone who hopes to understand this topic. You know so much its almost tough to argue with you (not that I actually would want to…HaHa). You certainly put a fresh spin on a subject which has been written about for decades. Great stuff, just great.

  20. I am curious to find out what blog system you happen to be utilizing? I’m having some minor security issues with my latest site and I’d like to find something more secure. Do you have any suggestions?

  21. Thanks for sharing superb informations. Your web site is very cool. I’m impressed by the details that you’ve on this blog. It reveals how nicely you understand this subject. Bookmarked this website page, will come back for more articles. You, my pal, ROCK! I found just the info I already searched all over the place and simply could not come across. What a perfect site.

  22. What i do not realize is if truth be told how you are no
    longer really a lot more well-favored than you might be right now.
    You’re very intelligent. You realize therefore significantly in terms of this topic, made me
    personally imagine it from numerous various
    angles. Its like women and men aren’t involved unless it’s one thing to do with Girl gaga!
    Your individual stuffs outstanding. All the time deal with it up!

  23. Normally I do not read post on blogs, however I would like to say that this write-up very forced me to try and do so!
    Your writing style has been amazed me. Thank you, quite great
    post.

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

  25. Nice post. I learn something totally new and challenging on websites I stumbleupon everyday. It will always be helpful to read articles from other writers and use something from other websites.

  26. This is a topic that’s close to my heart… Many thanks! Exactly where can I find the contact details for questions?

  27. I used to be able to find good info from your articles.

  28. Everything is very open with a very clear explanation of the issues. It was definitely informative. Your website is very useful. Thank you for sharing.

  29. I was able to find good info from your blog articles.

  30. Everything is very open with a really clear description of the issues. It was really informative. Your site is very helpful. Many thanks for sharing!

  31. May I just say what a comfort to discover somebody who truly knows what they are talking about on the net. You certainly know how to bring a problem to light and make it important. A lot more people need to look at this and understand this side of the story. I can’t believe you aren’t more popular given that you certainly have the gift.

  32. A fascinating discussion is worth comment. I believe that you should publish more about this subject, it might not be a taboo subject but generally folks don’t speak about these subjects. To the next! Many thanks.

  33. You are so awesome! I do not think I’ve truly read through something like this before. So great to find somebody with original thoughts on this subject matter. Seriously.. thank you for starting this up. This website is something that is required on the web, someone with some originality.

  34. Saved as a favorite, I like your blog.

  35. Very good article! We are linking to this great post on our website. Keep up the great writing.

  36. I was able to find good advice from your blog posts.

  37. Howdy! This article couldn’t be written much better! Looking at this article reminds me of my previous roommate! He constantly kept preaching about this. I’ll send this information to him. Pretty sure he’s going to have a great read. Thank you for sharing!

  38. The very next time I read a blog, I hope that it does not fail me just as much as this one. After all, Yes, it was my choice to read, however I actually thought you would probably have something helpful to talk about. All I hear is a bunch of moaning about something that you can fix if you weren’t too busy seeking attention.

  39. Good post. I will be facing a few of these issues as well..

  40. That is a very good tip particularly to those new to the blogosphere. Short but very accurate info… Appreciate your sharing this one. A must read article!

  41. Woah! I’m really loving the template/theme of this website.
    It’s simple, yet effective. A lot of times it’s difficult to get that
    “perfect balance” between user friendliness and visual appearance.
    I must say that you’ve done a very good job with this.
    Additionally, the blog loads extremely fast for me on Safari.
    Outstanding Blog!

  42. Good day! Would you mind if I share your blog with my zynga group?
    There’s a lot of folks that I think would really appreciate your content.
    Please let me know. Thanks

  43. Thanks for finally writing about > Google App Engine for Java에서 Spring 3.0 사용하기 »
    Toby's Epril < Liked it!

  44. Cherish everything you have, but don’t give up to pursue what you want!

  45. When I originally left a comment I appear to have
    clicked on the -Notify me when new comments are added- checkbox and now whenever a comment
    is added I get four emails with the same comment. Is there a means you can remove me from that service?
    Cheers!

  46. Hello, the whole thing is going fine here and ofcourse every one is sharing information, that’s actually excellent, keep up writing.

  47. Hello there! This article could not be written any better! Looking at this article reminds me of my previous roommate! He constantly kept preaching about this. I will forward this article to him. Pretty sure he’ll have a very good read. Many thanks for sharing!

  48. For many years, I have followed the years and sighed. I remember traveling with Shushan Road in the past. At this time, I did n’t meet each other at this time. Many acacias turned into tears. I wish you peace and happiness.

  49. I want to to thank you for this great read!! I certainly loved every bit of it. I’ve got you book marked to check out new stuff you post…

  50. You should be a part of a contest for one of the finest blogs on the internet. I most certainly will highly recommend this website!

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