实时功能实现 [英] RealTime functionality implement

查看:92
本文介绍了实时功能实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我在我的项目中实现了实时功能,如实时图表,gridview中的实时值等。我还使用了WCF服务。它的工作正常,但是如果我们想要转移到另一个页面,那么一段时间后就会花费时间。那我该怎么办?如何避免这种情况或实现实时功能? signalR是实现实时功能的好选择???

Hello,

I have implementing realtime functionality in my project like Realtime charts,real time value in gridview etc. I have also used WCF service. Its working fine but after some time if we want to move on to another page then it tooks time. So what can i do?? How to avoid this situation or implement real time functionality? Can signalR will be good option to implement real time functionality???

推荐答案

SingleR能够让服务器代码在连接的客户端可用时立即推送内容,而不是让服务器等待客户端请求新数据。您可以使用SingleR完成许多其他活动。它最适用于使用WebSocket的聊天应用程序。



但是在你的情况下如果只是性能问题,你可以有100个其他的选择来克服。



1.使用ajax使用异步选项。

2.有多线程选项可以同时处理多个请求。

3。根据用途进行代码重构。

4.在客户端或服务器端临时存储数据。

5.预加载没有数据的页面。



还有很多其他人......
SingleR is the ability to have server code push content to connected clients instantly as it becomes available, rather than having the server wait for a client to request new data. You can do whole lot of other activities using SingleR. It works best on chat application using WebSocket.

But in your case if it just a matter of performance, you can have 100 others options to overcome.

1. Use asynchronous option using ajax.
2. Have multi threaded options to serve multiple requests together.
3. Code refactoring as per usage.
4. Tempurary storage of data on client or servers side.
5. Pre loading of page without data.

there are many others...


这篇关于实时功能实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆