21
Feb 12

MVC vs MVCE

Since I’ve read this post today I’ve been thinking if the MVCE architecture is far better (or just better) than the MVC architecture.

Almost everybody now uses the MVC architecture. The really interesting point is that MVCE comes in place where MVC doesn’t do the job anymore. For a decent/medium size website, MVC architecture works like a charm. The controller gets the input data, passes it to the model, the model returns some output data, which wraps it into the view. The extra cost that you invest in hardware and development for migrating to a MVCE architecture doesn’t seem reasonable.

But, if you website starts growing beyond one point, where asyncronous transfer and post processing is a bussiness need (along with a scalability need), I think that a MVCE architecture will get you all the way. MVCE gets you the liberty of doing data processing without affecting the user’s browsing quality. Triggered events will let replicate data, make post actions analysis, you can do virtually everything with your data.

What I now for sure is that I am ready for MVCE. Ready to use it where it’s necessary, though.


03
Aug 11

Scalability for dummies

Sebastian Kreutzberger (Le cloud blog) has begun a very interesting series of posts concerning scaling websites. First 2 posts:

  • Clones – about how to scale web servers
  • Databases – about how you can scale … databases

I wonder what’s next. Enjoy reading and … scaling.


27
May 11

Trees are the lamest of graphs

I’ve been thinking a lot the past months about evolving our systems. Going from RDBMS to other platforms that allow more scalability and performance. One of the key areas of interest is the NoSQL Graph which is now implemented in our database. Today I have stumbled across this presentation about using Graph Databases and that’s exactly what I had in mind when I thought of migrating our data from RDBMS to Graph.


07
Mar 11

To scale or not to scale

Everybody these days is concerned about scalability. The world is getting bigger, new stuff is invented, we need to track and analyze more data, we want to sell more. Lots of information comes with a great problem: scalability. How can we expand our business/storage/datastore and which are today’s technologies that have this advantage build in?

One answer to that problem is an overview made by Rick Cattell. You can find the paper here. Enjoy reading, I have.


03
Mar 11

Redis Manifesto

Yesterday i’ve came across this uber cool post by Redis’s creator, antirez. Here’s some very interesting facts:

  • Memory storage is #1. The Redis data set, composed of defined key-value pairs, is primarily stored in the computer’s memory.
  • We’re against complexity. We believe designing systems is a fight against complexity. We’ll accept to fight the complexity when it’s worthwhile but we’ll try hard to recognize when a small feature is not worth 1000s of lines of code. Most of the time the best way to fight complexity is by not creating it at all.
  • We optimize for joy. We believe writing code is a lot of hard work, and the only way it can be worth is by enjoying it. When there is no longer joy in writing code, the best thing to do is stop. To prevent this, we’ll avoid taking paths that will make Redis less of a joy to develop.

Basically, let’s keep things simple and fast, but also with a lot of features. I like that.

In Redis we trust.


14
Dec 09

Oracle tip for tnsnames.ora

I don’t know if anybody encountered this problem, but we have spent more then one day trying to fix it. We have in our tnsnames.ora more entries like this:

SEARCH =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ******.ro)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ******)
)
)

SEARCH2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ******)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ******)
)
)

SEARCH3 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ******)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ******)
)
)

Although it’s all good defined, we couldn’t connect from php to those servers. Finally we figured out that before SEARCH2 and SEARCH3 there was an empty space. After we deleted the empty space it was all cool.

Hope this helps anybody from wasting some precious time.


26
Aug 09

PHP Trick

Often, when there are multiple guys working in one big website, not all of them in the same time and with the same coding standard, you get some really weird stuff in the code.

For example, we’ve got a problem with session_start(). We had 3-4 files in which session_start() was the second line (after <?php of course). Being included in several other pages, we had, of course :

Notice: A session had already been started – ignoring session_start() in /home/*****/******.php on line *

After a couple of tries we have fixed the issue:

$sessionId = session_id();
if($sessionId == “”) {
session_start();
}

PS: Don’t try if(empty(session_id()) { because :

Fatal error: Can’t use function return value in write context