Solved

How to integrate BlazeDS with amfphp?

Posted on 2010-08-23
4
455 Views
Last Modified: 2012-05-10
I am trying to create a live auction with Flex Builder 4 and am looking show a database real-time.
0
Comment
Question by:jth_92
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 33501375
Well I doubt this will be possible at all. BlazeDS is a Java Implementation and therefore runs in a Java Servlet Engine. AmfPHP sort of sounds like PHP and this runs in an entirely separate container.
0
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 33501439
What exactly are you trying to do? It seems that AmfPHP is a PHP implementation of a lib able to read/write AMF format. This functionality is also included in BlazeDS as it speaks AMF out of the box. Are you trying to add real-time-features as provided by BlazeDS and Coldfusion to a php application? If yes, I would completely drop the BlazeDS approach and try to find some AMF Streaming Lib for PHP instead.
0
 
LVL 1

Author Comment

by:jth_92
ID: 33505830
My goal is to display data real-time from the database meaning that whenever the database updates the Flex datagrid updates as well. I tried using ColdFusion at first due to easy integration with Flex 4; however, I kept receiving errors and when I did set up messaging it was slow. I have successfully configured amfphp but am not sure if ColdFusion and BlazeDS would be more efficient if I configured it correctly.
0
 
LVL 20

Accepted Solution

by:
ChristoferDutz earned 500 total points
ID: 33505980
Well ... I think there is nothing more efficient than ColdFusion for what you are looking for. Especially when dealing with a lot of concurrent users. If you have only a few (not more than 50 or so) you are good to go with BlazeDS (ColdFusion can handle Non-Blocking-IO, BlazeDS Blocks one thread per user ... making you run out of HTTP-Threads after some logins). I doubt that AMFPHP will get you on the way ... I guess the reason that ColdFusion was slow, was a configuration error on your side.

Colf Fusion and BlazeDS allow mutliple types of communication ... Starting with Polling AMF which polls the Server every 2 or 3 seconds. The next realtimisher option is Long polling (causing the client so start a request ... the server halts the response and responds only if there is something to be sent ... after the response, a new request is sent by the client ... waiting until new news arrives (This option blocks a HttpThread of the Webserver). The Coolest (my oppinion) is the Streaming AMF type, which also blocks an entire HttpThread ... it opens a socket and allows for bi-directional events to be sent in realtime. I guess this is what you were looking for.

The main difference between BlazeDS and Coldfusion are the capability of ColdFusion being able to server allmost an indeffinite number of client while BlazeDS quits at the number of HTTP Threads configured by the Servlet Engine you are using ... but for the price of a ColdFusion you can certainly puchase a really nice new Car with a really good stereo ;-)

If you're not stuck to PHP and you don't expect a large number of clients I'd stick to BlazeDS and if you do have a lot of concurrent users you I think there is no better option than Coldfusuion.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
This article discusses how to implement server side field validation and display customized error messages to the client.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question