Python VS Java

973 views
Skip to first unread message

Brandon Wirtz

unread,
Jul 2, 2011, 3:41:41 PM7/2/11
to google-a...@googlegroups.com

I have kind of asked this before…

 

I am trying to decide if I take the python of my app and expand it, or the version I ported to Java.  The Java version currently costs more to run, than the python version, but the new pricing would put the Java version as cheaper, at least until instances support multiple threads on python. 

 

So do I build out Python? Or Build out Java?

 

How long from new pricing to Mult-threaded Python?

 

Waleed Abdulla

unread,
Jul 2, 2011, 5:10:29 PM7/2/11
to google-a...@googlegroups.com
I'm curious why your Java version costs more currently! Can you share more details? I would've expected the Java version to cost less since Java has JIT compilation so the code should run faster. 

As for your questions, I'd say that the price difference will likely be small compared to the cost of your own time (unless the app gets a lot of load and costs a lot). So I'd say choose the language in which you feel more comfortable. Python tends to get new GAE features first, which is a slight vote for Python. 




--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.

Brandon Wirtz

unread,
Jul 2, 2011, 6:17:22 PM7/2/11
to google-a...@googlegroups.com

We resell service, so our pricing is a function of the code efficiency.  I may just be a better Python programmer, and that is why it is faster/cheaper.

 

-Brandon

milosh zorica

unread,
Jul 2, 2011, 6:19:51 PM7/2/11
to google-a...@googlegroups.com
develop in whatever you feel more comfortable

due to JIT, java executes faster

i myself prefer python. so does google

i'm pretty much tool / language / platform agnostic. originally
trained as a designer (SVA alumni) but turned a developer

--
Milosh Zorica
http://www.linkedin.com/in/miloshzorica | www.coroflot.com/miloshz

http://tangoinabox.co.uk
Tango in a Box - Online Media Production, the Tango Principles Applied -
Born in Argentina, Growing up Globally

+1 310 601 4396 | +44 20 8144 5294 | +54 9 11 3515 7187

milosh zorica

unread,
Jul 2, 2011, 6:21:49 PM7/2/11
to google-a...@googlegroups.com
then go for it

python is a great multi purpose, multi platform language that could do a lot

--

Brandon Wirtz

unread,
Jul 4, 2011, 12:47:49 PM7/4/11
to google-a...@googlegroups.com
Everyone keeps saying that Java is faster. I am going to have to race, but
my

"Hello World the <time is>"
Read visitor count From data Store
"you are the" <vistor count> " visitor"
Visitor + 1 Write to data Store
"The Time is Now" <time>
Exit

Is about 45ms faster on average. In the Python version when running at 500
qps

This may be because Threading is causing this to consume far more instances
in python?

I may build a test logic, and we can have some races based on not just my
code.


-----Original Message-----
From: google-a...@googlegroups.com
[mailto:google-a...@googlegroups.com] On Behalf Of milosh zorica
Sent: Saturday, July 02, 2011 3:20 PM
To: google-a...@googlegroups.com
Subject: Re: [google-appengine] Python VS Java

Brandon Wirtz

unread,
Jul 4, 2011, 12:57:45 PM7/4/11
to google-a...@googlegroups.com
That should say Java is consuming far fewer instances than Python.

The CPU bill how ever is currently higher on the Java version than the
Python. (Cycles not Time)

Everyone also keeps telling me build in whatever I'm more comfortable in...
When the platform costs more than the dev makes in a year, you hire the
right dev for the platform, you don't pick the platform based on the dev. I
may get things close to "done" but I'll hire someone better at coding than
me as I get closer to needing the last 20% on the performance.


-Brandon

Simon Knott

unread,
Jul 4, 2011, 2:21:46 PM7/4/11
to google-a...@googlegroups.com
How often do the instances get recycled Brandon? I know one person was saying that their instances were getting recycled every 9k requests.

Given that one of the massive performance benefits of Java comes from JIT hotspot recompilation, this is completely lost if the instance is recycled. On other servers i've seen performance jump from 100 QPS to 600+ just from recompilation.

Greg

unread,
Jul 4, 2011, 10:44:32 PM7/4/11
to Google App Engine
On Jul 3, 7:41 am, "Brandon Wirtz" <drak...@digerat.com> wrote:
> So do I build out Python? Or Build out Java?

Given what you've mentioned previously about your application, I think
the core question for you is which runtime is most efficient. The
prospective multi-threading change for python makes that difficult to
answer because we have no data when that will happen or how effective
it will be.

Lack of data never stopped anyone guessing though! I'd expect multi-
threaded python to be a bit more efficient than Java - it's lighter
and the JVM is a bit of a resource hog. But I think you should also be
considering the go runtime option. Being compiled and no JVM overhead
should make it the most efficient option - when they provide multi-
threading.

I can understand Google's reluctance to commit to ship dates, but it
would be good to know how they are progressing. I'm expecting
comparative old/new billing and the new scheduler in the next couple
of months, and multi-threaded python a couple of months after that -
but let me emphasise that this is pure guesswork.

Cheers
Greg.

Brandon Wirtz

unread,
Jul 4, 2011, 11:50:12 PM7/4/11
to google-a...@googlegroups.com
I think your thoughts mirror my own. I have thought about GO, but 90% of my
code would be portable to other platforms... and if I wrapped a few
functions I could get to the point it was easy to maintain code on several
platforms... Which might skew my "develop for the right platform" argument
I made earlier.

Cheers
Greg.

--

Reply all
Reply to author
Forward
0 new messages