ExternalConnection/LocalConnection - Sync/Async issue.

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

ExternalConnection/LocalConnection - Sync/Async issue.

sledorze
Hi!

ExternalConnection is synchronous and Localconnection is Asynchronous.
I was first thinking using two flash component in order to perform cross domain communication but, even if it works to send events; I cannot retrieve results du to this mismatch.
The only thing that I can do is building another event based layer on top of that to be able to communicate effectively.

Has it already be done?
Is there a better way to do some cross domain communication?

Thanks!
Stephane
Reply | Threaded
Open this post in threaded view
|

Re: ExternalConnection/LocalConnection - Sync/Async issue.

Nicolas Cannasse
Le 05/04/2011 10:03, sledorze a écrit :

> Hi!
>
> ExternalConnection is synchronous and Localconnection is Asynchronous.
> I was first thinking using two flash component in order to perform cross
> domain communication but, even if it works to send events; I cannot retrieve
> results du to this mismatch.
> The only thing that I can do is building another event based layer on top of
> that to be able to communicate effectively.
>
> Has it already be done?

You can use AsyncAdapter that transform a Connection into an
AsyncConnection.

Personally I find LocalConnection very bad for communications, they are
not very reliable in terms of delay for message delivery. Going through
JS is usually better.

Best,
Nicolas

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: ExternalConnection/LocalConnection - Sync/Async issue.

sledorze
Hi Nicolas!

Thanks for the answer;
Indeed, I've observed some lag since I've introduced this communication scheme.

About your solution (If I understood well) this does not solve the issue as I would also need an async to sync solution 
also to perform call with results.
If is implemented locally it would result in a blocking wait (even dunno how it would perform in flash vm).
On a higher level API it could be done with two ways message passing.


As for pure JS cross domain communication (what is really my primary need), each time I'm googling for it; I find a lot of different solutions that looks like workarounds with specific browser issues.
I need a reliable cross domain communication (i.e. which works on all browsers).

What solution fulfill those needs? Any pointer?

Thanks!
Stephane


On Tue, Apr 5, 2011 at 10:21 AM, Nicolas Cannasse [via Haxe] <[hidden email]> wrote:
Le 05/04/2011 10:03, sledorze a écrit :

> Hi!
>
> ExternalConnection is synchronous and Localconnection is Asynchronous.
> I was first thinking using two flash component in order to perform cross
> domain communication but, even if it works to send events; I cannot retrieve
> results du to this mismatch.
> The only thing that I can do is building another event based layer on top of
> that to be able to communicate effectively.
>
> Has it already be done?
You can use AsyncAdapter that transform a Connection into an
AsyncConnection.

Personally I find LocalConnection very bad for communications, they are
not very reliable in terms of delay for message delivery. Going through
JS is usually better.

Best,
Nicolas

--
haXe - an open source web programming language
http://haxe.org



If you reply to this email, your message will be added to the discussion below:
http://haxe.1354130.n2.nabble.com/ExternalConnection-LocalConnection-Sync-Async-issue-tp6241444p6241479.html
To unsubscribe from ExternalConnection/LocalConnection - Sync/Async issue., click here.



--
Stéphane Le Dorze

Tel: +33 (0) 6 08  76 70 15


Reply | Threaded
Open this post in threaded view
|

Re: ExternalConnection/LocalConnection - Sync/Async issue.

Baluta Cristian
I had no problems with JS. One year and a half ago i've tried with localconnection something on osx, it was simply not working, neither samples from the internet.

On Tue, Apr 5, 2011 at 12:04 PM, sledorze <[hidden email]> wrote:
Hi Nicolas!

Thanks for the answer;
Indeed, I've observed some lag since I've introduced this communication scheme.

About your solution (If I understood well) this does not solve the issue as I would also need an async to sync solution 
also to perform call with results.
If is implemented locally it would result in a blocking wait (even dunno how it would perform in flash vm).
On a higher level API it could be done with two ways message passing.


As for pure JS cross domain communication (what is really my primary need), each time I'm googling for it; I find a lot of different solutions that looks like workarounds with specific browser issues.
I need a reliable cross domain communication (i.e. which works on all browsers).

What solution fulfill those needs? Any pointer?

Thanks!
Stephane


On Tue, Apr 5, 2011 at 10:21 AM, Nicolas Cannasse [via Haxe] <[hidden email]> wrote:
Le 05/04/2011 10:03, sledorze a écrit :

> Hi!
>
> ExternalConnection is synchronous and Localconnection is Asynchronous.
> I was first thinking using two flash component in order to perform cross
> domain communication but, even if it works to send events; I cannot retrieve
> results du to this mismatch.
> The only thing that I can do is building another event based layer on top of
> that to be able to communicate effectively.
>
> Has it already be done?
You can use AsyncAdapter that transform a Connection into an
AsyncConnection.

Personally I find LocalConnection very bad for communications, they are
not very reliable in terms of delay for message delivery. Going through
JS is usually better.

Best,
Nicolas

--
haXe - an open source web programming language
http://haxe.org



If you reply to this email, your message will be added to the discussion below:
http://haxe.1354130.n2.nabble.com/ExternalConnection-LocalConnection-Sync-Async-issue-tp6241444p6241479.html



--
Stéphane Le Dorze

Tel: +33 (0) 6 08  76 70 15




View this message in context: Re: ExternalConnection/LocalConnection - Sync/Async issue.

Sent from the Haxe mailing list archive at Nabble.com.

--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: ExternalConnection/LocalConnection - Sync/Async issue.

sledorze
Great!
How are you then performing this cross domain JS communication? (I am using an IFrame pointing to another domain).
Thanks!
Stephane
Reply | Threaded
Open this post in threaded view
|

Re: ExternalConnection/LocalConnection - Sync/Async issue.

alexander.konotop
В Tue, 5 Apr 2011 02:50:19 -0700 (PDT)
sledorze <[hidden email]> пишет:

> Great!
> How are you then performing this cross domain JS communication? (I am
> using an IFrame pointing to another domain).
> Thanks!
> Stephane
>
>
> --
> View this message in context:
> http://haxe.1354130.n2.nabble.com/ExternalConnection-LocalConnection-Sync-Async-issue-tp6241444p6241708.html
> Sent from the Haxe mailing list archive at Nabble.com.
>

For example, I'm using "Allow-origin" header which the server
returns to browser.

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: ExternalConnection/LocalConnection - Sync/Async issue.

sledorze
MMmmmm...

In fact; I've found something relevant for my use case I'll post for everybody..
Reply | Threaded
Open this post in threaded view
|

Re: ExternalConnection/LocalConnection - Sync/Async issue.

graham
In reply to this post by sledorze
Graham is out of the office until Monday 11th of April.



--
haXe - an open source web programming language
http://haxe.org