Solved

How to integrate BlazeDS with amfphp?

Posted on 2010-08-23
4
450 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
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

680 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