Google App Engine + Java

April 8th, 2009

Google has released Google App Engine with support for Java!

It includes a neat plugin for Eclipse also. Here is a video showing features of the Eclipse plugin.

Must test this during the Easter holiday!

  • Digg
  • del.icio.us
  • Facebook
  • StumbleUpon
  • Google
  • Reddit

Sticky load balance with Apache HTTPD 2.2

March 18th, 2009

Apache HTTPD 2.2 includes some interesting features for making a basic load balancer.

This configuration makes a sticky loadbalancer with 3 backend servers. It is not dependant on any specific configuration of the backend server such as JSESSIONID or PHPSESSIONID.
It will create a BALANCEID-cookie with a route to a backend server.


#You need at least these modules
#Header used for setting cookie
LoadModule headers_module ...
#Proxy
LoadModule proxy_module ...
LoadModule proxy_http_module ...
LoadModule proxy_balancer_module ...

#Set a cookie if BALANCER_ROUTE_CHANGED containing BALANCER_WORKER_ROUTE environment variable
Header add Set-Cookie "BALANCEID=hej.%{BALANCER_WORKER_ROUTE}e; path=/;" env=BALANCER_ROUTE_CHANGED

#Show balancer-manager
<Location /balancer-manager>
  SetHandler balancer-manager
  Order allow,deny
  Allow from all
</Location>

ProxyRequests Off

#Configure members for cluster
<Proxy balancer://jakeri>
  BalancerMember http://b1.jakeri.net:80 route=server1
  BalancerMember http://b2.jakeri.net:80 route=server2
  BalancerMember http://b3.jakeri.net:80 route=server3
</Proxy>

#Do not proxy balancer-manager
ProxyPass /balancer-manager !

#The actual ProxyPass
ProxyPass / balancer://jakeri/ stickysession=BALANCEID nofailover=Off

#Do not forget ProxyPassReverse for redirects
ProxyPassReverse / http://b1.jakeri.net/
ProxyPassReverse / http://b2.jakeri.net/
ProxyPassReverse / http://b3.jakeri.net/

I believe that this configuration is somewhat better compared to this guide.

I got to fix my css for the <code></code> :-/

  • Digg
  • del.icio.us
  • Facebook
  • StumbleUpon
  • Google
  • Reddit

iPhone 3.0 highlights

March 18th, 2009

- Cut, copy and paste
- Swedish keyboard (åäö)
- Tethering, use the iPhone as modem
- MMS (kind of useless but other non iPhone uses it)
- Spotlight

and much more.

  • Digg
  • del.icio.us
  • Facebook
  • StumbleUpon
  • Google
  • Reddit

Apples releases Safari 4 Public beta

February 24th, 2009

Apple released Safari 4 Public beta today!
Even more competition to the javascript speed race.
Nice features such as Cover flow, Nitro (new Javascript engine), history view, native windows look and feel etc.

  • Digg
  • del.icio.us
  • Facebook
  • StumbleUpon
  • Google
  • Reddit

Google supports ActiveSync

February 16th, 2009

This is an update to previous post about ActiveSync for Google Calendar.
Google has now released ActiveSync support for their contacts and calendars.

Visit their Google sync - iPhone page for more information.

  • Digg
  • del.icio.us
  • Facebook
  • StumbleUpon
  • Google
  • Reddit

Beautiful code with wordle

January 27th, 2009

Had to test generate a wordle from source code. In this case HttpServletRequest.java.

  • Digg
  • del.icio.us
  • Facebook
  • StumbleUpon
  • Google
  • Reddit

SSL to SSH tunneling (stunnel)

January 25th, 2009

Sometimes it can be handy to reach your home server even if you have all sorts of proxy servers and firewalls between you and your home server (e.g. from work). 

Stunnel to the rescue!. Compile it, install it or just download it from some repository (I used macports).

On the server:

  1. Create server configuration file for stunnel. Example below accepts ssl traffic on port 443 and forwards unencrypted traffic to the ssh port (22). Add your own certificate file for higher security.

    cert=stunnel.pem
    pid=/tmp/stunnel.pid
    [stunnel443]
    accept = 192.168.1.7:443
    connect = 192.168.1.7:22
  2. Run sudo stunnel <server-config-file>
  3. Test to connect with openssl, openssl s_client -connect 192.168.1.7:443. After all ssl handshake code you should probably get something like: SSH-1.99-OpenSSH_5.1
  4. And now you have a SSH over SSL!

On your client machine:

  1. Create a new client side configuration file. This will create a listener on port 21222 and all traffic will be sent ssl-encrypted to 192.168.1.7:443

    #cert = stunnel.pem
    pid=/tmp/stunnelclient.pid
    #foreground=yes
    client=yes
    [21222]
    accept=21222
    connect=192.168.1.7:443
  2. Run sudo stunnel <client-config-file>
  3. It should now be possible to run ssh -p 21222 localhost to create a connection to your server machine

Voilà, a SSL tunnel for transporting SSH!
All SSH traffic nicely hidden in a SSL tunnel.

  • Digg
  • del.icio.us
  • Facebook
  • StumbleUpon
  • Google
  • Reddit

Memory upgrade on a Mac mini

January 24th, 2009

I found two 1GB memory cards just laying around at home. My mac mini only had 1GB memory in total but can handle 2GB. So I decided to upgrade my mini!
This will probably void warranty but my computer is way to old anyway. I found a great video-tutorial that I followed.

Tools used: putty knife, baby blanket, old company entry card (IKEA IT) and some other random card.

  • Digg
  • del.icio.us
  • Facebook
  • StumbleUpon
  • Google
  • Reddit

Even better support for Google Calendar and iCal

December 3rd, 2008

Google released official support for iCal integration with a new tool.

This is a follow up to my previous post.

  • Digg
  • del.icio.us
  • Facebook
  • StumbleUpon
  • Google
  • Reddit

Sync Google Calendar (in a good way) with iPhone (iCal and Outlook)

November 18th, 2008

I have had quite some trouble getting my calendar in sync on all my devices. I want to use Google Calendar in Apple iCal (my home/work computer), Microsoft Outlook (work computer), iPhone (in my pocket) and through web based Google Calendar.

Outlook sync is solved with Google Calendar Sync for Outlook.

My headache were then Apple iCal and the iPhone. I know one commercial solution but I don´t think I should have to pay for this.

So I started to test Google’s guide with CalDAV. This got iCal in sync with Google, but my iPhone could not add new events in this calendar (oddly enough). It created a new calendar on the fly. Not a good solution for the iPhone.

Today, I found NuevaSync! Their service exposes Google Calendar as a Exchange ActiveSync service. It’s still in beta but seems to work quite nice.
Google now supports ActiveSync!

  • Digg
  • del.icio.us
  • Facebook
  • StumbleUpon
  • Google
  • Reddit