본문 바로가기

창고/Backup_2013_0121

[GAE/P] 구글앱엔진용언어는 파이썬이 좋을까 자바가 좋을까?

반응형
아무생각없이 걍 Java 로 하다가 

궁금한 마음이 들어서 구글링 하다가 Q.A 가 있길래
발번역 해봤습니다.

원문::
http://stackoverflow.com/questions/1085898/choosing-java-vs-python-on-google-app-engine

Q.
Currently Google App Engine supports both Python & Java. 
최근에 구글앱엔진이 파이썬과 자바 둘다 지원하기 시작했슴다.
Java support is less mature. 
자바의 지원도가 조금 모자랍니다.
However, Java seems to have a longer list of libraries 
하지만 자바는 엄청난 라이브러리를 가지고 있고,
and especially support for Java bytecode regardless of the languages used to write that code. 
어떤 코드로 쓰던지 자바 바이트코드로만 된다면 지원이 가능하게 만들었다고 합니다.(의역)
Which language will give better performance and more power? Please advise. Thank you!
어떤언어가 좀더 강력한 힘과 퍼포먼스를 갖고있나요? 충고해주세요~ 감사합니다

A.

I'm biased (being a Python expert but pretty rusty in Java) 
나는 한쪽에 치우친 사람입니다. ( 파이썬 전문가, 자바에 대해선 잘모름 )

but I think the Python runtime of GAE is currently more advanced 
하지만 제가 생각하기에 구글앱엔진 파이썬 런타임이 좀더 우위에 있고
and better developed than the Java runtime 
자바런타임보다 개발하기가 더 낫다고 봅니다.

-- the former has had one extra year to develop and mature, after all.
-- 무엇보다 파이썬이 1년더 먼저 개발되어서 완성도가 높지요.

How things will proceed going forward is of course hard to predict 
앞으로 어떻게 진행될지 예측하는것은 무척힘듭니다.
-- demand is probably stronger on the Java side 
아무래도 사용자는 자바쪽이 더 많겠지요.
(especially since it's not just about Java, but other languages perched on top of the JVM too, 
특히 이것은 Java 뿐만아니라 JVM 위에서 돌아가는 모든언어에 해당됩니다.
so it's THE way to run e.g. PHP or Ruby code on App Engine); 
예를들어 PHP나 루비코드가 앱엔진에 올라가 실행하는것이죠.

the Python App Engine team however does have the advantage of having on board Guido van Rossum, 
하지만 파이썬 앱엔진팀은 귀도 반 러썸이 이끌고 있다는 장점이 있습니다.
the inventor of Python and an amazingly strong engineer.
파이썬 언어의 창시자이자 엔지니어계의 능력자이시죠.

In terms of flexibility, the Java engine, 
유연성의 측면에서, 자바 엔진은,
as already mentioned, does offer the possibility of running JVM bytecode made by different languages, not just Java 
위에서 언급했지만, 자바언어 뿐만 아니라 다른언어로 만들어진 JVM 바이트코드를 실행되어야 합니다.
-- if you're in a multi-language shop that's a pretty large positive. 
만약 당신이 여러 언어를 사용하는 환경에서 일한다면 더많은 장점이 있습니다.
Vice versa, if you loathe Javascript but must execute some code in the user's browser, 
반대로, 만야 ㄱ당신이 자바스크립트를 혐호하지만, 유저의 브라우저에서 몇몇 코드를 실행해야 한다면, 
Java's GWT (generating the Javascript for you from your Java-level coding) is far richer and more advanced 
자바를 이용한 구글 웹툴킷 ( 자바언어로 코딩하고 자바스크립트를 생산하는 툴 )을 사용해야할것이고  
than Python-side alternatives 
이는 파이썬 보다는 자바 쪽이 훨씬 나은 도움이 될것입니다.
(in practice, if you choose Python, you'll be writing some JS yourself for this purpose, 
파이썬을 선택해도 자바스크립트로 쓰거나 구글웹툴킷을 이용하는것 양쪽다 가능합니다.
while if you choose Java GWT is a usable alternative if you loathe writing JS).

In terms of libraries it's pretty much a wash 
라이브러리 측면에서 , 
-- the JVM is restricted enough 
자바 구글앱엔진은 제한적입니다. 
(no threads, no custom class loaders, no JNI, no relational DB) 
쓰레드불가, 커스텀클래스로드 불가, JNI 불가, RDB 불가
to hamper the simple reuse of existing Java libraries as much, or more, 
기존의 단순한 라이브러리의 재사용도 안됩니다.
than existing Python libraries are similarly hampered by the similar restrictions on the Python runtime.
거기에 비해서 파이썬의 라이브러리 사용은 좀더 덜 제한적입니다.

In terms of performance, 
퍼포먼스 측면에서,
I think it's a wash, though you should benchmark on tasks of your own 
내 생각엔 비슷비슷합니다. 물론 자신만의 밴치마킹을 할수도 있겠지만 말입니다.
-- don't rely on the performance of highly optimized JIT-based JVM implementations discounting their large startup times 
퍼포먼스의 향상을 위해 최적화에 목매지 마세요.
and memory footprints, because the app engine environment is very different 
왜냐면 앱엔진의 환경은 매우 다릅니다.
(startup costs will be paid often, as instances of your app are 
자주 재시작되고, 다른 호스트 다른 환경 등등 항상 다를수 있다는 말이지요-_-;;
started, stopped, moved to different hosts, etc, all trasparently to you 
-- such events are typically much cheaper with Python runtime environments than with JVMs).
이런 이벤트는 JVM 보다는 파이썬 런타임 환경이 훨씬 낫지요~

The XPath/XSLT situation (to be euphemistic...) is not exactly perfect on either side, 
sigh, though I think it may be a tad less bad in the JVM 
XPath/XSLT 상황에서 ( XML 문서.. ) 이런 문서들은 양쪽에 모두 맞지는 않겠지만,
JVM쪽이 조금 더 낫습니다.
(where, apparently, substantial subsets of Saxon can be made to run, with some care). 
I think it's worth opening issues on the Appengine Issues page with XPath and XSLT in their titles 
-- right now there are only issues asking for specific libraries, and that's myopic: 
I don't really care HOW a good XPath/XSLT is implemented, for Python and/or for Java, as long as I get to use it. 
(Specific libraries may ease migration of existing code, 
but that's less important than being able to perform such tasks as 
"rapidly apply XSLT transformation" in SOME way!-). 
I know I'd star such an issue if well phrased (especially in a language-independent way).

Last but not least: remember that you can have different version of your app 
마지막으로, 당신의 앱을 다른버젼으로( 자바버젼, 파이썬 버젼 ) 갖고 있을수 있습니다. 
(using the same datastore) some of which are implemented with the Python runtime, 
( 동일한 데이터 스토어를 사용하고 ) 어떤부분은 파이썬 런타임으로, 어떤부분은 자바런타임으로 말이죠.
some with the Java runtime, 
and you can access versions that differ from the "default/active" one with explicit URLs. 
그리고 URL 을 다르게 주어 둘다 기동하는게 가능하죠.
So you could have both Python and Java code 
(in different versions of your app) 
use and modify the same data store, granting you even more flexibility 
(though only one will have the "nice" URL such as foobar.appspot.com 
-- which is probably important only for access by interactive users on browsers, I imagine;-).


결론..

난 파이썬이 좋으니까 파이썬이 더 좋은거 같다.
하지만, 둘다 가능하니까 판단은 니가해라=ㅠ=;( 둘다하면 좋다~ ) 

어쨌든 공짜 웹서버가 필요한사람은 해보세요~ 편하고 좋습니다~
Java 로 하면 이클립스 플러그인으로 개발환경도 제공해주더군요~ ( 내장 서버썼는데 이름이 ="= );;
 
반응형