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 article. I absolutely love this website. Keep writing!

  2. This excellent website certainly has all of the information I wanted about this subject and didn’t know who to ask.

  3. Great info. Lucky me I recently found your website by chance (stumbleupon). I have bookmarked it for later!

  4. Everything is very open with a really clear description of the challenges. It was really informative. Your website is very useful. Thank you for sharing!

  5. I needed to thank you for this very good read!! I definitely loved every bit of it. I have you bookmarked to check out new things you post…

  6. This is a topic which is close to my heart… Best wishes! Exactly where are your contact details though?

  7. You are so cool! I don’t suppose I have read anything like this before. So nice to find someone with a few genuine thoughts on this subject. Really.. many thanks for starting this up. This website is something that’s needed on the web, someone with some originality!

  8. You’re so cool! I do not think I have read something like that before. So wonderful to discover another person with original thoughts on this topic. Really.. thank you for starting this up. This website is something that’s needed on the web, someone with a bit of originality!

  9. Hello everybody, here every person is sharing such familiarity, therefore it’s good to read
    this website, and I used to pay a visit this website everyday.

  10. I love reading a post that can make people think. Also, many thanks for permitting me to comment!

  11. Very nice blog post. I definitely love this website. Keep writing!

  12. A motivating discussion is definitely worth comment. There’s no doubt that that you should publish more on this issue, it might not be a taboo matter but usually folks don’t talk about these topics. To the next! Many thanks!!

  13. I was excited to find this website. I wanted to thank you for ones time for this particularly wonderful read!! I definitely really liked every part of it and I have you book-marked to see new information in your web site.

  14. The next time I read a blog, Hopefully it doesn’t fail me as much as this particular one. After all, I know it was my choice to read, nonetheless I truly thought you would have something useful to say. All I hear is a bunch of moaning about something you could possibly fix if you were not too busy seeking attention.

  15. I like reading an article that can make men and women think. Also, thanks for allowing for me to comment!

  16. Everything is very open with a really clear explanation of the challenges. It was definitely informative. Your website is extremely helpful. Thanks for sharing!

  17. Very good post! We will be linking to this particularly great post on our website. Keep up the great writing.

  18. Everything is very open with a very clear explanation of the issues. It was definitely informative. Your website is extremely helpful. Many thanks for sharing!

  19. I must thank you for the efforts you’ve put in penning this website. I really hope to view the same high-grade content by you in the future as well. In truth, your creative writing abilities has encouraged me to get my own, personal website now ;)

  20. Everything is very open with a really clear description of the issues. It was truly informative. Your website is extremely helpful. Thanks for sharing!

  21. Wonderful article! We will be linking to this great article on our site. Keep up the good writing.

  22. This is a topic which is close to my heart… Many thanks! Where are your contact details though?

  23. Howdy! I could have sworn I’ve been to this website before but after looking at a few of the posts I realized it’s new to me. Nonetheless, I’m definitely pleased I found it and I’ll be bookmarking it and checking back often!

  24. Wonderful article! We will be linking to this particularly great content on our site. Keep up the good writing.

  25. Good blog you’ve got here.. It’s difficult to find excellent writing like yours nowadays. I truly appreciate people like you! Take care!!

  26. Do you have a spam problem on this site; I also am a blogger, and I
    was wanting to know your situation; we have developed some nice practices and we are looking to exchange strategies with other
    folks, please shoot me an e-mail if interested.

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

  28. Aw, this was an extremely nice post. Taking the time and actual effort to produce a top notch article… but what can I say… I hesitate a whole lot and never manage to get nearly anything done.

  29. Spot on with this write-up, I actually feel this web site needs much more attention. I’ll probably be returning to read more, thanks for the advice!

  30. Aw, this was a very nice post. Taking a few minutes and actual effort to make a really good article… but what can I say… I procrastinate a lot and don’t seem to get anything done.

  31. I really love your site.. Very nice colors & theme. Did you make this amazing site yourself? Please reply back as I’m looking to create my own personal website and would love to learn where you got this from or what the theme is called. Many thanks!

  32. Saved as a favorite, I really like your web site!

  33. Good post! We will be linking to this particularly great content on our website. Keep up the good writing.

  34. Everything is very open with a really clear description of the challenges. It was definitely informative. Your website is useful. Thank you for sharing!

  35. A motivating discussion is definitely worth comment. I do believe that you need to publish more on this subject matter, it may not be a taboo matter but typically people do not speak about such subjects. To the next! All the best!!

  36. I could not resist commenting. Exceptionally well written!

  37. Great information. Lucky me I discovered your site by accident (stumbleupon). I’ve book marked it for later!

  38. I’m amazed, I have to admit. Seldom do I encounter a blog that’s equally educative and engaging, and let me tell you, you have hit the nail on the head. The issue is something which too few people are speaking intelligently about. Now i’m very happy that I came across this during my search for something concerning this.

  39. Pretty! This was a really wonderful article. Thanks for providing these details.

  40. Howdy, I do think your blog could possibly be having web browser compatibility problems. When I take a look at your site in Safari, it looks fine but when opening in Internet Explorer, it’s got some overlapping issues. I merely wanted to provide you with a quick heads up! Besides that, excellent site!

  41. This excellent website truly has all the information and facts I wanted concerning this subject and didn’t know who to ask.

  42. Great blog you’ve got here.. It’s difficult to find excellent writing like yours these days. I seriously appreciate individuals like you! Take care!!

  43. Good web site you have got here.. It’s hard to find high quality writing like yours nowadays. I truly appreciate people like you! Take care!!

  44. Excellent article. I will be going through many of these issues as well..

  45. Hi, I do think this is a great web site. I stumbledupon it ;) I may revisit once again since i have bookmarked it. Money and freedom is the best way to change, may you be rich and continue to help other people.

  46. I used to be able to find good advice from your blog posts.

  47. I love it when people come together and share views. Great website, continue the good work!

  48. Everything is very open with a clear explanation of the issues. It was really informative. Your website is extremely helpful. Many thanks for sharing!

  49. Howdy, There’s no doubt that your website might be having internet browser compatibility problems. Whenever I look at your blog in Safari, it looks fine however, when opening in IE, it’s got some overlapping issues. I simply wanted to provide you with a quick heads up! Besides that, great site!

Leave a Reply to s128 sabung ayam Cancel 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