env. preparation

Uncategorized March 17th, 2008

Keeping many tools at hand is very necessary:

  • Windows under Ubuntu via VirtualBox
  • StarUML on Windows
  • Wine for light wight windows executables (e.g., StarUML)
  • Java & Web IDE and frameworks
  • db server, web server & app server
  • Project Planning Utilities: openproj & planner
  • Project configuration tools
  • Auto-build and release env.

Still needed:

  • free style drawing tool

During preparation, some tools did impress or even shock me a lot.

VirtualBox is simple and small, only 20+M, but powerful, have better performance than VMware workstation. Most importantly, it’s open sourced therefore totally free.

VMware Server 2.0 beta is unbelievable and ambitious. Its web infrastructure access shocked me a lot, not only for management of vms (ajax) but also for vm console directly from web browser. Speaking of web browser based vm console, no java/flash/silverlight/AIR is used, but platform dependent implementation of browser plugin is used. Remote access to all of these conveys the ambition or even revolutionary of this product. Enterprise level (not only for big giants, but also for small and medium business) virtualization is just around the corner. It also gives us another picture about thin client and SaaS. Where’s grid computing? I guess they may take the position of the underlying layer of virtualization and act as more a way for aggregating organization wide computing power than a way for providing charged public service. But wrt grid computing non-profit academic research has a different picture. We are really coming to an era of web and distributed system.

Virtual or virtualization is really a beautiful word! But actually it’s abstraction for coping with complexity.

Related Posts

Tags: , ,

Sharing one dsl internet connection in a HUB-based LAN

Uncategorized January 29th, 2008

Since I’ve got a new laptop, I’d like to share one internet connection between it and my desktop pc, both of which dual-boot Linux (Ubuntu) and Windows (Vista/XP).

Until now I’ve only tested the sharing when both are under ubuntu, latter I’ll test it with one on Ubuntu (which serves as the router) and another on Windows. If in your case Windows machine are connecting to the Internet, then you may use Winows’ ICS (Internet Connection Sharing) which is very simple. But now I’m writing the cases where Ubuntu machine is connecting to the Internet.

Configuration:
laptop (ubuntu 7.10)
eth0 (192.168.0.1) <–> hub
ppp0 <–> Internet

desktop pc (ubuntu 7.10)
eth0 (192.168.0.8) <–> hub

The following steps will do this job:
on laptop:
1. enable NAT (network address translation, you may encounter this if you’re playing with vmware)

root:~> iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

only doing this, you may not get NAT enabled after you reboot your system. So add the following to /etc/network/interface (may be at the end of auto eth0 section):

pre-up iptables-restore < /etc/iptables.rules
post-down iptables-save > /etc/iptables.rules

optionally if it doesn’t work with all the others (including all those below), try this first before the others:

root:~> iptables -P FORWARD ACCEPT

2. enable ip forward. add this line to /etc/sysctrl.conf (may be at the end of this file):
net.ipv4.ip_forward = 1

On desktop pc
1. set laptop as the gateway of it

root:~> route add default gw 192.168.0.1

All done! Now reboot the laptop and make the dsl connection. To check everything you configured normal just do this:

root:~> cat /proc/sys/net/ipv4/ip_forward
1
root:~> iptables -t nat -L MASQUERADE POSTROUTING
target prot opt source destination
MASQUERADE 0 — anywhere anywhere

If you get the same output, then everything goes all right. Ping a website on the desktop pc to ensure the sharing succeed.

I did all the above following these:
http://forums.afterdawn.com/thread_view.cfm/616232
http://lindesk.com/2007/04/internet-connection-sharing-using-iptables/

The key point for understanding what these steps mean and do to your system is to understand the command iptables and the target (iptables term) MASQUERADE. I read the manual of iptables carefully and as I understand, enabling MASQUERADE (or NAT) replaces the source addresses of packets that the desktop pc sends out to the Internet with ppp0’s address and destination addresses of packets that are sent from the Internet to your desktop PC with your desktop pc’s address in the LAN. In addition “-o ppp0″ means all packets going out through ppp0 will be MASQUERADEed.

But the trick is how the laptop know which packets are sent to itself and which are sent to the desktop pc. If your ever somewhat investigate network connections in a LAN, you may find it is the port number that is the secrete.

To make things clear, iptables contains some rules (table of chains) to handle any packets going through. You can add, delete and modify these rules. Roughly, a rule is made up of two parts: 1) the criteria to match packets; 2) for the matched packets, what you wanna do with them, which is called a “target”. The rough syntax of the iptables command is:

iptables [-t table] [param] [some chain in the specified table] [option]

Many built-in chains (each chain is a chain of rules) contains some pre-defined criteria to match the packets. In this post, we just utilizes the built-in rules and pre-defined target (yes target can be separately defined).

Note: the terms and understandings may not be accurate, because It’s just my understanding without further deep investigation.

Related Posts

Tags: , , , , , ,

Finally decide to use the genkitheme for this blog

Uncategorized January 9th, 2008

This blog is created for the purpose of being as a CMS (Content Management System) for software development (actually I call myself a *designer* sometimes for fun, yes, software designer) I’ve involved in, technologies I’ve learned and am learning, sometimes resource collection, etc. In a word, it’s mainly about codes and all stuff related.

And like a similar blog previously I wrote, it will be written all in English. This is for the ease of avoiding translation new and non popular technology terms, which otherwise would be mixed with other text that is in my mother language: Chinese. Yes, it’s totally crap. Straightforwardly, I’m lazy. But don’t expect highly for my English. Maybe I call it English and you don’t. All crap!

Only one thing I wanna say is about the theme, named genkitheme (any idea about the name?) that I chose for this blog. Actually I first see it at Robert Mao’s blog. I just feel comfortable when I saw it. One of the best thing that I like it is that it has a flexible width so that wide enough area is there for the post content which is sometimes very important for code snippet and pic demonstration. I tried to find a better 3-column theme than this one but in vain.

And I’m also looking for a good Linux (I’m under ubuntu 7.1 for most of the time) desktop tool for writing blog. Previously I used Windows Live Writer for a long time for mainly for my another blog (it’s mainly about my life sharing with my family and intimate friends). It’s really the best one I’ve ever used (If you work under windows you may follow Robert’s path to reach it. I reached it before he made it :). Until I find that tool, I’ll write posts online.

And in case you are browsing this blog to find something valuable, I’d better tell something about my tech background so that you may not waste your time here. Currently, I’m not a guru in any area and I just started my career as a Java developer last June. Languages that I really know (used it for coding for a relatively long time) are c/c++ (ever wrote codes for some *baby* embedded system), delphi (not for .Net platform) and Java/AspectJ. For other many commonly used languages, I won’t say anything about them for they’re commonly used. I hold a master degree in CS and a bachelor degree in EE. I spent a lot of time researching in areas like programming languages, OO, AOP and software engineering theories (yes, theories). Recently I’m extremely interested in web related stuff. But you may consider me as beginner level. I’m very pleased to be able to work on some open source projects if given the opportunity. And also I’m looking for a career in a Internet company (especially startup company). I won’t repeat my resume here. It’s enough.

Last but not least, you can reach me by kenyth at gmail dot com.

Related Posts

Tags: , , , , ,

Hello world!

Uncategorized January 7th, 2008

Welcome to Kenyth.name. This is your first post. Edit or delete it, then start blogging!

Related Posts

Tags: