Click here to Skip to main content
15,400,433 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey Codeproject,

I have two applications that are both working on the same file. The file is a serialized class file, which at run time is used as an object(class). I want to let the two applications use the same file through a cloud-sharing service like Dropbox.

I had a few questions regarding this:
- How would I let the clients write and read to the same file without closing a stream?
- How would I let my application recognize specific changes within the file, and update those in the object without having to completely remake the object?
- Are there any tools like this out there, and if not, could you help me out?

As an example on being able to work on the same file while keeping the file at another location is Google Docs.

Regards,
- Deviant
Posted
Updated 18-Apr-14 8:59am
v3
Comments
Sergey Alexandrovich Kryukov 18-Apr-14 15:08pm
   
You could certainly do a lot about it, but something prevents me from digging into it. This "something" is the strong smell of a bad architectural idea...
Maybe we could discuss this if you explained some ultimate purposes of your activity.
—SA
Deviant Sapphire 18-Apr-14 15:13pm
   
Well, it's pretty simple really I'm creating an MMO game, both applications(Servers) need to be able to have the same file to keep the entire game updated and on track.
Deviant Sapphire 18-Apr-14 15:14pm
   
By saying simple I do not mean I am a professional at it. It's my first time wandering into the zone of networking for bigger purposes than to just sent a few messages.
Sergey Alexandrovich Kryukov 18-Apr-14 15:20pm
   
I have no idea what's "MMO". In network applications, sharing files is probably the worst idea. The communications should be based on messages: request/response (client/server) and/or published/subscriber (server push). No files at all. Messaging naturally serializes data flows...
—SA
Deviant Sapphire 18-Apr-14 15:21pm
   
MMO is a type of game. Alright, I understand. Thanks for the help.
Sergey Alexandrovich Kryukov 18-Apr-14 15:55pm
   
You are welcome.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900