Implementing Server Push using LCDS 2.6
Hi All,
We have created an application where we are using polling to get certain constant updates. Now this polling is client polling wherein the client polls the server at regular intervals to get the fresh data for certain actions.
Now we wish to take this to another level and implement Server Data Push so that the client does not keep polling unnecessarily and the server notifies the client as and when the data gets updated with the server. For this we have the DataService Transaction class that needs to be implemented.
But there are a couple of questions that are in my mind regarding this technology. It would be great if someone could answer them.
My questions are:
1) Does the LCDS server know which client to push data to in case of multiple clients looking at the same data scenario. e.g. Two clients A and B are looking at the same data. A performs an action and that action needs some time to get completed at the server. Now in case we use Server Data Push, will the LCDS be intelligent enough to send the message on completion of the requested activity to only A and not B.
2) In order to push data to the client, the server will invoke some method which will return the desired data to te client. How do we keep the parameters registered with the server that this method would need while getting invoked. SInce, the call to the method will not be client initiated, how does the server know what parameters to be passed to the method in order to invoke it. How will this work in a multi-user looking at the same data/screen scenario.
The answers to these questions will really help us. In case anyone is well versed with this technology, please pitch in to give your inputs.
Many Thanks.
Regards,
Shally
Hi,
As also, suggested by you, we were thinking of using an RTMP channel only for this since its a two way socket that establishes a communication channel between the client and the server and then helps keep messages moving to and fro.
We have successfully implemented RTMP channel and achieved the following functionalities.
1) A client initiated change which gets propagated to the server and then to all the clients.
2) Server push to all the clients.
Now our last step is to implement data push to a particular client. As told by you, we will use the client id but we have some doubts and questions regarding this since we do not have the code examples or anything that could help us in implementing the same.
I would therefore request you to kindly lead us on the following fronts:
1) Is the client id the one that is part of the request- response thread, I saw a client id being printed in the logs when a request is made and the response comes.
2) What code needs to be written on the server side to extract this client id once a call is made so that it can keep this client id with itself to push a message later on.
3) What methods or API are available to be used to push this message to a particular client? Do we need to call the fill method of a particular client using the client id parameter and inform the client that its requested job has been done.
For (3) is the Messaging(Publish and Subscribe model) the right way to go??
It would be great if you could provide us some code snippets just to give us an idea from where we can take it up ourselves.
Looking forward to hear from you.
Many Thanks,
Shally
Message was edited by: testing34
Similar Messages
-
Which tech can replace applet to implement server push model
We have implemented server push real-time datas to client with Applet+JSObject. but there is a thing we can not do well. When some users have intalled jre not same with our default, the applet run fail. So we are finding another tech to implement server push model.
Any suggestions!
client polling to emulate server push is cancelled.
Thanks very much!linuxhippy wrote:
well you can do it with polling - i have implemented such a system and it works very well.how many clients do your system support ?
polling period ?
what third-party libs ? -
How can i implement a server push in my jsp pages?
any sample code would be appreciated.
The server pushes the data to the jsp when the
database changes because of an update.
ThanksHttp is a stateless protocol and cannot maintain a connection to the server. I am working on a project now that has the same type of requirement and we are using pushlet technology. You should have a look at the following
www.pushlets.com
Hope this helps
SD -
Server Push pushing data to clients
Need some ideas.
I have been hunting around for info on a simple/clean method
to push data out to clients. Client could be a Java application or maybe an applet. Solution must easily go through firewalls
In either case I want the client to startup, register with the server
and start receiving data. Without further user intervention.
Whatever, scheme is used must be able to deal with network
disconnects.
I have looked at Pushlets, the article was 2 years old and I don't see
any recent postings on Pushlets. So maybe that is not the way to go.
I guess my other choice is JMS. SonicMQ?
Server Push using Netscape?
Or are there other options.
Many thanks for your feedback.
KDHave you considered J2ME.
J2ME and WAP Push can be complementary. but for WAP Push to work the devices or the browsers in the devices have to be WAP 1.2 complaint.
more details can be found at http://devforum.openwave.com
hope this helps.
williams -
Server push with Javamail: idle() blocks
Hi,
today I tried to implement server push functionality in my mail application via Javamail.
I did this by calling the following method everytime Javamail creates a new Folder instance for me:
private void activateServerPush(Folder f) {
if (f instanceof IMAPFolder) {
final IMAPFolder ifo = (IMAPFolder) f;
ifo.addMessageCountListener(new MessageCountListener() {
@Override
public void messagesAdded(MessageCountEvent arg0) {
DebugPrinter.print(this, "messagesAdded event called");
clear(false, true); // Clear cache
onMessageCountChanged();
@Override
public void messagesRemoved(MessageCountEvent arg0) {
DebugPrinter.print(this, "messagesRemoved event called");
clear(false, true); // Clear cache
onMessageCountChanged();
MyThread thread = new MyThread() {
@Override
public void run() {
while (true) {
DebugPrinter.print(this, "Before idle");
try {
ifo.idle();
DebugPrinter.print(this, "After idle");
} catch (MessagingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
DebugPrinter.print(this, "After idle try");
// Start thread
ServletThread.EXECUTOR_SERVICE.submit(thread);
}Now, when I run the code above, I only get "Before idle" as output.
The rest won't be printed so it seems like idle() is blocking.
Also, the event listener messagesAdded(...) are not called. I tried this by sending an email to myself but nothing happens.
What's wrong?Hi Bill and thanks for your reply.
How does the idle command (line) look line in the debug output?
I simply did a full text search for the word "idle" (ignore case) of everything that got printed to console and only found this:
DEBUG: mail.imap.minidletime: 10
* CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS AUTH=PLAIN AUTH=LOGIN
A2 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in
Also, I noticed that the line "Before idle" (See source code in my initial posting here) gets printed but AFTER that line I can't find anything else that could refer to the idle command.
When I leave Apple Mail (my default native email client on my computer) open, the email that I sent gets correctly (instantly) pushed. -
Error getting while implementing server proxy
Hi All,
I am implementing server proxy using synchronous inbound message interface.I am trying to get the purchage order details from SAP.I am giving input as PO number.While getting output of multiple rows it is showing only one row.that is the problem.If i can change the occurence of output fields its getting syntax error.
how can i get the multiple row items from that synchronous proxy.please give me any suggestions.
thanks,
Kishan.Hi Shabarish,
Thanks for reply.If i can change the occurence in outout structure at the time the output is not assigning to the output fields.This is getting syntax error.
The interface is working only for 1 occurence.
I am assigning the output like this..
<b>output-ES_TARGET_MSG_TYPE-ITEM-PONUMBER = it_EPSS-PONUMBER.</b>
here it_EPSS is the table.
ITEM-PONUMBER is the output field.
thanks,
Kishan. -
Using the new Data/Services generation with server push
Have moved my Flex/BlazeDS app (which uses Blaze AMFChannel for request/response messages and StreamingAMFChannel for server push messaging) from Flex Builder 3 to Flash Builder 4. The new Data/Services works fine to generate service classes and value objects for the request/response messages, question is can it provide any help setting up a messaging consumer and value objects for the pushed data?
rick hollandI am so sorry - I meant AirPort Express - not extreme - but it's moot since I missed the point of your post - you want two outputs - and one to not be digital.
For what it's worth - I still think the express might be your best bet.
http://www.apple.com/airportexpress/airtunes.html
It has combined digital/analog out - you plug in one and it switches the output depending on which connection is inserted. I would expect a very short wait until everything accepts digital input - expecially for people who want good sound quality. If you have to go digital to analog outside of the receiver/amp (where it really belongs) - why not let it be the express sitting right next to where you want the second "receiver" to be... -
How to use server push technology
I need to write a Chatroom by using Server-push technology. Who would like to offer some information about this technology for me? Thanks!!
Define "server-push" technology.client-pull is where the client pulls, via a specific request, information from the server.
Server-push is where the server pushes information to a client when that information becomes available. The client does not initiate the exchange. -
I read somewhere that Flex Data Services provides Server-Push
functionality. That is, the server starts a conversation with the
client. It's obvious that, In order to such thing ocurr, there has
to be a persistent connection between server and client.
I've being reading about Data Management Service to learn how
to implement this Server-Push and all I see is about a method
called Fill() that is thriggered from the client and syncronizes
it's data with the server. But it's not server-push
Does it really exist?Hi,
When you create a DataService and fill your collection. The
collection becomes managed. You don't have to call fill again if
there is any change in the data. Server pushs updates to clients
when the client's dataservice is using rtmp channel. It is a live
connection between the server and the client. For example,
you fill(collection, "hqsql", from products where price <
100). If one of the product's price increases, server push a
message to your collection to remove it. If a product's product's
price decrease, it will be added to the collection. The push is
happened based on your fill method.
William Chan -
FDS for server push + client to client
Just want to double check - if I was to create a chat like
app in Flex - where new messages are "pushed" to clients, this
would require FDS.Using FDS would be the far easiest way to implement a chat
application.
Theoretically you could implement a chat application without
FDS by having each client poll the server for messages for new
messages for that client using HTTPService or WebService.
You can also do "poor man's data push" using a long-lasting
HTTP request - in this pattern each client posts an HTTP request
that it doesn't expect and immediate response to - when the server
has a message for the client is sends the response (perhaps a long
time later). In the client's event handler for the response the
client posts another request (so that the server has a means of
"pushing" data to the client). This is how Blackberry-style email
works in Windows Mobile (in the absence of a proper data push
protocol).
Sean
Neville's Introduction to the Flex Message Service has a good
example of how to write a chat application in FDS.
Graeme Harker's Flex.NET
Blog -
Server Push Intermittent message loss
We are using LCDS 2.6 and using the RTMP port for the server push. However, at times the notifications in between the server to clients goes missing. It works pretty good at times and after some time, it does not shows notification.
We are using DataTransactionServices for pushing the data from LCDS to the Flex clients.Hello,
We are still facing the intermittent issue with LCDS. Following steps has been done:
1. We tried different values in DataDestination property like autoSyncEnbaled , cache items and some other properties, but it did not work.
2. We analysed LCDS logs in log file and found that :
a. Java Code is pushing updated state to LCDS and message is also routing to client.
b. At client side UI is receiving old data from LCDS.
Do you have any idea, why is this happening?
Gaurav Shukla
Senior Technical Architect -ADCOE
HCL Technologies Ltd.
SEZ, Plot No. 3A, Sector 126, Noida 201301, U.P. (India)
Mob: +91-9899 89 9189
www.hcltech.com<http://www.hcltech.com>
www.hcl.com<http://www.hcl.com>
cid:[email protected] -
Hi AnyOne!
I have a servlet, and a database . If a column in my table gets updated I
want all of my clients who are connected to it , to see the refreshed value
without click any refresh/Reload button on the browser. A kind of
Server-Push.
That is, If one client makes changes, then all of the other clients on the
web should get intimated.
How can I achieve this ?
thanks
vikas
I read the OP's message and imediately thought oh, cool, MVC candidate :-) If I wanna talk about MVC I would prefer Sun's Design Patterns group.
Kumar.
[email protected] wrote:
> "Mettu Kumar" <[email protected]> wrote in message
> news:[email protected]...
> > Ryan,
> >
> > I was not commenting on MVC pattern. I am talking about the problems
> > pushlets implementation could potentially cause.
>
> Mettu, we completly crossed paths my friend. I read the OP's message and
> imediately thought oh, cool, MVC candidate :-) Silly me! I understand what
> you are talking about now :-)
>
> > 1. If you are serving 10,000 clients, probably a given instance your
> server will
> > be serving 100 or 1000 of the them. but with pushlets you have 10, 000
> > conenctions open siumultaneously and your server is serving all the client
> 100%
> > of the time.
>
> No, you're right that isn't good.
>
> > Do you think this would scale? Imagine the number of threads on server.
> > 2. This could potentially bring down the web server you are using.
> >
>
> It would scale right up to the time the server came crashing down :-) Yes,
> if the server kept a single connection, thread of execution, open to every
> client while the client was running that would be not so hot indeed,
> especially if your clients increased exponentially. This is precisely why I
> like the callback method on each client, kind of a pain to implement though.
>
> >
> > Kumar.
> >
> > [email protected] wrote:
> >
> > > I wasn't referring to the article on pushlets you mentioned when I said
> the
> > > idea of MVC was a valid one, nor have I read the article as I respond
> but
> > > heres the idea I was describing which is based on the concept of MVC.
> It
> > > provides perfectly for the scenario the OP described IMO. I think, at
> least
> > > based on what I've seen, that the notion of MVC in the J2EE sector is
> used
> > > mostly as a means to seperate business logic from presentation logic.
> It
> > > doesn't allow for any mechanisms to notify the ``views" when data
> ``model"
> > > changes. This is no big deal I guess for most applications but it does
> > > break the MVC paradigm IMO. To aleiviate this problem we incorporate an
> > > observer pattern to notify each subscribing view when the model changes.
> > > There really isn't any difference in my mind between push and pull where
> > > pull is a standard RFC 2616 request and push is a simple callback to the
> > > object registered with the controller (servlet, jsp). If the server can
> > > handle a thousand or so concurrent requests why couldn't it handle a
> > > thousand concurrent callbacks. You could probably improve this by
> > > multi-threading the controller. Just some thoughts I would like to hear
> > > yours :-)
> > >
> > > ~Ryan
> > >
> > > "Mettu Kumar" <[email protected]> wrote in message
> > > news:[email protected]...
> > > > Ryan,
> > > >
> > > > Did you ever try to use to Pushlets serving thousands of clients?
> > > > Why did you think its a good design? If you feel its a good design,
> let
> > > us
> > > > know whats good about it.
> > > >
> > > > Kumar.
> > > >
> > > > [email protected] wrote:
> > > >
> > > > > "Mettu Kumar" <[email protected]> wrote in message
> > > > > news:[email protected]...
> > > > > > Vikas,
> > > > > >
> > > > > > There was a article about the same in java world a while back.
> > > > > > http://www.javaworld.com/javaworld/jw-03-2000/jw-03-pushlet.html
> > > > > >
> > > > > > But I believe this is bad design. I don't think using opened HTTP
> > > > > Connections
> > > > > > to do a real time operation is not a good Idea. What if you are
> > > serving
> > > > > couple
> > > > > > of hundred clients?
> > > > > >
> > > > > > Kumar.
> > > > > >
> > > > >
> > > > > It's a perfectly valid design. OP, check out MVC and the observer
> > > design
> > > > > pattern I think you'll find what you're looking for there.
> > > > >
> > > > > ~Ryan
> > > > >
> > > > > > Vikas Jolly wrote:
> > > > > >
> > > > > > > Hi AnyOne!
> > > > > > >
> > > > > > > I have a servlet, and a database . If a column in my table gets
> > > updated
> > > > > I
> > > > > > > want all of my clients who are connected to it , to see the
> > > refreshed
> > > > > value
> > > > > > > without click any refresh/Reload button on the browser. A kind
> of
> > > > > > > Server-Push.
> > > > > > > That is, If one client makes changes, then all of the other
> clients
> > > on
> > > > > the
> > > > > > > web should get intimated.
> > > > > > >
> > > > > > > How can I achieve this ?
> > > > > > >
> > > > > > > thanks
> > > > > > > vikas
> > > > > >
> > > >
> > > >
> >
-
How can I implement GCM push notifications in AIR?
How can I implement GCM push notifications in AIR? How can I implement GCM in Android using flex?
You have 2 ways, first is buy the ane, are alot such as: http://myappsnippet.com/gcm/ or review the open in: https://github.com/freshplanet/ANE-Push-Notification or http://afterisk.wordpress.com/2012/09/22/the-only-free-and-fully-functional-android-gcm-na tive-extension-for-adobe-air/ , that for client side, for server side you can buy in http://urbanairship.com/ or enter in the world of build your own pisblisher server, in this case you need to read android and ios and blackberry notification, each one has different methods.
Also, here you have more information: http://forums.adobe.com/message/4626292
looks good. -
We are facing an issue while using LCDS 3.1 running under JDK1.6 in Sun Solaris v5.10 OS & Adobe Flex 4.
Scenario :-
===================================
As part of our Flex-based client-server application (with Java backend) we have a performance report generation module. Following flex framework class is used to calculate the performance of various layer of a typical server-based request-response cycle.
; (available in rpc.swc library file)
(for example : server time, cairngorm time, UI screen rendering time, UI event generation time etc).
The totalTime was working properly before upgrading the rpc.swc to Flex 4 ; However it broke after migrating to Flex SDK 4; The totalTime is now coming as negative junk value.
As we understand that the above Flex framework class method works in conjunction with LCDS running at server side on JDK.
We suspect that the new rpc.swc taken from Flex SDK 4 is causing the issue !
System information :
Web Server : Weblogic 11G
Operating System : Sun Solaris v5.10 OS running on Sparc hardware.
Flex : Adobe Flex sdk 4.0
Flash player : Adobe Flash Player 10
Browser : Internet Explorer 8
LCDS : 3.1
JDK : JDK 1.6.0_14
===================================
Has anyone faced similar problem before ? Any help or direction would be highly appreciated.
Thanks in advance,
Rabi
mx.messaging.messages.MessagePerformanceUtils :totalTimeNothing has changed in the Flex SDK sources for this class since sometime around 2008. Are you running against the same LCDS server as you were before you updated to Flex 4? This certainly seems strange (and bad). Do you see the same behavior with Flex 4.5? What was the version of Flex you were using before switching to Flex 4.0?
If you can provide the additional information, we will look in to this. A reproducable case that was a simple mxml application along with a simple destination config would help us narrow the problem.
Sorry for the problems!
Tom -
I tried to implement photo albums using iweb and got a publishing error.
I tried to implement photo albums using iweb and got a publishing error. All was fine with my site until I added the photo album page. The software doesnt say what the error is exactly, only that it is a publishing error to my ftp
Exact message "There was an error communicating with the FTP server. Try again later, or check with your service provider."
If I reduce the albums inside to 1 then it seems to work but that takes away from the usefullness of multiple albums.
my iWeb version is 3.0.4 (601)Publish your site to a folder on your hard drive to see if the publication will proceed successfully and open the site locally with your browser to confirm all of the alums are there and work. If they do try the following:
delete the iWeb preference files, com.apple.iWeb.plist and com.apple.iWeb.plist.lockfile, that resides in your Home() /Library/Preferences folder.
go to your Home()/Library/Caches/com.apple.iWeb folder and delete its contents.
Click to view full size
launch iWeb and try again.
If you're still not able to publish from iWeb to your server download and use the free Cyberduck to upload your website files to the server. Users have found that CD has been successful when iWeb had problems.
OT
Maybe you are looking for
-
Cant turn I phone on
-
Dear all, Am using cisco 2921 CME 8.6 with ios version c2900-universalk9-mz.SPA.151-4.M4.bin.. Also am using a dedicated one fxo port for a specific user to send and receive calls,, the user always faces busy tone when initiate outgoing call, the fxo
-
Hi All, Does anyone know how possible to enjoy flash's WEB page on my (Netscape 7 + Solaris8 X86) system ? Thanks a lot !
-
Upgraded to CS6 from CS5. now both are running?
I just upgraded to CS6 from CS5. i was told by tech support that i would be prompted to enter my new CS6 serial number to start download and that I would also be prompted to enter my CS5 serial number to activate the upgrade of my existing software.
-
CS3 and Aspect HD or MPEG Pro HD3?
Has anybody experience with - Cineform Aspect HD or - Mainconcept MPEG Pro HD 3? e.g. regarding capturing, quality, stability, advantages... I use CS3 with HDV. Thanks for your advices! Sascha