This is a migrated thread and some comments may be shown as answers.

Kendo UI Data Source Using Web Sockets

9 Answers 565 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Donald
Top achievements
Rank 1
Donald asked on 28 Dec 2011, 03:34 PM
Hi,

Can you tell me when Kendo UI will provide support for Web Sockets as a Kendo Data Source? 

I need to remove as must delay as possible in accessing my AutoComplete selection lists.  This is a critical capability for my software product.

Thanks,

Donald

9 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 28 Dec 2011, 04:46 PM
Hello,

WebSocket support is not yet planned as a feature. You may consider opening a feature request in the Kendo UserVoice page.

Technically speaking this should be possible even now by implementing a custom transport in the datasource. However why do you think that WebSockets will be faster than say Ajax requests? WebSockets still need to transfer the data through the wire and require a bit more complex server-side handling than the regular HTTP server which handles ajax requests.

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Piotr Jarocki
Top achievements
Rank 1
answered on 01 Mar 2012, 08:07 AM
Hi,
websocket is a must, mine whole app is using websocket atm, also websocket headers are smaller than normal http request, so y its faster, another thing is when you are connected with websocket, you are not looking DNS to get ip of web, so websockets are much much faster than normal AJAX.
Oh yea and another thing, for example ive got a list of emails, and server will get new message i can push it to the webbrowser, but than i need to put it into datasource and gridview or other control.
You cant even compare websockets to AJAX, because its a lot diffrent.
Im not using kendo ui, because of websockets :( can you tell me how to implement custom transport into datasource?

Regards,
Piotr Jarocki
0
Atanas Korchev
Telerik team
answered on 01 Mar 2012, 09:08 AM
Hello,

 I prepared a jsFiddle showing how to implement a custom transport. Check it here.

All the best,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
R.
Top achievements
Rank 1
answered on 14 Jun 2012, 02:30 AM

We are beta testing using websockets with Kendo Mobile and Web and haven't had any issues binding the data to the UI elements. All we did was just bind the data transported to the kendo datasource.            

var jsdata = JSON.parse(websocketdata);

            $("#top25-listview").kendoMobileListView({
                dataSource: jsdata,
                template: $("#top25ListViewTemplate").html()             
            });

0
Sylvain Guay
Top achievements
Rank 1
answered on 29 Aug 2012, 02:52 PM
Hi..

Do you have a date for the websocket?

We look forward to buy your product this addition.

Thank for answer.. and thank for the best product...

Sylvain
0
Heinrich
Top achievements
Rank 1
answered on 30 Sep 2012, 06:37 AM
Hello,

for my mobile-apps and web-apps is the Business communication via web sockets of central importance.
please give a specific date (or send a e-mail) from which we can communicate via web sockets.

I look forward to buy your product with this addition.

Regards,
Heinrich
0
Ryan
Top achievements
Rank 1
answered on 02 Oct 2012, 10:43 PM
Hello Atanas,

We have a field inspection program written in .NET with regular Telerik controls.  It currently does polling to get the "workorders" for the inspector as they are assigned.  We are very interested in changing this to a MVVM model where there is a datagrid that is updated in real time with a websocket as new work orders are assigned.

As I understand it I can build a grid with Knockout JS and tie the websocket to its observables and it will update the grid as the new data is sent to the client over the websocket.

If I rebuild my application with Kendo, am I understanding that I can use the Kendo grid and send the data from the websocket to the "custom transport" as you listed in your example.  Will the Kendo grid then update in real time much like the Knockout JS grid?

If so, I am sold :)  Kendo it is.

If not, can the Kendo grid be enhanced with Knockout JS to achieve the same functionality?  If so, I am sold again but might need some help on that :)

Thanks for the feedback,
Ryan
0
Atanas Korchev
Telerik team
answered on 03 Oct 2012, 06:57 AM
Hello Ryan,

 Kendo UI does not provide built-in support for KnockoutJS. However there is an open source library which does exactly that. You can check it out.

We are not sure how well web sockets work with KnockoutJS. You have to investigate that for yourself.

 Implementing a custom transport will work if you decide not to use KnockoutJS. The grid will refresh once data is received.

Regards,

Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
David
Top achievements
Rank 1
answered on 15 Oct 2013, 01:38 PM
Since kendoui has the capability of using a function in the transport you can implement pretty much any websocket framework.  I'm using Node.js + socket.io + client-javascript

On the server:

io.sockets.on('connection', function (socket) {
     socket.on('io-read',function(query,fn){
        fn( [{data: 'test'}] ); // test data
     });
});

and on the client
dsSocket = new kendo.data.DataSource({
            transport: {
                read: function(options){
                    socket.emit('io-read','query',function(data){
                        console.log(data);
                        options.success(data);
                    });
                }
            }
        })

Tags
Data Source
Asked by
Donald
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Piotr Jarocki
Top achievements
Rank 1
R.
Top achievements
Rank 1
Sylvain Guay
Top achievements
Rank 1
Heinrich
Top achievements
Rank 1
Ryan
Top achievements
Rank 1
David
Top achievements
Rank 1
Share this question
or