开发者

flex and data concurrency

开发者 https://www.devze.com 2023-01-31 17:55 出处:网络
I am soon to embark on a medium scale project. Although this isn\'t a very high priority in my large list of things to do but I have been trying of how I could affectively handle data concurrency.

I am soon to embark on a medium scale project. Although this isn't a very high priority in my large list of things to do but I have been trying of how I could affectively handle data concurrency. I will be using a stateless EJ开发者_开发技巧B backend to my flex application.

Ideally I am looking for a simple method to deal with data concurrency. e.g. if data is saved on one interface it is refreshed in another. Or it warns that the data has been changed before saving a new version of the data.

Has anyone any ideas as I am at a loss at the moment. As I mentioned its not a high priority but I would feel a lot better if I had some mechanism to improve the process.


If you are planning on using AMF channels for communication you can use the long polling feature to effectively give your application "push message" type support. Both the BlazeDS and/or GraniteDS data services support this capability for exactly the reasons you mentioned.


Version control systems store user_id and datetime for every revision. You can use same method. Client app get current datetime for requested data and save it. App send on changed data with saved datetime. Server checks datetime of last revision and received datetime. And reply to app accordingly.

Second method is using broadcast messages from server to clients. But I don't think it's applicable in your case. This method put into practice in LAN (environment with stable connect) usually.

0

精彩评论

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

关注公众号