spring mvc - Server Sent Event to update collection in Emberjs application on Java EE/jetty -


the application has widget list of items keep changing based on events on server side. server has push these changes browser.

the application uses emberjs javascript mvc framework , have managed implement basic update of collection following stock ticker example. ttp://www.xeqtit.com/blog/2012/04/creating-a-stock-ticker-table-using-ember-js.

i trying replace following stub/mock calls actual rest calls server.

       setinterval(function() {            quotes.quotescontroller.processchange({                   "code": "aapl",                    "value": (119*math.random()).tofixed(2),                    "bid": (120*math.random()).tofixed(2),                    "offer": (118*math.random()).tofixed(2)          });       }, 3*1000); 

replacing with,

       var source = new eventsource('data/quotes.json');         source.onmessage = function(event){             var data = event.data;             quotes.quotescontroller.processchange(event.data);           }; 

-should writing servlets based on asynch support in servlet 3.0 spec? -would ideal integrate spring mvc on server side along client side mvc framework emberjs ? - possible achieve server sent events/asynch call support jersey/restlet library on jetty server ??

this java ee application , choice of server/frameworks yet made. new emberjs,spring mvc , comet applications.

what using ember-data store quotes, , feed them through websocket.

you choices not made: did consider using ror server-side framework? of today, ember-data friendly implementation (along active-model-serializers). writing server side stack piece of cake.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -