douhuo3696 2013-02-28 08:09
浏览 53

实时搜索结果

I'm building a customized search engine. In my program, it takes a little while for each search result to show up. What I'm looking for is a way to show the search result item on the user's browser, as soon as it is found.

The most related thing to this that comes to my mind, is WPF's binding. When you bind a list of items to a ListView, as soon as you add an item to the list, it will show up in the UI. I'd like to implement something like that.

In .Net & C# world, I've played a little with concepts like SignalR, web sockets, etc. but I'm no expert but I know jQuery fairly well. However, I'm looking to implement this in Java (which is my server's back-end) and PHP (as the front-end). My previous static (without the feature I described) search engine is implemented using Thrift as a web service to communicate between the Java server and PHP (more on how to do that). Can I expand the current implementation and add this feature? How?

  • 写回答

1条回答 默认 最新

  • dswqw66280 2013-02-28 14:55
    关注

    For the middle tire you would need something that supports well web sockets. So when new result arrives from backend, middle tire would forward it over the web socket to the client in browser. Javascript code would receive object on web socket, and dynamically add new search result to the div with results.

    评论

报告相同问题?

悬赏问题

  • ¥15 运动想象脑电信号数据集.vhdr
  • ¥15 三因素重复测量数据R语句编写,不存在交互作用
  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目