开发者

Ruby on Rails and Cocoa

开发者 https://www.devze.com 2023-01-08 04:10 出处:网络
I am building an application in Cocoa that uses a local Ruby on Rai开发者_开发问答ls web server to communicate data and info between the client and server. There are times in the program where I need

I am building an application in Cocoa that uses a local Ruby on Rai开发者_开发问答ls web server to communicate data and info between the client and server. There are times in the program where I need to poll the web server for some information using HTTP GET requests, but I'm not sure if that is the best approach. Are there any alternatives to polling information between the application and the Ruby on Rails web server?

Thanks!

P.S. If more information is needed, please ask.


Polling, in of itself, might not be a bad way to go provided the frequency is not too high and you can live with not knowing whatever it is you poll for until you poll for it. It's simple to implement and test generally.

You might also consider Web Sockets with a framework like cramp but that would depend on how much control you have over the server side stack and how willing you'd be to implement the necessary protocol pieces inside your Cocoa client-side.

0

精彩评论

暂无评论...
验证码 换一张
取 消