[Laszlo-dev] Persistent Connections
Sebastian Wagner
seba.wagner at gmail.com
Wed Apr 26 11:21:00 EDT 2006
hi,
To establish a persistent Connection via xmlsocket is not that hard .. you
can also push messages via LocalConnection to a native FlashSWF (and back to
LaszloApp) and do the XMLSocket-stuff within the FlashApp (so you can use
your favorite as2lib in the FlashApp). The hard thing about the XMLSocket is
that you have to handle "spontanious disconnected Clients" ... for example
if your ISP disconnects you or you just pull the networkcable out of your
Computer... their is sometimes a message in the XMLSocket "onClose" but
this is not really working ...
The most servers i know do something like sending a "ping" to the client
every minute und the client response with "pong" ...
Another possibilty to push Messages from Server to Client would be the
"NetConnection"-class.
regards
sebastian
2006/4/26, Fernando Germano <fgermano at gmail.com>:
>
> Ok, thanks, I'll try that too.
>
> Best Regards,
>
>
> On 4/25/06, Mo <mail at mo.virtual-bunker.de> wrote:
> >
> > hoi,
> >
> > just call the actionscript in a method. it's that simple.
> >
> > you might want to look at this page for a description of the xmlsocket
> > object:
> > http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary860.html
> >
> >
> > but be warned: it's not the "official openlaszlo way" to call
> > actionscript directly. but they said, they might come up with a socket
> > api too some time. i therefore keep all my socket stuff encapsulated in
> > an lzx class so i have no big trouble changing it later.
> >
> > have fun :-)
> >
> > greetings
> > - mo
> >
> > Fernando Germano wrote:
> >
> > >This is a very good idea..., but, how do I use the xmlsocket facilities
> > >from OpenLaszlo?
> > >
> > >Thanks you for your advice,
> > >
> > >
> > >On 4/25/06, Mo <mail at mo.virtual-bunker.de> wrote:
> > >
> > >
> > >>hoi,
> > >>
> > >>you might want to try out MINA, a java framework for network
> > >>applications, which is capable of supporting more than 10000 user
> > >>connections per server. combined with the xmlsocket facilities of the
> > >>flash player it might be exactly what you're looking for.
> > >>
> > >>greetings
> > >>- mo
> > >>
> > >>Fernando Germano wrote:
> > >>
> > >>
> > >>
> > >>>So, the conclussion about "Persistant Connections" is that they are
> > good
> > >>>
> > >>>
> > >>but
> > >>
> > >>
> > >>>there is no hardware capable of support a massive site, am I right?
> > >>>I'll be very interesting to see what's the max quantity of users a
> > simple
> > >>>server could handle (like the one that every hosting company has).
> > >>>
> > >>>And, if it is not practical to implement this mechanism, what would
> > be
> > >>>
> > >>>
> > >>the
> > >>
> > >>
> > >>>alternative?, maybe WebServices with some DB backend?
> > >>>
> > >>>On 4/24/06, Raju Bitter <rajubitter at web.de> wrote:
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>>Hi Adam,
> > >>>>
> > >>>>Thanks for the response. Had a discussion on OpenBC.com (European
> > >>>>bussiness
> > >>>>network) in the last few days. A company asked me why they should
> > use
> > >>>>OpenLaszlo if Flex licenses where so cheap. Well, a few posting and
> > a
> > >>>>
> > >>>>
> > >>few
> > >>
> > >>
> > >>>>days later I could convince them to consider switching from Flex to
> > >>>>OpenLaszlo. The question which came up there was if OpenLaszlo
> > supported
> > >>>>server-side pushing of data. So I checked the documentation and the
> > >>>>mailing
> > >>>>list. Actually the information in the documentation doesn't really
> > >>>>encourage
> > >>>>developers to use that feature. Your reply made the whole thing a
> > lot
> > >>>>clearer. Thanks!
> > >>>>
> > >>>>Besides that some prasing: The company using flex said they checked
> > >>>>OpenLaszlo a year ago. I told them how cool OpenLaszlo is and they
> > took
> > >>>>
> > >>>>
> > >>a
> > >>
> > >>
> > >>>>2nd look. The response was incredibly good: Word's fell like "After
> > >>>>rechecking OpenLaszlo now we are deeply impressed by the
> > improvements"
> > >>>>
> > >>>>
> > >>and
> > >>
> > >>
> > >>>>"We are about ready to uninstall Flex from our systems".
> > >>>>
> > >>>>If anyone is interested in following the discussion, here's the
> > link:
> > >>>>(sorry, only in German)
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>https://www.openbc.com/cgi-bin/forum.fpl?op=showarticles&id=1501616&articlei
> > >>
> > >>
> > >>>>d=1526650#1526650
> > >>>>
> > >>>>- Raju
> > >>>>
> > >>>>
> > >>>>-----Ursprüngliche Nachricht-----
> > >>>>Von: adam at laszlosystems.com [mailto:adam at laszlosystems.com]
> > >>>>Gesendet: Montag, 24. April 2006 17:12
> > >>>>An: Raju Bitter
> > >>>>Cc: OpenLaszlo development and bug reporting
> > >>>>Betreff: Re: [Laszlo-dev] Persistent Connections
> > >>>>
> > >>>>We have had customers deploy applications using this feature. In
> > these
> > >>>>cases
> > >>>>they used some pretty serious hardware and planned to never have
> > more
> > >>>>
> > >>>>
> > >>than
> > >>
> > >>
> > >>>>40 or 50 users online concurrently. The feature does work ok in
> > >>>>production;
> > >>>>the problem is that it scales horrendously.
> > >>>>
> > >>>>If you aren't stuck with port 80, then an alternative is to use the
> > >>>>
> > >>>>
> > >>Flash
> > >>
> > >>
> > >>>>XML Socket (which actually also supports plain text transmission.)
> > This
> > >>>>isn't officially supported within Laszlo right now, but it's likely
> > to
> > >>>>
> > >>>>
> > >>be
> > >>
> > >>
> > >>>>in
> > >>>>a future release.
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/h
> >
> > >>
> > >>
> > >>>>tml/wwhelp.htm?context=Flash_MX_2004&file=00001089.html#wp71517
> > >>>>
> > >>>>A
> > >>>>
> > >>>>
> > >>>>_______________________________________________
> > >>>>Laszlo-dev mailing list
> > >>>>Laszlo-dev at openlaszlo.org
> > >>>>http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>
> >
> > >>>------------------------------------------------------------------------
> > >>>
> > >>>_______________________________________________
> > >>>Laszlo-dev mailing list
> > >>>Laszlo-dev at openlaszlo.org
> > >>> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
> > >>>
> > >>>
> > >>>
> > >>>
> > >>
> > >>
> > >
> > >
> > >
> >
> >
>
> _______________________________________________
> Laszlo-dev mailing list
> Laszlo-dev at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
>
>
>
--
Sebastian Wagner
http://www.webbase-design.de
http://www.laszlo-forum.de
Bleichstraße 92
75173 Pforzheim
Tel.: 0177-7341829
Home: 07231-417456
seba.wagner at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20060426/3683a6ed/attachment.html
More information about the Laszlo-dev
mailing list