I think about queues all the time.

April 24th, 2008

Here’s something to waste your time and bore your brains out.

There are three nodes, say Nodes A, B and C. Node A and C are application servers. Node B is a messenger for nodes A and C. Although Node B is not needed but for reasons I’m not allowed to discuss and would rather not discuss, it has to be there and is the root cause why we have a problem.

Let’s start with an example series of events. A new transaction begins from Node C which sends data to Node B. Node B stores the data in a queue. Node A fetches x items from the queue every y seconds.

After Node A processes the transaction, it begins a new transaction. Node A sends data to Node B only this time, it is no longer stored in a queue. Node B immediately forwards the data to Node C.

On some occasions, Node C starts a new transaction as an acknowledgment from the data that originated from Node A. This transaction is treated as a transaction similar to the first one only that Node A knows that it’s an acknowledgment.

Originally, Node A and Node C communicated to each other directly. The queue didn’t exist. The queue came in to fix a couple of problems but it introduced new ones. Recently, the script in Node A that polls data from Node B died and now it’s catching up with backlog. The script processed data one by one. This showed how slow the main application in Node A is.

I already have a solution in mind and I enjoy writing boring stuff but I’d like to hear other views.

The Few Good Stuff on Television

April 20th, 2008

For me, there are three elements for a good television show: geeks, a hot chick and sarcasm. Lahaina told me to check out The Big Bang Theory and I got hooked the minute I saw the first episode.

The show is set with two physicists and a hot chick who just moved in across their apartment. Given the poor socializing skills of most some geeks (you can count me in), you’d probably get the drift of the series.

Here’s a keeper to spoil you.

I like the chemistry shirts that Leonard wears on most episodes. This show is da sex! I can relate to it a lot. So much that I usually see myself in Leonard and Sheldon.

Reduce Attacks on Apache+PHP

April 20th, 2008

A couple of days ago I thought that one of my servers got compromised. I thought someone cracked my password by brute force and kept shutting down Apache at 4AM. As it turned out, I made a mistake with the log rotation configuration that the post-rotation restart fails to start Apache.

I immediately installed DenyHosts, disabled keyboard-interactive login and hardened the firewall. It made me feel more insecure which resulted into today’s post.

With a fresh install of FreeBSD 7 on another server yesterday, I wanted to make sure that I do it properly from the start this time.

Apache adds the Server header that reveals the OS, version and some modules. PHP also adds an X-Powered-By header that shows the version of PHP. With those information publicly available, someone can write a script that could exploit vulnerabilities on specific versions of Apache and/or PHP.

For Apache, you can use mod_security. It’s available as a port and at Karanbir Singh’s yum repository for CentOS users. See the directive below.

<IfModule security_module>
  SecServerSignature "Apache"
</IfModule>

Also, just to be a happy camper, I used a new configuration file to be included. Consult your configuration for the path. On CentOS, the default configuration directory is at /etc/httpd/conf.d. On FreeBSD, it’s at /usr/local/etc/apache[n]/Includes, where n may be your Apache version.

For PHP, simply set expose_php to off in your php.ini

Disclaimer: This works for me but I’m not sure if this is the best way to do it. I tried mod_headers first but it didn’t work.

Notebook Memory

April 4th, 2008

If your laptap starts to crawl if you have too much programs running at the same time, you can try adding IGB of RAM from PC Express.

Free Image Hosting at www.ImageShack.us

[found by D. Billano]

Insert to Asterisk’s Queue Log When a Member Is Called

April 4th, 2008

Asterisk’s queue_log can come in handy in many cases (queues in Asterisk can be called ACD). There are systems that go as far as depending solely on the queue_log to operate (including mine).

Every now and then requests requirements for a feature to tell if a call in the queue is being transferred to a queue member (an agent) comes up. I had a workaround that used an AGI script but it didn’t work all the time. I’ve been digging around the source code so that it’s inserted into queue_log instead. After three attempts of hacking one friggin’ line of C code, I finally did it. My sincerest apologies to my COMPRO1 and COMPRO2 professors.

You may get the patch for asterisk-1.4.19 over here.

P.S. I know that watching the queue_log isn’t much of a good idea. I only stole the concept and I wasn’t aware of AMI at that time. Migration plans are on the way.

“Viral” Linking

March 31st, 2008

I’m supposed to copy and paste the stuff below.

I have randomly selected 5 of you below to be tagged and I hope that you will similarly publish this post in your blog. You have to tag 5 other bloggers and just keep adding on to the list. (Do not replace, just keep on adding! Yes let’s hope a long list!) It’s real easy! Tag others and see your Technorati Authority increase exponentially!

The benefits of Viral Linking:

  1. One of the fastest ways to see your Technorati Authority explode!
  2. Increase your Google PageRank fast
  3. Attract large volume of new traffic to your site
  4. Build your community
  5. Make new friends!

And these are the people who already took part on this tag:
Blognation, Pinoytek, Reyna, Bluep, Kotsengkuba, Buraot, Iris, Banco De Reyna, Manilenya, Mitch, Melai, Malen, Beng, Sasha, Foolsville, Lloyd Lopez, Vance, JP Loh

The unlucky five are (I didn’t check my Technocrappy page): Dwek, Wildquaker, Sir Joel, Mark Q. and Edwin Kamote (currently unavailable =p).

Just riding along. My blog has attracted all sorts of spambots that exploit WordPress vulnerabilities that I do not want more popularity (if any). Besides, I’m on an all-time low with about two posts per month.

Maybe the higher Technocrappy authority will get me laid.

Celebrities

March 18th, 2008

I’m trying to negate fugliness with popularity. The following are the results of my tests (for your Photoshopping pleasure).

With Jun Lozada

If you want to know my opinion (and others’) about Lozada, you can follow the thread started by Ms. D.

With Jun Lozada (1/2)

With Jun Lozada (2/2)

Embassy

I got invited to this party organized by Flash Manila last Friday. Photos courtesy of Jordana.

Moi and Keana Reeves

Moi and Raven Something

Yes, my blog is dead. I kinda lost the will to blog or something comes up when I want to write something. You can follow me at Tumblr for the meantime.

New Temptations

February 18th, 2008

I was watching CSI:NY and noticed the brand of one of the tablet PCs that they use. The show became less interesting as soon as I started browsing the product’s page.

I think tablets will be the new thing. I seriously want one. Screw ultra-thin laptops. Tablets are way cooler. The rumor that Apple is working on a tablet could still be true (multi-touch et al on tablets?). I dug around and found a few more things below.

  • If the screen is an active digitizer, you get hover functionality (similar to mouse-over)
  • Local prices aren’t that bad
  • Most of the tablets are convertible laptops (I kinda don’t like this because of the hinges, added weight and size)
  • As usual, drivers and apps on Linux are still young
  • The Sahara Slate i440D makes me drool but HP’s TX2000 is cheaper

A Sahara Slate on CSI:NY

I haven’t used a small computer for a very long time. I wonder how a 12″ screen would feel. I think widescreen 15.4″ screens are huge already (all along I thought my laptop was 17″). I bought a 19″ LCD panel last December for desktop use and it’s been nothing but fun. We used to have an 11″ Twinhead laptop and the small keyboard was the only thing I didn’t like about it. Acer used to release laptops that made you position your hands in a way that they won’t be strained even if the laptop was small (I haven’t seen it on new laptops lately).

It could be that the desire for tablets are filling in the shortcomings of handhelds with Windows Mobile. Recently, I found it annoying that most handhelds come with puny internal memory. I multi-task a lot and the limitation on how many programs that can run at the same time makes me feel like a handicap. Tablets are like enlarged handhelds (all it needs is a SIM card slot!). I acquired a fetish for touchscreens.

Although I’ll still use a portable keyboard and mouse when I’m working, the mobility it gives as a tablet is a huge bonus. Picture yourself updating your blog in the morning while in the crapper! How cool is that? Even Sanya told me once to get a tablet (she ended up buying a MacBook though).

Fears that the benefits of an active digitizer touchscreen won’t be maximized on Linux are holding me back. Anybody used Vista on tablets? How about XP Tablet Edition? I could settle with Cygwin but I’ll use SSH with PuTTY on the loopback because the native terminal on Windows is lame and boring. Let’s not forget Compiz Fusion too. What will I do without my wobbly windows?

P.S. Product placement works.

Michelle

February 5th, 2008
Michelle
Originally uploaded by dennysytangco.

*cough* joke lang

Google Docs in the Enterprise

February 3rd, 2008

Very few people know that Google has other services/apps than web search. I use GMail and I love it. All my email addresses forward to that mailbox (except for my Yahoo! email which would still suck even if Microsoft backed them up as long as they don’t have POP and mail forwarding).

One particular client scheduled a meeting once and GMail prompted me for a response (if I was going or not). It appeared as if it was a GMail+GCal thing. It made me think they were using Google Apps (twitter reference).

After the meeting, we were supposed to update a task checklist (originally an Excel file). I told them to just upload the file on Google Docs and share it to everyone. They gave me this look where I lost them somewhere in that line so I brought up the topic that they used GCal to schedule that meeting. It turned out that they were using an Exchange server and GMail interpreted the message and sent the appropriate response.

I showed them Google Docs and after our next meeting, they mentioned that they got so amused with it, they started to use it on more of their documents. Quoting one of them, “we learn something new everyday.”

This client is one of the oldest companies in the country in the field of telecommunications (a couple of friends recommend them). The way Google Docs was used was not really enterprise level but this makes collaboration a whole lot easier. I was tempted to show them Basecamp but I think I should let them get used to Google Docs first. Adding another tool might overwhelm them (avoiding Web2.0 reference).

Focusing on collaboration, which one would you use: Microsoft SharePoint or Google Docs? How about weighing the price and features that met your needs?