Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 15:28

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Project Kibou: Server Development

Discussion on Project Kibou: Server Development within the CO2 Private Server forum part of the Conquer Online 2 category.

Closed Thread
 
Old 06/26/2014, 17:43   #31
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
I understand that there are time constraints, but that is still no excuse to leave things the way they are. I've asked multiple people, if you're under a time constraint and your MySQL connections are taking 200 - 400 ms to be created on a game server, would you leave it or spend and hour and a half working on a pool that completely eliminates that time? Every single person said work on a pool. They solved the problem. That's why I'm still saying, even under time constraints, people here take unnecessary shortcuts - and it results in bad sources. NewestCOServer2, for example: is it necessary that the switch statements are all out of order and tabbed around, making it very difficult to follow? Absolutely not, and the time spent searching through that is longer than the time it would have taken to do it right the first time. That is my argument - if you do it right the first time, you'll save time down the road when things need to be changed or understood. Never did I say spend a few months programming a MySQL pool. Never did I say always go for the best, because I know that's not feasible under certain time constraints. I said people need to step up their game, which I think everyone would agree on.
Spirited is offline  
Old 06/26/2014, 18:55   #32
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
i dont think u understand there's a difference btwn just **** code and taking shortcuts when appropriate, but like i said im over it im not giving u a proper response lol, it's only a shortcut when you actually know how to code it a better way
InfamousNoone is offline  
Thanks
1 User
Old 06/27/2014, 15:29   #33
 
elite*gold: 0
Join Date: May 2011
Posts: 648
Received Thanks: 413
Quote:
Originally Posted by Spirited View Post
Well, first of all, there is no built-in connection pool because I'm using the C/C++ connector. My source is C++, not C#. The built-in connection pool that you're thinking of is for the .NET connector. It's also inefficient. Regarding your comment on "does it really matter", you tell me: how well has "does it really matter" done for this section?

I know it's against traditions in this section, but why do it the wrong way when you can do it the right way? Hard concept to grasp, I know, but why would I develop a server that just gets by when I can develop one that does laps around everyone else's? I mean, let's face it, I'm kicking *** right now. What is everyone else doing to catch up?
another ego trip? Wow
Y u k i is offline  
Thanks
2 Users
Old 06/27/2014, 17:37   #34
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
Quote:
Originally Posted by Y u k i View Post
another ego trip? Wow
I don't speak out of ego, I speak out of experience. I am undoubtedly kicking *** in comparison to the other sources here. My source is more modular, more scale-able, and more efficient than any public source in this community at this time. I've worked hard, I've done the tests, I have results. I've dropped breadcrumbs so you know exactly what to do to keep up with me. So if you don't like the truth, make me a liar. That's exactly why I posted it.
Spirited is offline  
Old 06/27/2014, 17:51   #35
 
elite*gold: 0
Join Date: May 2011
Posts: 648
Received Thanks: 413
Meh.. since you don't plan to make it a live server we will never know. You can only perform so many tests in a closed environment. I don't say you lie, I belive you are good at what you do.
Y u k i is offline  
Old 06/27/2014, 18:04   #36
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
Quote:
Originally Posted by Y u k i View Post
Meh.. since you don't plan to make it a live server we will never know. You can only perform so many tests in a closed environment. I don't say you lie, I belive you are good at what you do.
Thanks, and you're right - since I cannot guarantee that this server will ever see the light of day due to my work schedule, I cannot truly say it's doing well without others feeling skeptical. Perhaps I can demonstrate it at a later point with a beta testing period, though I've said that before and work has gotten in the way. We'll see.
Spirited is offline  
Old 06/27/2014, 19:28   #37
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Quote:
Originally Posted by Spirited View Post
I don't speak out of ego, I speak out of experience. I am undoubtedly kicking *** in comparison to the other sources here. My source is more modular, more scale-able, and more efficient than any public source in this community at this time. I've worked hard, I've done the tests, I have results. I've dropped breadcrumbs so you know exactly what to do to keep up with me. So if you don't like the truth, make me a liar. That's exactly why I posted it.
yes. I hope your not "testing" things like tlk is, cause that kind of testing (at least what he's shown so far) is near useless.
InfamousNoone is offline  
Old 06/28/2014, 04:06   #38
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
Quote:
Originally Posted by InfamousNoone View Post
yes. I hope your not "testing" things like tlk is, cause that kind of testing (at least what he's shown so far) is near useless.
Most of the time I'm actually comparing my new work with my old work. I feel a bit confident in my old work, that it was really quite good, but I don't feel nearly confident with it than I do with my new work. Though, I'm not really making too many comparisons. When I'm testing systems, I'm testing them with other ideas I had and comparing the nanoseconds. Yes, I know - I have time to do that while others don't, but so far I haven't had to use the results for anything. I know what the more efficient solution is before running tests.
Spirited is offline  
Old 06/28/2014, 13:33   #39
 
elite*gold: 0
Join Date: May 2011
Posts: 648
Received Thanks: 413
Quote:
Originally Posted by Spirited View Post
Most of the time I'm actually comparing my new work with my old work. I feel a bit confident in my old work, that it was really quite good, but I don't feel nearly confident with it than I do with my new work. Though, I'm not really making too many comparisons. When I'm testing systems, I'm testing them with other ideas I had and comparing the nanoseconds. Yes, I know - I have time to do that while others don't, but so far I haven't had to use the results for anything. I know what the more efficient solution is before running tests.
Share your measurements so I can compete
Y u k i is offline  
Thanks
1 User
Old 06/28/2014, 19:36   #40
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
Quote:
Originally Posted by Y u k i View Post
Share your measurements so I can compete
Sure, I don't have much to measure, but here you go (took me a while to do this, so hopefully you were serious - I would love to see others considering performance). Keep in mind that time measurements aren't the only thing that matter in performance (it's also how well the system scales). Also note, these are time measurements based on the Account Server (with a socket system, configuration file, and database being loaded).

Server startup: 39.87 milliseconds.
Accepting clients: 79.46 microseconds. (Includes client creation & initial start receive packets).
Receiving packets: 1.29 milliseconds. (from start receive at end of packet splitter to start of packet splitter).
Packet splitter: 230 nanoseconds (Couldn't accurately measure - kept coming up as 0 nanoseconds).
Get Open MySQL Connection: between 200 and 260 nanoseconds (recycling previous test).

Comparing packet splitting may be a bit difficult if you don't know how I split packets / combine fragments. Check my blog for a similar design (I've changed it since, but it's the same basic technique).
Spirited is offline  
Old 06/28/2014, 23:11   #41
 
elite*gold: 0
Join Date: May 2011
Posts: 648
Received Thanks: 413
Quote:
Originally Posted by Spirited View Post
Sure, I don't have much to measure, but here you go (took me a while to do this, so hopefully you were serious - I would love to see others considering performance). Keep in mind that time measurements aren't the only thing that matter in performance (it's also how well the system scales). Also note, these are time measurements based on the Account Server (with a socket system, configuration file, and database being loaded).

Server startup: 39.87 milliseconds.
Accepting clients: 79.46 microseconds. (Includes client creation & initial start receive packets).
Receiving packets: 1.29 milliseconds. (from start receive at end of packet splitter to start of packet splitter).
Packet splitter: 230 nanoseconds (Couldn't accurately measure - kept coming up as 0 nanoseconds).
Get Open MySQL Connection: between 200 and 260 nanoseconds (recycling previous test).

Comparing packet splitting may be a bit difficult if you don't know how I split packets / combine fragments. Check my blog for a similar design (I've changed it since, but it's the same basic technique).
Yeah I was serious I'll edit this post with my results asap! Edit: Just noticed I deleted my sqlite db in my windows reinstall madness... yay... good thing i keep no backups, that saves me some trouble finding them.
Y u k i is offline  
Old 07/08/2014, 09:04   #42
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
Hey everyone,

Tonight, I had some time to work on the project, so I completed my MySQL implementation. If you haven't been following my posts, here's what I've done so far in review. I started by creating a Database Infrastructure library to encapsulate the entirety of the MySQL implementation. Inside of that library, I created the MySQL connection class. That class controls a single connection to the MySQL server. From there, I wrote up a connection pool class. The connection pool uses a red-black tree data structure to connect key thread ids with a MySQL connection value. Each thread in the server's thread pool will have a dedicated MySQL connection that will remain active (to save time reinitializing connections). This also allows me to avoid locks commonly used in other data structures. In other words, the pool is designed to be used by multiple threads. With the pool done, I then needed a namespace that could access the pool from any thread. That namespace could then be extended in the server project.

With that review done, let's move on to the final steps in my MySQL implementation. I finished the delete, insert, select, and update statements. Each statement has a unique class definition that inherits base methods from an abstract statement class. The derived classes provide the server with a very lightweight wrapper, used to quickly and painlessly construct MySQL statements. The select statement reads in results as objects using only one query, which can be parsed using enumeration maps and structures.

With the MySQL statements done, the Database Infrastructure library is now complete. I've made some other small changes in the source, but nothing too notable. Example: I moved strings to string tables (for quick string modifications and language support), changed the project to a 64bit architecture, etc. Anyways, more development is coming soon.

Kind Regards,
Spirited
Spirited is offline  
Old 07/09/2014, 00:23   #43
 
Eteru's Avatar
 
elite*gold: 0
Join Date: Apr 2013
Posts: 120
Received Thanks: 3
All of this sounds pretty amazing, Fang. I completely agree with how you are going about building all of this. When I was studying Computer Science at my university, my professor who happened to be from MIT, ALWAYS wanted everything done efficiently. It doesn't matter if you complete the project he said, if it's not efficient, it's not good enough. And if it wasn't efficient, your grades were horrible. I learned that pretty quick... >_< The fact that you are sticking to your principles among all of the antagonism is pretty awesome. Good luck with your project. Hope to hear more about it as you make progress.
Eteru is offline  
Old 07/09/2014, 04:26   #44
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
Quote:
Originally Posted by Eteru View Post
All of this sounds pretty amazing, Fang. I completely agree with how you are going about building all of this. When I was studying Computer Science at my university, my professor who happened to be from MIT, ALWAYS wanted everything done efficiently. It doesn't matter if you complete the project he said, if it's not efficient, it's not good enough. And if it wasn't efficient, your grades were horrible. I learned that pretty quick... >_< The fact that you are sticking to your principles among all of the antagonism is pretty awesome. Good luck with your project. Hope to hear more about it as you make progress.
It is important to keep a sense of time when working on a project. My argument is that spending some extra time to document and design before implementing large systems produces higher quality projects. Spending a bit of time designing an algorithm will produce a better algorithm. Anyways, we've talked about that enough. It sounds like you have a very interesting professor. He may be trying to encourage you to think in a different mindset. Thank you for your interest.
Spirited is offline  
Old 07/10/2014, 12:03   #45


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
Quote:
Originally Posted by Spirited View Post
It is important to keep a sense of time when working on a project. My argument is that spending some extra time to document and design before implementing large systems produces higher quality projects. Spending a bit of time designing an algorithm will produce a better algorithm. Anyways, we've talked about that enough. It sounds like you have a very interesting professor. He may be trying to encourage you to think in a different mindset. Thank you for your interest.
You know I agree with how you`re doing things as well, but I don`t think that was the main problem here. It`s just that in a professional enviroment the development time comes ahead of properly doing stuff frequently and you have to make trades. Although I still agree with you, when you have the time and the resources, do it the best you can.
KraHen is offline  
Closed Thread


Similar Threads Similar Threads
Project Kibou
11/13/2012 - CO2 Private Server - 7 Replies
Hi everyone anyone have the project kibou download link? and can give me it? thanks so much ;D
Project Kibou
08/23/2011 - CO2 PServer Guides & Releases - 98 Replies
Important Notice: All guides on this source not by me will be leeching and will be reported immediately. You do not have my permission to create guides based on my work unless specified otherwise. This is Project Kibou. It's not as tightly coded as Kanji, but I'm sure you can use this as a reference too to make your own whatever. Don't copy how I do Agates. It's not correct. If you do copy something, copy my map system and refine it. I'll post the SQL file soon. I need to recover...
Project Kibou: The End
08/11/2011 - CO2 Private Server - 12 Replies
Information is no longer valid.
Project Kibou [Patch]
07/14/2011 - CO2 Private Server - 17 Replies
Hey, so the new encryption means that I can no longer run my server some what legally. I'm not going to go into details, but I can do any patch now. I've asked this question before- but I want to confirm interests. What patch should I do? There's no way in hell that I'm giving up Project Kibou. I've put too much work into it. Sincerely, Fang PS: Patch descriptions are available here: Spirited Fang's Blog: Source Downloads Also, I know what fixes the 4267 - 4343 chat problem... but...



All times are GMT +1. The time now is 15:28.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.