Help me in this please--is Python the answer?

R

Ray

Hello,

I've got the chance to determine the technology to use in creating a
product similar to this:

http://www.atomicisland.com/

Now the thing is that I need to sell this to the guy with the money.
I've developed for years with C++ and Java, last 7 years J2EE, and I'm
kinda sick of the "bloated" feeling that the whole J2EE/appserver
business carries into the picture.

Python is the language that I use at home, so I've been thinking of
using this to implement the product mentioned above. I've personally
experienced the pleasure of programming in it, and as such, I hope that
this will translate to advantage over our competitors (a la Paul
Graham's argument for Lisp).

That said, my experience with Python is limited to toy programs, that I
write myself for my own use. As such, I have several concerns:

1. How scalable is Python? In J2EE, when the load gets really big, we
can resort to clustering. Same goes about availability. Is there
anything that will help here in Python? (Mind, my Python experience is
usually with scripts and console).

2. If there is, what is the transition like from being lightweight to
heavyweight? E.g.: in J2EE we can use Tomcat at first as a lightweight
web container, and scale as necessary using a more powerful appserver.
Is this possible in Python?

3. Have any of you done this before? As in you come from a heavy J2EE
background, and then switch to doing something equally serious in
Python? In your experience, in the end, did you find Python suitable at
all for this domain or you think you should have stuck to J2EE? What
are the pros and cons you discovered?

(I'd love to develop in Python and get paid for it finally, but at the
same time I do want to give the money guy the best value for his
money...)

Thanks much,
Ray
 
T

Tim N. van der Leeuw

Hi Ray,

I'm in a bit of the same boat as you only I don't get to choose my
implementation language ;-)

Some of the concerns should be:
- Do you have to interface with things like messaging-systems (a la JMS
specs), distributed transaction managers? If so, the only way to go
Python is Jython: Python for the JVM. Because AFAIK, there are no
interfaces for Python to the likes of IBM's MQSeries or for any
distributed transaction managers.

- Is your application purely a web-based application? Or is there a
large amount of application logic which is not tied to the web in any
way?

- Python has a number of frameworks for developing server applications,
like Twisted, Zope and Django.
I don't know Twisted; I know a little bit about Zope. Zope has several
enterprise-level features and provides scalability/clustering.
However, I've found the learning-curve for Zope to be a bit steep so
far; too steep to master it in what little bits of spare time I have.
(If I would have more time I'd be able to get the hang of it but I
don't have enough time)

I've started to toy a bit with Django and it seems to get rather easy
to get started with developing a Web application using Django; however
I also get the feeling that installation is a bit more involved than
with Zope and that it will be not as easy to package up an application
and transport it to another machine, as it is with Zope.


So for development of Web-applications, I would certainly consider
either Zope or Django.
Both offer ways to store your data in a transactional database; Django
has some object-relation mapper tools but I'm not sure how exactly Zope
stores data in a SQL database (it comes with it's own powerful
object-database, the ZODB but I don't know if OR mapping tools exist
for Zope).


However you mentioned 'development in J2EE' and J2EE applications are
by no means restricted to Web interfaces. J2EE applications can have
rich GUI clients, or can be without any UI at all and exist just as
message-driven beans triggered by messages coming in via JMS
interfaces.
I wouldn't know what Python frameworks exist that would combine
web-based applications with tradional GUI client/server applications
and I have no idea how to listen to a queue using Python...


So what are your requirements for 'J2EE' applications? And which Python
framework would best fit the bill?


cheers,

--Tim
 
E

Ed Singleton

Hello,

I've got the chance to determine the technology to use in creating a
product similar to this:

http://www.atomicisland.com/

Now the thing is that I need to sell this to the guy with the money.
I've developed for years with C++ and Java, last 7 years J2EE, and I'm
kinda sick of the "bloated" feeling that the whole J2EE/appserver
business carries into the picture.

Personally I have found that if you need to sell a technology on,
saying it's written in Java is an advantage generally (because "it's a
standard"). If it's written in Python you may get asked why it has
been written in a "scripting language" if they've heard of it at all.
Python is the language that I use at home, so I've been thinking of
using this to implement the product mentioned above. I've personally
experienced the pleasure of programming in it, and as such, I hope that
this will translate to advantage over our competitors (a la Paul
Graham's argument for Lisp).
From my brief look at that url you gave, it looks like you are trying
to enter a very crowded market place. You will have to perform a lot
better than your competitors in order to succeed (they have a head
start on you). There's no way on earth you can do that by using
exactly the same tools as them, so you have to choose better tools.
Almost by definition, the tools that the majority are using are NOT
the best tools for the job. If I were you I'd definitely choose
Python, if only because everyone else is not using it yet.
That said, my experience with Python is limited to toy programs, that I
write myself for my own use. As such, I have several concerns:

1. How scalable is Python? In J2EE, when the load gets really big, we
can resort to clustering. Same goes about availability. Is there
anything that will help here in Python? (Mind, my Python experience is
usually with scripts and console).

2. If there is, what is the transition like from being lightweight to
heavyweight? E.g.: in J2EE we can use Tomcat at first as a lightweight
web container, and scale as necessary using a more powerful appserver.
Is this possible in Python?

If I were you I'd concentrate on creating a website that actually
works. Your chances of creating a website that needs to scale to be
'heavyweight' are very slim. If you manage to get to that point then
you can start worrying about how to cope with all the money that's
rolling in ;)

AFAIAA Python scales better than Java as any performance critical
parts can be easily rewritten in C. To spend too much time worrying
over it is premature optimisation though.
3. Have any of you done this before? As in you come from a heavy J2EE
background, and then switch to doing something equally serious in
Python? In your experience, in the end, did you find Python suitable at
all for this domain or you think you should have stuck to J2EE? What
are the pros and cons you discovered?

I don't have much experience of Java tbh, but I've never heard of any
pro's to using it, except for the fact that it's more acceptable to
big business and it's easier to get mediocre programmers for it.
(I'd love to develop in Python and get paid for it finally, but at the
same time I do want to give the money guy the best value for his
money...)

The only thing you really need to be happy is to find something you
enjoy doing and to do it. Money is definitely secondary to that. If
you have a chance to be paid for working in Python, then go for it;
even if you fail, you will have spent your days in a happy state.

Ed
 
R

Ray

Hi Ed,

Ed said:
Personally I have found that if you need to sell a technology on,
saying it's written in Java is an advantage generally (because "it's a
standard"). If it's written in Python you may get asked why it has
been written in a "scripting language" if they've heard of it at all.

Yes, I agree. Especially with those cover-my-ass types in big
institutions who'd only go for things that have the word "Enterprise"
on it :)
exactly the same tools as them, so you have to choose better tools.
Almost by definition, the tools that the majority are using are NOT
the best tools for the job. If I were you I'd definitely choose
Python, if only because everyone else is not using it yet.

Yes, that was what I was thinking. Fast development cycle and ability
to embrace change is crucial here. I do feel the way Java is getting in
the way of my coding even after using Python for small personal
projects.

But then on the other hand, there is a manpower problem--it's damn easy
to find a Java programmer (although the quality that you get is a
different matter). Python programmers are more difficult.
If I were you I'd concentrate on creating a website that actually
works. Your chances of creating a website that needs to scale to be
'heavyweight' are very slim. If you manage to get to that point then
you can start worrying about how to cope with all the money that's
rolling in ;)

You know what, this is a very good point :))
AFAIAA Python scales better than Java as any performance critical
parts can be easily rewritten in C. To spend too much time worrying
over it is premature optimisation though.

Yes, but this is more of a web application though--something that I've
never developed in Python before, so... I'll be evaluating Django
shortly--let me see how it compares to Tomcat.
The only thing you really need to be happy is to find something you
enjoy doing and to do it. Money is definitely secondary to that. If
you have a chance to be paid for working in Python, then go for it;
even if you fail, you will have spent your days in a happy state.

Yeah, I have the chance to do that if I manage to get this through, but
at the same time I do want to give the guy who funds us the best value
possible for his money. (If--If--it means I have to use J2EE, I will do
it.)

Thanks,
Ray
 
R

Ray

Tim said:

Hi Tim!
I'm in a bit of the same boat as you only I don't get to choose my
implementation language ;-)

Some of the concerns should be:
- Do you have to interface with things like messaging-systems (a la JMS
specs), distributed transaction managers? If so, the only way to go
Python is Jython: Python for the JVM. Because AFAIK, there are no
interfaces for Python to the likes of IBM's MQSeries or for any
distributed transaction managers.

Hmmm, at this level I think not. But yes, this is a good point, I'll
keep this in mind. If it's gonna be Jython, I think I might as well go
with J2EE--since it is yet another layer on top of a platform.
- Is your application purely a web-based application? Or is there a
large amount of application logic which is not tied to the web in any
way?

Yes, it is purely a web-based application... well, it has a
"administration" page, that the back office stuff, but that can be
web-based as well.
- Python has a number of frameworks for developing server applications,
like Twisted, Zope and Django.
I don't know Twisted; I know a little bit about Zope. Zope has several
enterprise-level features and provides scalability/clustering.
However, I've found the learning-curve for Zope to be a bit steep so
far; too steep to master it in what little bits of spare time I have.
(If I would have more time I'd be able to get the hang of it but I
don't have enough time)

Ah, yes... all respect to Zope, but I hope this is something that can
be done in Django. I suspect the implementation time will be very, very
short... as typical of the nature of these projects, and with the
seeming intricacies of Zope, the impression of which I get from reading
about it, I don't think we have the spare time/effort...
I've started to toy a bit with Django and it seems to get rather easy
to get started with developing a Web application using Django; however
I also get the feeling that installation is a bit more involved than
with Zope and that it will be not as easy to package up an application
and transport it to another machine, as it is with Zope.

Thanks, this is a useful info. I'm about to evaluate Django deeper
myself, how have you found it? Does it cover the whole "web" part of
the J2EE stack, at least? (i.e.: it can replace Tomcat)? How has your
experience been when you need to go further? (i.e.: beyond mapping data
in DB to webpages)?
So for development of Web-applications, I would certainly consider
either Zope or Django.
Both offer ways to store your data in a transactional database; Django
has some object-relation mapper tools but I'm not sure how exactly Zope
stores data in a SQL database (it comes with it's own powerful
object-database, the ZODB but I don't know if OR mapping tools exist
for Zope).

Hmm, I've never got the time to look at Zope proper, but my
understanding is that Django is analogous to Tomcat, and Zope is
analogous to a full blown appserver a la WebLogic, right?
So what are your requirements for 'J2EE' applications? And which Python
framework would best fit the bill?

Hmmm, it's purely web-based, and I don't foresee message queueing and
stuff at this point. I'll take a better look at Django.

Thanks!
Ray
 
B

bruno at modulix

Ray wrote:

(snip)
But then on the other hand, there is a manpower problem--it's damn easy
to find a Java programmer (although the quality that you get is a
different matter). Python programmers are more difficult.

Possibly - but if a programmer is not able to pick on Python in a matter
of days, then it's a bad programmer that won't be of any help whatever
the language. So in fact, choosing Python may help you get better
programmers !-)
You know what, this is a very good point :))




Yes, but this is more of a web application though--something that I've
never developed in Python before, so... I'll be evaluating Django
shortly--let me see how it compares to Tomcat.

You may also want to have a look at turbogears (roughly similar to
Django, but probably much more flexible)

My 2 cents
 
A

Adrian Holovaty

Ray said:
Yes, but this is more of a web application though--something that I've
never developed in Python before, so... I'll be evaluating Django
shortly--let me see how it compares to Tomcat.

Performance is one of the key features of Django. For example, I'm
using Django at washingtonpost.com for the U.S. Congress Votes
Database, which has more than 4 million records and is linked-to from
the washingtonpost.com home page whenever there's a key congressional
vote. (http://projects.washingtonpost.com/congress/)

The server doesn't break a sweat, thanks to Django's
very-convenient-and-powerful cache system:
http://www.djangoproject.com/documentation/cache/

Also, the developers at grono.net, a Polish social networking site with
more than half a million users, have converted various bits of their
Java code to Python/Django. They've found that Django is not only much
quicker (and more fun) to develop in, it's also *faster* than Java and
requires less hardware. E-mail me personally if you want their contact
information for direct testimonials; we'll be publishing some more
testimonials publically as we get closer to Django 1.0.

I would never use TurboGears or Ruby on Rails over Django for any
performance-intensive Web app. In my opinion, both frameworks make some
poor design decisions regarding the importance of performance.

Adrian
 
R

Ray

Very useful input, Adrian.

Thanks a lot! These are facts that I can use to convince people that
Python is a legit choice for the app I'm developing.

Warm regards,
Ray
 
R

Ray

bruno said:
Possibly - but if a programmer is not able to pick on Python in a matter
of days, then it's a bad programmer that won't be of any help whatever
the language. So in fact, choosing Python may help you get better
programmers !-)

You have a point there! :)
You may also want to have a look at turbogears (roughly similar to
Django, but probably much more flexible)

Hmm--much more flexible in what sense, Bruno?

Thanks much!
Ray
 
F

Fredrik Lundh

Adrian said:
I would never use TurboGears or Ruby on Rails over Django for any
performance-intensive Web app. In my opinion, both frameworks make some
poor design decisions regarding the importance of performance.

I hope you're aware that this sounds a lot like late 90's anti-dynamic-
language propaganda...

"I would never use Perl or Python over C++ for any performance-
"intensive Web app. In my opinion, both languages make some
poor design decisions regarding the importance of performance."

(you all know all the counter-arguments)

</F>
 
R

Ray

Fredrik said:
I hope you're aware that this sounds a lot like late 90's anti-dynamic-
language propaganda...

"I would never use Perl or Python over C++ for any performance-
"intensive Web app. In my opinion, both languages make some
poor design decisions regarding the importance of performance."

(you all know all the counter-arguments)

Does the comparison between dynamic and static language carry over to
comparison between Django and Turbogear too? Is this what is meant by
"Turbogear is much more flexible than Django"?

Thanks,
Ray
 
A

Adrian Holovaty

Ray said:
Does the comparison between dynamic and static language carry over to
comparison between Django and Turbogear too? Is this what is meant by
"Turbogear is much more flexible than Django"?

Nah, the difference is more than Django is a complete product whereas
TurboGears is a collection of unrelated parts glued together. For more
on this topic, see here:

http://www.oreillynet.com/pub/wlg/8986

Adrian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top