Solved

How to integrate BlazeDS with amfphp?

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now