• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

A new website for OpenTibia Servers

Status
Not open for further replies.

Nostradamus

Member
Joined
Jun 2, 2007
Messages
219
Reaction score
6
Hello folks,

i see that a lot of people complains about website that uses a lot of internet traffic, high cpu usage, sql injection, xss attacks and tons of other problems.

My idea is to organize a development team to threat this and create a really good AAC for our servers. The project will have me as the software engineer, but anyone can give suggestions too. It can be developed in PHP, Python or Ruby, this will be decided depending on how much people we will have on that. This project can turn into an OpenTibia project in the future, you need to give a try and wait for the aprovation of the people.

To prove that i know what i am talking, here are some ideas and tips that we're going to follow:

1. Performance


1.1 - Caching everywhere
Not always making cache of everything will be good, since we can lost some dynamics, but always when possible this will be necessary. Make a highscore query each time an user request can be badly, and can be a form of attack.

1.2 - "Garbage collector"
PHP is an interpreted language that we don't need to worry with memory allocation. But, if we are getting so much trouble on constructor/destructor creations, we need to unset manually to get best performance.

1.3 - Avoiding REGEX
Regex is very good for filtering some data. But there are some alternatives that do the same and works in a better time difference. There are many functions like strncasecmp, strpbrk and stripos that can solve almost all the problems.

1.4 - Static methods
Static methods are four times fast than a standard method. So, always when possible, we will use it.

1.5 - Smart querys
I see that 90% of the AAC creator does not domain the MySQL language. So they use a lot of unnecessary querys to get a simple result. In this project we will work with smart querys that can make the code more logic and smaller.

1.6 - JSON instead of XML
Some data in OpenTibia are in a XML format. We can use JSON to handle that instead of calling some external librarys.

1.7 - Moderated Object Orienting
Object Orienting are really good for almost everything, but we don't need to turn everything in objects since it is slower to access an attribuite and an array sometimes can solve that problem much better.

1.8 - Element expire control
It is possible to control the expire time of the elements of a website. This is the basics for a good cache control.

2 - Design Pattern


2.1 - Singleton
Maintaining a global access point to an object with a single instance in a structure data like OpenTibia is essencial. So, this standart will be used when needed.

2.2 - CamelCase
For a standard code, we will use this pattern with the variation called: lowerCamelCase. Followed by scripts functions in codes.

2.3 - MVC
The idea of separating the code from design is one of the best patterns in software engineering. We will keep this standard for a better organization.

2.4 - REST Plataform (case-study)
Applications in RPC are so deprecated in the market. Instead of it, using a RESTful plataform application we can have more dynamics.

3 - User Interface

3.1 - jQuery
We will use jQuery for every javascript on the system. AJAX requests will be called on the jQuery plataform too.The usage of javascripts isn't only to show cute effects, grids can handle data if well implemented.

3.2 - Compressed javascript
More lower the web traffic is, better it is. So, we don't need to release an AAC with developer stage files.

4 - External uses

4.1 - Smarty
Smarty is one of the best template engine that helps a lot while doing themes.

4.2 - PHPMailer
We don't need to waste time on things that already exists with full quality. PHPMailer is the best class for sending mails.

4.3 - Re-CAPTCHA
Mass spammers can be present in any web application, we can avoid that easily with CAPTCHA services. The Re-CAPTCHA service is the best actually.

4.4 - POT
We don't need to reinvent the wheel since we have a nice "framework" for OpenTibia procedures. There is no problem on using that, the problem is in the people who don't know how to use all the power of this tool.



If you are interested on beeing a developer of this project, please post here.
 
Last edited:
Some of the ideas are case-study only, it isn't true that all of those will be in the project really.
 
Sounds cool and very promising. Good luck on that ;)
 
Status
Not open for further replies.
Back
Top