Wednesday, March 19. 2008
Trackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
In Soviet Russia, science isn't good enough for PHP!
(sorry)
(sorry)
#1
on
2008-03-19 19:57
I suggest to avoid PHP for computing intensive tasks because :
1. php is slow in computation (IMHO, at least 100 times less performant than C or Java)
2. there is no toolkit to do science in PHP (as you mentioned in your post)
3. there is no grid computing tool in php (if one day you need real computing power you will need grid computing)
I will suggest you to use web services in java and to do the web interface in PHP. And use asynchroneous web services (i.e you call a service which immediately answers that it will do the work and then you periodically call another service to keep you inform about the progress)
1. php is slow in computation (IMHO, at least 100 times less performant than C or Java)
2. there is no toolkit to do science in PHP (as you mentioned in your post)
3. there is no grid computing tool in php (if one day you need real computing power you will need grid computing)
I will suggest you to use web services in java and to do the web interface in PHP. And use asynchroneous web services (i.e you call a service which immediately answers that it will do the work and then you periodically call another service to keep you inform about the progress)
#2
on
2008-03-20 04:37
Python seems to be used a lot in the scientific community. And a quick look in the cheeseshop shows quite a few libraries.
http://pypi.python.org/pypi?:action=browse&c=385&c=388
http://pypi.python.org/pypi?:action=browse&c=385&c=388
@Chris:
#1 I'm not suggesting PHP should be used for computationally intensive tasks. In situations where what heavy lifting there is can be best handled by a database I don't see why PHP wouldn't be just as capable as Java, Perl or python. Modelling protein active site binding is out but data mining is definitely in.
#2 Presumably there was once a time when there weren't any toolkits in the other languages previously mentioned.
#3 This again goes back to comparing handling heavy computations and handling large datasets. PHP isn't a database but it has no problems with communicating with a large selection.
Most of the web services I've come across in my particular corner of the scientific community are synchronous. Having said that in my opinion your model for an asynchronous web service would be suboptimal. If requests do take a long time to process it would be much better if the web service contacted the requester when the query/analysis was complete rather than being constantly nagged. It reminds me somewhat of an annoying child on a car journey constantly asking, "Are we there yet? Are we there yet?"
@Rob: Strange to see you on this site. I just discovered your own site yesterday with your post on interacting with a clustering engine with PHP.
I haven't seen any examples of python being used. After making this post though I took another look at pubmed and found a few examples of PHP being used. It's likely that python is also being used and I simply haven't seen the examples yet.
It looks as though python has at least 17 packages, perl has 190+ and PHP has 3.
#1 I'm not suggesting PHP should be used for computationally intensive tasks. In situations where what heavy lifting there is can be best handled by a database I don't see why PHP wouldn't be just as capable as Java, Perl or python. Modelling protein active site binding is out but data mining is definitely in.
#2 Presumably there was once a time when there weren't any toolkits in the other languages previously mentioned.
#3 This again goes back to comparing handling heavy computations and handling large datasets. PHP isn't a database but it has no problems with communicating with a large selection.
Most of the web services I've come across in my particular corner of the scientific community are synchronous. Having said that in my opinion your model for an asynchronous web service would be suboptimal. If requests do take a long time to process it would be much better if the web service contacted the requester when the query/analysis was complete rather than being constantly nagged. It reminds me somewhat of an annoying child on a car journey constantly asking, "Are we there yet? Are we there yet?"
@Rob: Strange to see you on this site. I just discovered your own site yesterday with your post on interacting with a clustering engine with PHP.
I haven't seen any examples of python being used. After making this post though I took another look at pubmed and found a few examples of PHP being used. It's likely that python is also being used and I simply haven't seen the examples yet.
It looks as though python has at least 17 packages, perl has 190+ and PHP has 3.
I'm surprised to see PHP quoted as "slow" there for computation ... I can't speak authoritatively but I would be interested to see benchmarks showing PHP being slower than Java!
I think PHP is an excellent tool for data mining, although its not currently widely used in scientific areas. In other sectors, such as banking and manufacturing, its quite heavily used for quite similar tasks. I don't have any need for a package like this but I'd be interested to see one get off the ground.
I think PHP is an excellent tool for data mining, although its not currently widely used in scientific areas. In other sectors, such as banking and manufacturing, its quite heavily used for quite similar tasks. I don't have any need for a package like this but I'd be interested to see one get off the ground.
I use PHP for all my projects. It's easy to learn, great community and lots of reusable code can be found on the web.
I recently started using the Symfony framework which is awesome. It brings the fun back into scripting. All common coding tasks are build in... Symfony is great for prototyping and Agile methods as you have (viewable) results in matter of days often.
PHP may not be the fastest at runtime, but creating applications takes less than in Java or C.
I recently started using the Symfony framework which is awesome. It brings the fun back into scripting. All common coding tasks are build in... Symfony is great for prototyping and Agile methods as you have (viewable) results in matter of days often.
PHP may not be the fastest at runtime, but creating applications takes less than in Java or C.
"Is PHP good enough for science?"
Thats a very broad question and depends entirely upon the context of the problem that is to be solved. There is absolutely no reason PHP cannot be used for solving scientific problems. For example PHP is being used by NASA with qcodo (http://www.qcodo.com/view.php/mysql_2005_ppt I believe this is more for data mining).
Some of the statements above assume that all scientific applications use distributed/grid computing or computing intensive tasks. This is simply not the case.
C++ is faster than PHP, however the time to deliver and the resources involved is typically much greater than something written in PHP. PHP has its benefits and is great for delivering web applications, this is what it is designed for, however it also has its pitfalls.
There are ways to call synchronous and asynchronous remote services in PHP, however PHP typically has short life-cycle, and is not really recommended for long running processes.
Thats a very broad question and depends entirely upon the context of the problem that is to be solved. There is absolutely no reason PHP cannot be used for solving scientific problems. For example PHP is being used by NASA with qcodo (http://www.qcodo.com/view.php/mysql_2005_ppt I believe this is more for data mining).
Some of the statements above assume that all scientific applications use distributed/grid computing or computing intensive tasks. This is simply not the case.
C++ is faster than PHP, however the time to deliver and the resources involved is typically much greater than something written in PHP. PHP has its benefits and is great for delivering web applications, this is what it is designed for, however it also has its pitfalls.
There are ways to call synchronous and asynchronous remote services in PHP, however PHP typically has short life-cycle, and is not really recommended for long running processes.
I believe that PHP is not so much involved into science because it is also not to much involved into formal education process that science is part of and making it in the same time.
I believe that there is no good reason for that, also we can find lot of cases where PHP could be more appropriate than Java, C++ ...
I believe that there is no good reason for that, also we can find lot of cases where PHP could be more appropriate than Java, C++ ...
The author does not allow comments to this entry
