Skip to content

All posts by moore - 68. page

Oracle AMIs for EC2

Many years ago, I did an internship with the database group at the company where I was working. I still have the printout on installing Oracle, and I remember it being at least 40 pages. There was a lot of voodoo with user accounts and kernel settings.

While I’ve worked with Oracle since, I haven’t been responsible for installing it; things may have become easier. But now, they definitely are easier. From the Amazon Developer Newsletter:

Oracle has produced four publicly-available Amazon EC2 AMIs with pre-installed and configured software for Enterprise, Standard or Express editions. In a matter of minutes, developers can have a fully configured Oracle Database computing environment running on Amazon EC2 that includes the web-based management tool Enterprise Manager Database Control and the web-based rapid development tool Applications Express (APEX).

[tags]ec2,oracle,the cloud[/tags]

What A Scam: “Colorado Corporate Compliance”

If you are part of a Colorado corporation and get an “Annual Minutes Disclosure Statement” request from Colorado Corporate Compliance, you should read this notice from the Secretary of State’s office:

The Colorado Secretary of State’s office has recently become aware that entities by the names “Colorado Corporate Compliance” and “Board of Business Compliance” have mailed solicitations titled “Annual Minutes Disclosure Statement” or “Disclosure Statement” to many Colorado entities. These solicitations offer to process corporate meeting minutes on behalf of the corporation for a fee. Despite the implications contained in the solicitations, Colorado corporations are not required by law to file corporate minutes with the Colorado Secretary of State’s Office.

The warning signs were there: I had not received this notice before, the timeline seemed short (sent on Sep 3, due on Sep 15), and the $150 fee seemed a bit steep. But, if I hadn’t searched for this company, I probably would have sent a check–it looks official. (To be fair, it does, at the bottom of the back of the form, say what the service is actually about–making minutes available to members of a corporation). Just goes to show you that the scammers aren’t just out to protect your domain names or send you virulent spam.
[tags]scam, colorado corporate compliance[/tags]

Squid cache log configuration thoughts

I have found that debugging squid, the excellent web proxy, is difficult.

I believe this is for a number of reasons, but primarily because I’m a developer, and just want to get squid working. I’ve found that I do this with a lot of tasks that are required of the small independent developer with time pressures–CSS/UI development, database design, system administration. All these are things that can be done well by competent specialists, but my clients often don’t have the money to hire them, or time to find them, so they get me. What they get is not in depth CSS knowledge and in depth knowledge of the entire user interface problem domain, for example. Rather, clients get my ability to figure out the problem (based, to a large extent on internet knowledge and to a lesser extent on my deep understanding of web applications and how they should behave) and my tenacity to test and test again to ensure that corner cases are dealt with. It’s a tradeoff.

Regardless, squid is hard for me to debug, and I found this page which lists all the options for the cache.log debugging parameters useful. However, not all that useful–‘client side routines’, number 33, apparently includes squid ACL parsing. Rather, I’ve found the Squid FAQ to be the single most helpful document in terms of my understanding squid enough to ‘get things done’. However, this time I ended up viewing the access log of my http server, while deleting my browser cache multiple times, to confirm that caching was set up the way I thought I had configured it.

[tags]squid,getting things done[/tags]

Google Chrome First Impressions

Here are my thoughts on Google Chrome. Yup, I’m following the blogging pack about a week late. First off, the install process was smooth. The comic book stated that the rendering engine is Webkit, which should make testing relatively easy. This is borne out by the user agent string: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.29 Safari/525.13

They give you the ability to change the search engine, and other options, easily. It definitely follows a Macish configuration processs–you don’t have to apply or save the config changes you make, you just make them and close the options screen.
As Farhad Manjoo mentions, there is a lack of addons. (Addons are pieces of functionality that are extend the browser’s behavior [think adblock], as opposed to plugins which extend the browser’s ability to handle content [think flash]). I didn’t see much about addons or plugins for Chrome searching today, other than some strong desire for it. I don’t remember any mention of addons in the comic book or on the Chrome website. Also, as Manjoo mentions, opening a new tab by clicking next to the existing tabs doesn’t work (though there is a plus icon up there which it should not take too long to get used to).

It looks like there is already a way to create simple desktop applications like a calculator that use chrome as their ‘shell’, javascript as the programming language and HTML for user interface definition. That’s very similar to Adobe AIR (at least the ajax version) and something like the C#/XAML pairing as well. Let’s hear it for declarative markup for user interfaces!

The custom start page seems pretty neat, with the ability to have bookmarks not in a pulldown menu, but right on the start page, which also includesthe ‘most visited’ sites. Machine learning of this type can be a great time saver.

From a development standpoint, there is a javascript/DOM console, which looks similar to Safari’s. It is, however, much more responsive and stable, though I still can’t figure out what the ‘search’ box does. However, the wealth of development tools that I use everyday in FireFox (web developer, yslow, firebug, whois, live HTTP headers) will take time to migrate over to Chrome, if they do so at all. This will continue to make developing in FireFox first and testing in other browsers my default strategy.

Finally, Cringley has some interesting comments on Google’s motivation.

[tags]google chrome[/tags]

MySQL and memcached: notes from a webinar

Just listened to another mysql webinar. This time it was about mysql and memcached. I got in a little late, but here are my notes.

Memcached is a distributed caching mechanism. Not as robust as Coherence, for example, but free, open source, and widely used and supported.

There is a project that hooks mysql UDFs to memecached.

The main speaker worked at Grazr, a feed manipulation company. He presented some lessons and stated that some seemed obvious, but we all know how it is, you learn mistakes the hard way.

  1. Beware architecture momentum–early decisions influence later ones.
  2. Your scaling plan is wrong in some way!–grazr overbuilt.
  3. Testing is limited: they had issues with replication speed. Users are better at testing site than any perl script.
  4. Replication is fast, until it isn’t. It’s asynchronous nature can make it hard to program to.
  5. Memcached is your friend
  6. Sphinx, an open source SQL full text search engine (like Lucene), is your friend. It also has a mysql storage engine–virtual table that you can join with other data sources. This sounds cool.
  7. Do bulk insert and lazy writes–if you don’t need to immediately read it, do the write later.
  8. Emphasis on scaling hurt user experience. Fast, data correct transaction are available with two options: one server, or a sync buffer like memcached.
  9. Use instrumentation–he mentioned tools like nagios and cacti (cacti has mysql plugin [which I couldn’t find]) to help scaling–close the loop: when you make a change, find out what that change did.
  10. Try new things–for example, the MySQL blackhole storage engine for data that is only read on slaves, not on the master.
  11. Everyone has same problems–avoid Not Invented Here syndrome. Not just the obvious stuff (who writes a web server these days–oh wait), for example, there’s a batch job processor like gearman. Note that he also said they had to Invent a few things before they learned this lesson.
  12. Accept change–design for now+1, not now+100
  13. Listen–even folks not intimately familiar with your technology may have good ideas, and more brains are better.

End notes

Looks like a couple of interesting whitepapers are available (you’ll have to register and get pinged via email a few times by sales folks): “Designing and Implementing Scalable Applications with Memcached and MySQL”. And there are future webinars on the MySQL/memcached topic, one on SAAS applications and one on Scalable web architecture.

In a meta note, I enjoy the webinars because:

  1. Easy to get to
  2. Free
  3. High quality
  4. One can bail if you want (which I did a few weeks ago when MySQL proxy http://forge.mysql.com/wiki/MySQL_Proxy didn’t turn out to be all that interesting to me).
  5. The give me something to blog about 🙂

[tags]webinar, memcached, users are the best testers[/tags]

GWT Mini Pattern: Bare Bones Entry Point Class

Don’t ever let your entry point class do anything. Why? Because the constructor of the entry point class will be called twice. Once when the object is being instantiated so that onModuleLoad can be called, and then once if your code does anything useful in the constructor. You can also have a constructor that does nothing active (XHR, modifying the DOM) in which case it won’t matter that it is called twice (except it will slow down the user’s computer a little bit.)
Here’s an example of how not to do it (sorry for the [lack of] code formatting):

 

public class Display implements EntryPoint {  public void onModuleLoad() {  final RootPanel rootPanel = RootPanel.get(COMPONENT_HOME_ID);  if (rootPanel != null) {  Display fd = new Display();  } }  public Display() { Window.alert("new date: "+new Date()); // more stuff }  // more stuff }

If you were to compile and execute the code above, you'd see two different alerts. Instead you want:

public class DisplayEntry implements EntryPoint {  public void onModuleLoad() {  final RootPanel rootPanel = RootPanel.get(COMPONENT_HOME_ID);  if (rootPanel != null) {  Display fd = new Display();  } }  }  class Display { // or it could be in a separate java file public Display() { Window.alert("new date: "+new Date()); // more stuff }  // more stuff }

You can also get around it by having a no-op no arg constructor (which all EntryPoint classes are required to have) and one that takes arguments that you'll use in your class to do something.

Tested on Windows, GWT 1.4.62.

Useful Tools: Skype

Skype is something that I’m relatively late to the game on, but now I can’t believe I lived without it. I use it as a secondary line for my business.  (I know, I know, next thing you know I’ll be telling y’all that the “internet” is the next big thing.) I have a relatively old plan and get nailed whenever I go over in minutes–35 cents a minute. I am planning to get a new plan and phone sometime soon, but want to make sure I get a great phone, and haven’t had time to comparison shop.

Skype is letting me postpone getting a new phone by letting me use my minutes more effectively. Check out my sweet old phone–a super solid Nokia:

Phone

At first, I only had Skype Out, which let me call people in the US for the measly sum of $6 dollars a month. Just recently, I signed up for Skype In, which is actually less expensive–$24/year, and lets me receive phone calls.
However, I won’t be passing out my new Skype number–I want people to associate me with the same number I’ve had since I first got my cell phone. Instead, I’ll just forward all calls from my phone to my Skype number when I m in front of a computer.

I originally got Skype because of the cost savings, but it also makes me more effective on the phone. With a headset that I bought for $40 a year ago, I can type and talk at the same time, as opposed to using speaker phone and/or craning my neck.

The only thing I use my phone for that Skype doesn’t replace is text messages–I use teleflip.com for that, because it is free.

I haven’t really explored the other features of Skype–computer to computer calls or conference calling–but right now Skype does what I need it to do.