[5165] RollBacks

10/11/2010 09:08 Korvacs#16
Quote:
Originally Posted by _tao4229_ View Post
Sigh, it's the same thing. You can open a binary file with read+ (read/write privileges which do not start you with a blank file) privileges and then seek to whatever offset you want. The only factor that would be a problem is fields with dynamic length (how write/reading a string from a BinaryReader/Writer does), so you'd have to take into account the lengths of those fields in order to seek past them (or obviously switch to fixed length fields).

Code:
// using System.IO;

FileStream fs = new FileStream("c:\\file.bin", FileMode.Open, FileAccess.ReadWrite);
BinaryWriter wrtr = new BinaryWriter(fs, Encoding.ASCII);

wrtr.BaseStream.Seek(OFFSET, SeekOrigin.Begin);
wrtr.Write(value);

wrtr.Close();
Since MySQL utilizes binary files anyway, your just reinventing the wheel and doing it badly with a method like this, so why would you ever want to use a method like this?
10/11/2010 14:37 †he Knight#17
Any Idea How Can I Stop the rollbacks without changing to mysql?
10/11/2010 16:52 _tao4229_#18
Quote:
Originally Posted by Korvacs View Post
Since MySQL utilizes binary files anyway, your just reinventing the wheel and doing it badly with a method like this, so why would you ever want to use a method like this?
Nice job reading the other posts in the thread.
10/11/2010 17:19 Korvacs#19
Quote:
Originally Posted by _tao4229_ View Post
Nice job reading the other posts in the thread.
I did read the other posts, my point is why bother with using standard none optomized binary files when you could happily use MySQL instead and let MySQL worry about managing your data for you.

People dont want to change from the standard binary files but want the performance, speed and reliability of a fully managed database system, its simply not possible, if it was that easy to get the same level of performance, speed and reliability then there would not be dedicated database packages which cost large sums of money, because anyone can do it.

Sure you can make improvements to the existing system, adding thread safe locking would be a place to start, ensuring the file is closed after use is a must. With these 2 simple things, if done correctly you should see an improvement, but even then your server will be waiting for access on a regular basis if your updating the character often (which you should be to get rid of 'rollback syndrome').

If you want performance, speed and reliability you will have to ditch the standard binary file implementation in that source and switch to MySQL, its honestly not that hard, the performance is better, you can make changes to your database easily without loosing all of your accounts and characters, its alot faster when it comes to updating and itterating through records. There is not arguement here for standard binary files, switch to MySQL.
10/11/2010 17:53 _tao4229_#20
Quote:
Originally Posted by Korvacs View Post
I did read the other posts, my point is why bother with using standard none optomized binary files when you could happily use MySQL instead and let MySQL worry about managing your data for you.

People dont want to change from the standard binary files but want the performance, speed and reliability of a fully managed database system, its simply not possible, if it was that easy to get the same level of performance, speed and reliability then there would not be dedicated database packages which cost large sums of money, because anyone can do it.

Sure you can make improvements to the existing system, adding thread safe locking would be a place to start, ensuring the file is closed after use is a must. With these 2 simple things, if done correctly you should see an improvement, but even then your server will be waiting for access on a regular basis if your updating the character often (which you should be to get rid of 'rollback syndrome').

If you want performance, speed and reliability you will have to ditch the standard binary file implementation in that source and switch to MySQL, its honestly not that hard, the performance is better, you can make changes to your database easily without loosing all of your accounts and characters, its alot faster when it comes to updating and itterating through records. There is not arguement here for standard binary files, switch to MySQL.
This was never an argument over whether MySQL is better; you people just shove your opinions into any thread. Once again, read the damn posts before you post.
10/11/2010 17:58 Korvacs#21
Its not a case of opinions, or which is better, imtrying to encourage people to ditch binary files and switch to MySQL, theres no point in continuing using a bad system, and i fail to see the logic in assisting people with something which is bad for their server.

Obviously you dont see it that way and like to cement bad practice for people.
10/11/2010 18:04 _tao4229_#22
Quote:
Originally Posted by Korvacs View Post
Its not a case of opinions, or which is better, imtrying to encourage people to ditch binary files and switch to MySQL, theres no point in continuing using a bad system, and i fail to see the logic in assisting people with something which is bad for their server.

Obviously you dont see it that way and like to cement bad practice for people.
Nice job, moron.

I never told him to use binary files. I even said many of times the way I was showing wasn't good. The only reason I even gave that code was because someone asked me to prove it.

I was stating that even with MySQL the current way of doing things still will not work.

If people want your opinions on whether MySQL is better, they can ask for it; I was just trying to respond to the original problem at hand.
10/11/2010 19:02 Korvacs#23
And i was suggesting a solution which will fix the original problem at hand. Its better in all respects and fixes the issue.
10/11/2010 19:21 _tao4229_#24
Quote:
Originally Posted by _tao4229_ View Post
I was stating that even with MySQL the current way of doing things still will not work.
Obviously if you used MySQL properly there wouldn't be any problems. If you used everything properly there wouldn't ever be any problems!

Once again, nice reading comprehension.
10/11/2010 19:35 Korvacs#25
Sigh well whatever, dunno why you would want to stick to something so averagely effective when there are tools out there that are easier to use and better in all respects. Dunno why you would want to encourage people to continue using such a system either.

Sure you could fix it up so that you wouldnt have problems, but that doesnt make it efficient or fast in any respect, its difficult to make alterations too, and hard to maintain.

Dunno why you feel the need to be so forceful about such an issue.
10/11/2010 20:54 _tao4229_#26
Quote:
Originally Posted by Korvacs View Post
Sigh well whatever, dunno why you would want to stick to something so averagely effective when there are tools out there that are easier to use and better in all respects. Dunno why you would want to encourage people to continue using such a system either.

Sure you could fix it up so that you wouldnt have problems, but that doesnt make it efficient or fast in any respect, its difficult to make alterations too, and hard to maintain.

Dunno why you feel the need to be so forceful about such an issue.
We're at a misunderstanding.

I don't want him to use binary files over MySQL. I'm saying that using MySQL in the same manner that the source uses binary files will have the same problems (if not more from lack of good MySQL usage).

I dislike MySQL. However, such a system is probably necessary for a good server (MSSQL preferably, I've never had a good time setting up MySQL or using it). MSSQL has always seemed better in every aspect (much more stable, and obviously better integration with C#).
10/11/2010 22:56 †he Knight#27
#request close
10/12/2010 00:45 Korvacs#28
Quote:
Originally Posted by JuiceDCodeR View Post
#request close
Epvpers policy is to keep threads open, we dont close threads when they are finshed with, and since thread highlights information which the community can benefit from it will remain open.
10/12/2010 16:56 †he Knight#29
Very Smart Korvacs, but why it has to remain open since everybody is talking off topic? nobody trying to help lol
10/12/2010 17:04 Korvacs#30
We are trying to help, if you switch to mysql or perform some of the changes that saint suggested you would see an improvement.