Just did a sample for new template. [caption id="attachment_136" align="alignnone" width="300" caption="Rose_v3"][/caption]
Swordfish Lab is back in action. we are working on some improvements to our core engines, and hoping to come out with newly improved preview by Q2 2012. major improvements includes : 1. Fully utilize HTML5 and CSS3. 2. Moving to PHP 5.4 & MySQL 5.5 3. Base Servers upgrade to Ubuntu 12.04 LTS (Precise). 3. Introduction of memcached into core architecture. 4. Improved scalability of Clustered Network and more...
[caption id="attachment_128" align="alignnone" width="300" caption="design"][/caption] Couple of weesk ago, I read an article at Caffeinated Coder where the author have published an email from his friend that say's Good Programmers Make Bad Designers ! Although he managed to point out some weaknesses of programmers, I feel that the argument presented is not the case when it comes to real life. Being a System Analyst and a Programmer myself, I would like to describe just How and When a Programmer could make a Good System Analyst. While a programmer pays more attention to the part of the code that he is working on, a System Analyst assumes a ...
Its been a while since i worked with HTML5 & CSS3, since i stopped working on rosoideae. Its time to improvise. Since now most browsers support HTML5 & CSS3, i wanted to re-engineer the look for rosoideae to be better. However, looks like every browser have their own implementation for the same CSS3 command which made the entire CSS look like a pile of code vomit. (bueks !) Consider the example below: background: #c5deea; background: -moz-linear-gradient(top, #c5deea 0%, #3b9ed3 2%, #066dab 99%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#c5deea), color-stop(2%,#3b9ed3), color-stop(99%,#066dab)); background: -webkit-linear-gradient(top, #c5deea 0%,#3b9ed3 2%,#066dab 99%); background: -o-linear-gradient(top, #c5deea 0%,#3b9ed3 2%,#066dab 99%); background: -ms-linear-gradient(top, #c5deea ...
Joining the recent debates in the internet, i have found that some admins use keepalived as opposed to heartbeat+pacemaker, because of the all in one package, simplicity and also low CPU usage. however, i still have a mixed feeling on this. so i shall get my hands dirty again and explore the possibility with keepalived this time round.
In my previous article, i have explained on using MySQL Cluster and replicated slaves to load balance the database. However, configuring all the servers to be used in your web application would be a nightmare. besides your application will be wasting alot of processing power just to find the corrects server to work with. I have also mentioned the use of MySQL-Proxy to load balance connection to multiple servers. however its not very stable, plus it might just become the single point of failure in the design. In this article, I will explain the use of Hearbeat, Pacemaker & HAProxy which will ...
Damn you, SwordfishLab. You gave solution for the database. But I don't want to rewrite my entire application to fit to Replication and Clusters !!! What if I'm using script that uses Single Database like Magento or ZenCube? Well fear not, my friends. That's the whole pupose of MySQL proxy being there. Although the whole setup works great with application that is replication aware, we can quicly setup MySQL proxy to handle the distribution of queries in a simpler manner. start the mysql-proxy with command similar like this : mysql-proxy --proxy-backend-address=<MySQL Cluster Data Node 01 IP:Port> --proxy-backend-address=<MySQL Cluster Data Node 02 IP:Port> --proxy-read-only-backend-address=<MySQL Slave Node 01 IP:Port> --proxy-read-only-backend-address=<MySQL ...
MySQL Cluster and Replication ??? Why Replicate if going to use a Cluster ??? As we all know, there is no 1 System that is perfect on its own. Each system have their own advantage and disadvantage. Consider the points below. MySQL Cluster Advantage : No Single point of Failure, high Availability + Load balancing (99.999%),High Write output, High Read output for small subset of data. Disadvantage : Low Read output for complex, large data. Replication Advantages : very high read output as all the data stored in the same server. Disadvantages : using Master-Master setup is dangerous, making the best choice is 1 Master-> ...
Some of you might have heard of it, some may have tried. This article is intended to give the basic idea behind replication that can be beneficial for newbies. Website guests are like a mushroom. On the first few days, you may only get 10 hits per day. A month later it could be 100. And a year later 1000. It will keep on going until millions. And then comes caching, proxy, CDN to reduce the load on the webserver. But many don't realize the toll to the server also comes from their database as well. It's true that many RDBMS out ...
Crystal Chat - World's first HTML5 & CSS3 based Chat Welcome to Crystal Chat. Please register for your own Crystal Chat by following the link below. It's that easy and best of all it's FREE !!! For those who just want to try it out, feel free to login with the username of your choice without providing any password. http://crystal2.swordfishlab.com [gallery link="file"] Crystal Chat Revealed after the bump...
Apr 12
26
Swordfish Lab is back in action.
we are working on some improvements to our core engines, and hoping to come out with newly improved preview by Q2 2012.
major improvements includes :
1. Fully utilize HTML5 and CSS3.
2. Moving to PHP 5.4 & MySQL 5.5
3. Base Servers upgrade to Ubuntu 12.04 LTS (Precise).
3. Introduction of memcached into core architecture.
4. Improved scalability of Clustered Network and more…
Couple of weesk ago, I read an article at Caffeinated Coder where the author have published an email from his friend that say’s Good Programmers Make Bad Designers !
Although he managed to point out some weaknesses of programmers, I feel that the argument presented is not the case when it comes to real life. Being a System Analyst and a Programmer myself, I would like to describe just How and When a Programmer could make a Good System Analyst.
While a programmer pays more attention to the part of the code that he is working on, a System Analyst assumes a much larger scope of the entire project. They are the one responsible for the initial design of the system, making critical decisions on how the system should function.
Imagine building a 100 storey high skyscraper. The Hardware and Networking team is the one providing Cement, Steels and even supplies Electricity and Gas to the entire building. The Programmers and DBA (or collectively the Software Team), are the 1 to actually use these materials to bring up the 100 stories high building. So what is the role of the System Analyst ?
The System Analyst acts as the Architect/Engineer of the building, overseeing the entire construction process, from papers all the way to the actual building. He is the one who designs the 100 storey building. he should know if the soil can take such weight, can it withstand an earthquake, how many fire routes should be there, can the building take 1 million occupant at same time ….He also monitors the supply given by the Hardware guys and makes sure the Software team follows the specification given by him.
Almost all the software teams, usually design all their application with 1 or 2 different technologies. So the chances of a programmer to know all the the technology used is very high. Any future application developed will most probably be based on those existing technologies (unless the company willing to explore the wild IT world
). Having a good mastery in those technologies, together with all the flaws and bugs found from previous development will give the edge needed for the programmer to know what to DO and what NOT TO DO. And since the company ain’t going to jump from a standard Payroll system to High End Banking System in a blink, there is no worries that they are going to make a wrong judgement on the technology to use for the system.
Choosing the right language for the architecture is very important, Yes. But to tell a company to ditch Microsoft and imbrace Oracle’s Java…man, you seriously have some balls. Companies tend to rely on the same technology they used before. its good for the cost, project management and the staffs as well. Such major change should only occur if there is a big time overhaul in the system. however, designing the best architecture does not mean you have to use the best language that fits it. almost any other language can do the job fairly well. this is where the system analyst have to make the right decisions and make his architecture fit into place without causing too many changes. Dont bulldoze entire city to make 1 building !
Most companies hire Programmer and place them in nice, wonderful office rooms with blazing fast servers and workstation,XBox, HDTV, blah blah blah…. But a code writen and working in that room does not mean when you deploy it, it works the same. A Programmer can type any code to get a function working, but only a Good Programmer can see the impact of one’s code over the entire application platform (DB, Hardware, Network) and write them in the most optimized way. if they are unable to predict the effects, then just wait for the 100 storey building to come tumbling down soon ! (Damn you, expensive Typists !!!)
A generalist can only provide the pro’s and con’s of an architecture and will not have the necessary experience to decide if the architecture suggested will work as intended, unless he or she have worked as a programmer before. designing an architecture requires extensive knowledge in the chosen platform to be able to define the right method of system construction. how would a generalist know the power of .Net, the versatility of Java or the superb performance of PHP unless the person have worked on them before ? Besides they still need to learn the business logic applied in the application, data distribution, replication, high availability, load balancing and so many more to even suggest the architecture in the first place. All these are already known by the programmer beforehand. So, having some experience is not enough.
Based on the points above, you can clearly see that a Systems Analyst does not just choose the best architecture to use. but he actually chooses based on so many contributing factors. And to do so, he must have one hell of knowledge and experience to justify why he choose that. and not only that, it is his responsibility to ensure that the application is designed and implemented based on the exact specification given by him. Any flaws made by him or his team will be disastrous to the entire project. A generalist doesn’t have what it takes to be a Good Programmer so forget about System Analyst. Only a Good Programmer have all the skills needed to pull off such a great work. So promoting your most senior Programmer as a System Analyst will be a wise decision after all.
Its been a while since i worked with HTML5 & CSS3, since i stopped working on rosoideae. Its time to improvise.
Since now most browsers support HTML5 & CSS3, i wanted to re-engineer the look for rosoideae to be better. However, looks like every browser have their own implementation for the same CSS3 command which made the entire CSS look like a pile of code vomit. (bueks !)
Consider the example below:
background: #c5deea;
background: -moz-linear-gradient(top, #c5deea 0%, #3b9ed3 2%, #066dab 99%);
background: -webkit-gradient(linear, left top, left bottom,
color-stop(0%,#c5deea), color-stop(2%,#3b9ed3), color-stop(99%,#066dab));
background: -webkit-linear-gradient(top, #c5deea 0%,#3b9ed3 2%,#066dab 99%);
background: -o-linear-gradient(top, #c5deea 0%,#3b9ed3 2%,#066dab 99%);
background: -ms-linear-gradient(top, #c5deea 0%,#3b9ed3 2%,#066dab 99%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#c5deea',
endColorstr='#066dab',GradientType=0 );
background: linear-gradient(top, #c5deea 0%,#3b9ed3 2%,#066dab 99%);
except for the first line, the rest is doing the same thing: assign a gradient background. each of them only work for a specific browser and i have to repeat the command to be able to support all the major browser. even worse, microsoft uses some funny Filter:blah:blan:blah, which is not even a normal CSS code. Come on guys, how long does it take to standardize this things !!!!
Anyway, after going through the hastle, i made a sample draft for new rosoideae look.
. hoping to perfectify the new looks and also come up with few more cool HTML5 & CSS3 themes.
Joining the recent debates in the internet, i have found that some admins use keepalived as opposed to heartbeat+pacemaker, because of the all in one package, simplicity and also low CPU usage.
however, i still have a mixed feeling on this. so i shall get my hands dirty again and explore the possibility with keepalived this time round.
In my previous article, i have explained on using MySQL Cluster and replicated slaves to load balance the database. However, configuring all the servers to be used in your web application would be a nightmare. besides your application will be wasting alot of processing power just to find the corrects server to work with. I have also mentioned the use of MySQL-Proxy to load balance connection to multiple servers. however its not very stable, plus it might just become the single point of failure in the design.
In this article, I will explain the use of Hearbeat, Pacemaker & HAProxy which will perform the load balance, not only to MySQL Servers but also for your HTTP web servers (Apache, NginX)
Heartbeat & Pacemaker is the essential components used to configure High Availability Cluster. In this case, we will set-up a basic Active-Passive server which will provide HA for a Virtual IP Address which will be used as port 80. HAProxy will be installed on both nodes and will bind to this Virtual IP and directs the load to our back end Apache Servers.
The same configuration can be used for our MySQL Cluster setup, installing them on the 2 Management nodes of the MySQL Cluster. when 1 Management node fails, the HA will swap to second Management node and the Virtual IP used to connect to all the data Nodes is also transferred together. Similarlywe also setup HA Cluster for the farm of replicated MySQL, which is used for Read only actions.
HAProxy is highly customizable and has the built-in function to check the availability of load balanced nodes (both HTTP and MySQL). For HTTP, it has the ability to forward session information back to the backend Apache server.
You can configure all the set-up using a single HA Cluster, however this will complicate the configuration and troubleshooting. Having them separated also gives you the freedom to upgrade the servers as the load becomes higher. for starters, I would recommend using 2 Virtual Machine servers (ESXi for example), each having 1 half of the HA Cluster configured in it.
HA Cluster Sample :
Basic HAProxy setup script (haproxy.cfg):
global
maxconn 4096
pidfile /var/run/haproxy.pid
daemondefaults
mode http
retries 3
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
srvtimeout 50000listen GALAXY aaa.bbb.ccc.ddd:80
mode http
cookie GALAXY insert
balance roundrobin
option httpclose
option forwardfor
stats enable
stats auth myuser:mypass
server EARTH 192.168.0.2:8080 cookie GALAXY_SERVER_01 check
server MOON 192.168.0.3:8080 cookie GALAXY_SERVER_02 check
Damn you, SwordfishLab. You gave solution for the database. But I don’t want to rewrite my entire application to fit to Replication and Clusters !!! What if I’m using script that uses Single Database like Magento or ZenCube?
Well fear not, my friends. That’s the whole pupose of MySQL proxy being there. Although the whole setup works great with application that is replication aware, we can quicly setup MySQL proxy to handle the distribution of queries in a simpler manner.
start the mysql-proxy with command similar like this :
mysql-proxy –proxy-backend-address=<MySQL Cluster Data Node 01 IP:Port> –proxy-backend-address=<MySQL Cluster Data Node 02 IP:Port> –proxy-read-only-backend-address=<MySQL Slave Node 01 IP:Port> –proxy-read-only-backend-address=<MySQL Slave Node 02 IP:Port> –daemon
you can add as many Data Nodes and Slave Nodes as you wish and set your application config file to <Proxy IP> and <Proxy Port (4040)>. . Voila, blazing Speed without even have to change your application codes !!!
Note : I would still recommend the application to be written with replication awareness. it gives a better control for the application over the database.
MySQL Cluster and Replication ??? Why Replicate if going to use a Cluster ???
As we all know, there is no 1 System that is perfect on its own. Each system have their own advantage and disadvantage. Consider the points below.
MySQL Cluster
Advantage : No Single point of Failure, high Availability + Load balancing (99.999%),High Write output, High Read output for small subset of data.
Disadvantage : Low Read output for complex, large data.
Replication
Advantages : very high read output as all the data stored in the same server.
Disadvantages : using Master-Master setup is dangerous, making the best choice is 1 Master-> many Slave, which basically puts all risk to the master. if master fails, all is gone.
Now combine both technologies together and you have the perfect setup to handle any volume of data, with no single point of failure. The MySQL Cluster will handle all the write requests (insert, update,delete) at blazing speeds, while all the replicates slaves will be feeding user requests, reports and other complex queries from the replicated database from the MySQL Cluster. And since all of them sit under the same “roof”, changes are instantaneous. and we haven’t even talked about upgrading to dual processors with 8 cores each, 32+ GB RAM….
Some of you might have heard of it, some may have tried. This article is intended to give the basic idea behind replication that can be beneficial for newbies.
Website guests are like a mushroom. On the first few days, you may only get 10 hits per day. A month later it could be 100. And a year later 1000. It will keep on going until millions. And then comes caching, proxy, CDN to reduce the load on the webserver. But many don’t realize the toll to the server also comes from their database as well.
It’s true that many RDBMS out there are capable of processing millions of transaction’s but how efficient and fast can they do,… that depends alot on the architecture of the database and the queries used. Besides, table writes/locks will cause a dramatic slowness in the system as the other queries wait for the operation to complete. Also to note is that most of the queries to the database are read queries, and for a database with large volume of data, this is going to be quite a hard task to complete in a short time. We could invest on bigger servers, faster hard disk/RAM/Processors but still, we might come back to the same point of slowness 1 way or another.
Oct 10
25
Welcome to Crystal Chat.
Please register for your own Crystal Chat by following the link below.
It’s that easy and best of all it’s FREE !!!
For those who just want to try it out,
feel free to login with the username of your choice without providing any password.
Crystal Chat Revealed after the bump…