Solved

How to integrate BlazeDS with amfphp?

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Title # Comments Views Activity
How do use '  ' within this code? 4 41
[form-control] Retain values after a POST action 21 68
Group By Function Required in PDF Output 21 58
Joomla Editing 3 17
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

740 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