我们正在为 www 设计一个主要的网络应用程序。
它是一个社交社区网站。我想知道我需要采取的女巫方向。
flex 和 php 还是 java 和 flex 哪个更快?
我读到,flex 和 php 与 amfphp 的速度非常快(使用 AMFEXT)。
但我看到欧洲 90% 的大公司都在雇佣 java/flex 开发人员来开发主要的 Web 应用程序。
我们的应用程序需要同时处理大量用户。
我们的应用程序将托管在数据中心,稍后将由主要的 CDN 提供商托管。
我们的应用程序有一个视频(流媒体和渐进式流媒体)、一个购物中心和一个社区区域。
由于我们业务模式的性质,我们认为我们的应用程序每天会吸引大量用户。
所以我们必须有一个运行速度非常快的网络应用程序。拥有强大的后台技术。 Java 或 PHP(amf 支持)
对于数据库:
我们将从 mySql 开始,然后切换到 oracle,然后切换到 sas。
我们的应用正确的方向是什么?
flex 和 java 还是 flex 和 php?
We are designing a major webapplication for the www.
It a social community site. And I would like to know witch direction I need to take.
What works faster, flex and php or java and flex?
I've read that flex and php with amfphp is very fast (with AMFEXT).
But I have seen that 90% of the major companies here in Europe are hiring java / flex developers to develop major webapplications.
Our application needs to handle a lot of users at the same time.
Our application will be hosted in a datacenter later it will be hosted by a major cdn provider.
Our application has a video (streaming and progressive streaming) a shoppingmall and a community area.
Due to the nature of our business model we think that our application will attract a lot of users a day.
So we must have a webapplication that works very fast. With a strong technology on the backend. Java or PHP (amf support)
for the Database:
We will start with mySql and make the switch to oracle and then to sas.
What is the right direction for our application?
flex and java or flex and php?
发布评论
评论(6)
我不知道哪个提供“更快”的执行 - 但是,我确实知道“更快”并不是选择语言的唯一原因。 这是 Java 和 PHP 的一般比较 和 这是另一个比较 Java、PHP 和 Ruby on Rails 的内容 - 两者都没有关注关于执行“更快”的语言。
尤其是使用 Flex - 您很可能会花费更多时间在 Flex 中执行而不是在支持服务器端语言中执行。此外,由于应用程序是 Flex - 应该可以在 PHP 和 Java 中提供类似的测试实现,并比较特定应用程序的结果。
选择的最大部分是开发人员熟悉的语言和平台。
I have no idea which provides "faster" execution - however, I do know that "faster" isn't the only reason to choose a language. Here's a general comparison of Java and PHP and here's another that compares Java, PHP and Ruby on Rails - neither one focuses on the language executing "faster".
Especially with Flex - you will most likely spend more time executing in Flex rather than in the backing server side language. Also, since the application is Flex - it should be possible to provide similar test implementations in PHP and Java and compare the results for your specific application.
The biggest part of the choice would be whatever language and platform your developers are familiar with.
这是一个非常主观的问题。我相信 PHP 往往会更快一点,但这实际上取决于您的应用程序需求。从个人经验来看,我已经能够使用 PHP 用更少的代码完成更多的工作。 Java 有一个更严格执行的面向对象的方法,这实际上非常好,而 PHP 在这方面仍然缺乏一些。在大多数情况下,您将能够使用两种语言完成相同的事情。我还认为 PHP 比 Java 有更好的社区驱动支持,这可能是一个因素。这实际上完全取决于你们最舒服的方式。这两种语言都可以很好地与 Flash/Flex 配合使用。
This is a pretty subjective question. I believe that PHP tends to be a little bit faster but it really sort of depends on your applications requirements. From personal experience, I have been able to get more done with less code with PHP. Java has a much more strictly enforced object oriented approach which is actually quite nice whereas PHP is still lacking a bit in this area. For the most part, you will be able to accomplish the same things with both languages. I also feel that PHP has much better community driven support then Java which could be a factor. It really all depends on what you guys are most comfortable with. Both languages play well with Flash/Flex.
就纯执行时间而言,Java 比 PHP 更快。下面是一个有趣的算法性能比较,对多种语言进行了排名,显示 Java 比 PHP 快大约 300 倍:
http://blog.dhananjaynene.com/2008/07/performance-comparison-c-java-python-ruby-jython-jruby- groovy/
话虽如此,这并不是现实应用程序速度差异的一个很好的近似值。主要瓶颈通常是您的数据库。但是,如果您的应用程序需要大量处理,而数据库中没有进行这些处理,那么您可能会发现 Java 的性能有所提高。
远程处理方面的一个优势是 Adobe 提供 Blaze DS,它是 Flex 的 AMF 标准实现。它们还包括一些消息传递功能(“数据推送”),我不认为这些功能是在 AMFPHP 中实现的。
Java is faster than PHP in terms of pure execution time. Here is an interesting algorithm performance comparison that ranks a number of languages, showing Java to be approximately 300 times faster than PHP:
http://blog.dhananjaynene.com/2008/07/performance-comparison-c-java-python-ruby-jython-jruby-groovy/
With that said, this is NOT a good approximation of the speed differences for real-world applications. A major bottleneck will typically be your database. However if your application requires a lot of processing that doesn't occur in the database, you may see performance improvement with Java.
One advantage in terms of remoting is that Adobe offers Blaze DS which is a standard implementation of AMF for Flex. They also include some messaging capabilities ("data push") which I don't believe are implemented in AMFPHP.
就速度而言,语言选择很大程度上(尽管不是完全)无关。两者都构建了非常大的部署,速度因素来自良好的架构和代码。因此,无论您使用 php 还是 java,希望有优秀的架构师/设计师/开发人员精通所涉及的性能编写方式。
Language choice is largely (though not entirely) irrelevant in terms of speed. Very large deployments have been built on both, and the speed factor comes from good architecture and code. So whether you go with php or java, hopefully there are good architects/designers/developers versed in the ways of writing for performance involved.
Java 总是比 PHP 快,除非你做错了什么!
但是...
用户不会真正注意到服务器端脚本的速度,因为许多其他因素会增加从服务器获取响应所需的时间(网络延迟、传播延迟等)。对于用户来说,PHP 和 Java 看起来同样快。
然而,对于服务器来说,是有区别的。根据您的帖子,您计划拥有许多并发用户。如果每个用户使用 PHP 完成请求的时间延长 20%,那么 PHP 可以处理的并发用户数就会减少 20%。因此,如果您担心服务器会填满并以最大容量运行,那么我会选择 Java。如果您预计这种情况在很长一段时间内不会发生,那么我会仅根据性能选择 PHP。
当然,还有其他事情需要考虑,例如您可以使用每种语言做什么、可用的库、可用的开发人员/您对每种语言的了解程度。
我还强烈建议不要在系统启动并运行后更改任何后端。如果您一开始使用 MySQL,请不要中途更改为 Oracle。除非不可能,否则要么坚持使用 MySQL,要么从头开始使用 Oracle。
Java is always going to be faster than PHP, unless you have done something very wrong!
BUT...
The speed of the server side script won't really be noticed by the user, because so many other things add to the time it takes to get a response from the server (network delay, propagation delay, etc). To the user PHP and Java will seem equally fast.
To the server, however, there is a difference. According to your post you plan to have many concurrent users. If each user takes 20% longer to complete a request with PHP, then PHP can handle 20% fewer concurrent users. So if you worry that the server will fill up and run at maximum capacity, then I would pick Java. If you don't expect that to happen for quite a while, then I would pick PHP, based solely on performance.
Of course there are other things to take into account, like what you can do with each language, libraries available, developers available to/how well you know each one.
I would also strongly advice against changing anything backend once the system is up and running. If you start out with MySQL, don't change to Oracle half way. Either stick to MySQL, unless it becomes impossible, or start using Oracle from the beginning.
我想说,通过为每种语言做一个原型(例如 3-4 页)来尝试两者,并运行一些性能测试,总体来说应该不会超过一周来完成这些。
每种语言都有自己的优点/缺点。
I would say, try both by doing a prototype ( e.g 3-4 pages ) for each language, and run a few performance test , overall should not take more than one week to do these.
Each language has its own pros / cons.