Oct 28

Article: Give your DB a Break

Tech No Comments »

My article on DB caching and scalability went up on TheServerSide.

Introduction

How many projects have you worked on where the bottleneck in testing was the database, for both performance and scalability? In my experience, getting to the data, creating new data, and updating data takes a fair amount of effort.

If you are developing a small application, then you may not be worrying about scalability as much. However even small applications like to run fast! When you get to larger enterprise applications, then the concern grows significantly. As you add more and more concurrent users your poor database gets more and more bogged down.

This article discusses how caching data in front of the database can give our DB a break, and allow for faster running, and more available applications.

In particular, We will look at:

* What is clustering?
* Using a distributed cache
* Caching strategies
* Read-through / Write-behind caching
* Technologies that integrate nicely into this architecture

Oct 28

How evil is your site?

Tech No Comments »

TheServerSide is only 27% evil according to Gematriculator. I wonder if this is because there are no posts relating to .NET right now? :)

How evil are your sites?

“The Gematriculator is a service that uses the infallible methods of Gematria developed by Mr. Ivan Panin to determine how good or evil a web site or a text passage is.

Basically, Gematria is searching for different patterns through the text, such as the amount of words beginning with a vowel. If the amount of these matches is divisible by a certain number, such as 7 (which is said to be God’s number), there is an incontestable argument that the Spirit of God is ever present in the text. Another important aspect in gematria are the numerical values of letters: A=1, B=2 … I=9, J=10, K=20 and so on. The Gematriculator uses Finnish alphabet, in which Y is a vowel.

Experts consider the mathematical patterns in the text of the Holy Bible as God’s watermark of authenticity. Thus, the Gematriculator provides only results that are absolutely correct.”

Oct 28

Rickard’s AOP Mixins

AOP, Tech No Comments »

Rickard and Crazy Bob are having an interesting blog conversation about AOP and mixins. Rickard has recently enhanced his AOP framework to enable some form of static typing, to get around the loose typing that he had before. Now, he can place “implements Interface” on classes…. and instead of actually implementing them, his framework will take care of that.

This seems fairly similar to implementing interfaces in AspectJ, and having those interfaces actually have implementation code in them (yes, with AspectJ you can add concrete methods to Interface types!).

Very powerful stuff.

Read the blogs:

Rickard’s original post: AOP – dynamic and static at the same time!
Bob’s response: Rickard refines his AOP framework.
Rickard’s response to Bob’s response: AOP – abstract clarifications

Oct 24

Regex Coach

Tech No Comments »

I am a big fan of regular expressions, probably partly due to my work with Perl in the past ;) I was pointed to “The Regex Coach”, which is:

“… a graphical application for Linux and Windows which can be used to experiment with (Perl-compatible) regular expressions interactively. It has the following features:

  • It shows whether a regular expression matches a particular target string.
  • It can also show which parts of the target string correspond to captured register groups or to arbitrary parts of the regular expression.
  • It can “walk” through the target string one match at a time.
  • It can simulate Perl’s split and s/// (substitution) operators.
  • It tries to describe the regular expression in plain English.
  • It can show a graphical representation of the regular expression’s parse tree.
  • It can single-step through the matching process as performed by the regex engine.
  • Everything happens in “real time”, i.e. as soon as you make a change
  • somewhere in the application all other parts are instantly updated. ”

It is one of those tools that just works, and does what it says on the can. If you get into any knarly regex, this can help you out.

Download The Regex Coach

Interesting Technical Info

“The Regex Coach is written in Common Lisp and was developed using the LispsWorks development environment by Xanalys. The regex engine used is CL-PPCRE.
It might be worthwhile to note that due to the dynamic nature of Lisp The Regex Coach could be written without changing a single line of code in the CL-PPCRE engine itself although the application has to track information and query the engine while the regular expressions is parsed and the scanners are built. All this could be done ‘after the fact’ by using facilities like defadvice and :around methods. Imagine writing this application in Perl without touching Perl’s regex engine… :)

Also, thanks to Lispwork’s cross-platform CAPI toolkit the code for the Windows and Linux versions is nearly identical without any platform-specific parts (except for some lines regarding different fonts and keybindings).”

Very interesting stuff. defadvice and :around… remind anyone of anything? :) (AOP isn’t a new thing!)

Oct 23

AOP – New languages or not?

AOP, Tech No Comments »

Rickard has a blog entry “AOP – academic vs community” in which he notices that everyone and their auntie is creating a new language for AOP in the academic community.

Rickard seems to much prefer the “we can do this in Java” way of doing things. Althought I am sure that we won’t be using these languages in mainstream, this is what people do in academia isn’t it? They test boundaries, try out assumptions, etc.

I am personally interested in both: a) what cool AOP things we can do with our current languages, and b) what cool concepts *deserve* new keywords, and new constructs in a language. I have grown to like AspectJ, and think that if AOP hits off it will be natural to have a language like this.

Doesn’t it seem a little like going back in time when OOP started to develop. There were again lots of languages in academia, and “the real world” had many people saying “why not just use vtable dispatches?”, and then “let’s strap it on C [C++]“. Here we go again… lets see what happens when we jump off the round-a-bout.