Note: this post has been in my drafts for so long I’ve changed company and so this isn’t strictly relevant to me now. I developed this in my own time while working at my previous company and I figure it may come in useful to someone.
I’ve just been playing about with NHibernate and Advantage Database Server (ADS).
I’ve done some initial code to make NHibernate work with both DBF and ADT files.
I’ve put a sample solution up with both DBF and ADT configuration files. I’ve created a dialect and a driver for them. I’ve also found it necessary to create an ID provider in order to deal with the DBF’s. Since the NHibernate team recommends using a HiLo ID creator however it seems to make sense for the ADT dialect to also specify that by default. I found it necessary to create the ID provider because ADS provides an odd way to lock records that isn’t done via SQL, it’s done via their data provider classes.
This dialect does the bare minimum to support the sample I found at the start of my NHibernate In Action book. It does no more. It doesn’t do anything like type mapping or any of the other things a dialect normally does.
I’m not sure what to do with this next. I have tried running it against the NHibernate tests but there are so many failures because I’ve not implemented the basic things it’s a bit hard to see where to go.
For now I think I’ll see if I can use it in practice and then see where the holes are.
The one less than ideal thing that I’ve had to do is with the IIdentifierGenerator is basically copy the bits of code I wanted from the TableGenerator class and then modify them as required. I get the feeling that having to lock records in the manner I’ve needed to isn’t particularly common though.
To see the project and example download it from here. You also need to download the Advantage Data Provider from http://devzone.advantagedatabase.com/dz/content.aspx?key=20&Release=13&Product=4&Platform=11.
This is actually something I wrote in 2007 but it still appears to be relevant so I figured I’d kick it out there. Since then the only major thing I can see that’s missing is the IE developer toolbar which is now a standard part of IE 8.
A web traffic monitor that hooks into the IE http stack and operates as a proxy server to allow other applications like Firefox to be monitored. Just seeing the traffic is really useful but it actually allows you to meddle with the data too! Windows only.
The error reporting of your browser can often be useful. The error reporting on Firefox is especially useful.
Web developer toolbar
A useful Firefox extension that allows you to see all sorts of information about the website.
Useful for automating testing. Allows testing in most browsers. If you copy over a blank Firefox profile before testing you can even reset the cookies and such like to make everything repeatable.
Actually this is useful for a lot of network problems. You can see what’s actually going over the wire. There is a version for most platforms.
A kickass util developed by one of the guys from l0pht. So simple yet so useful, essentially just allows you to do all those socket operations from a command line util so you don’t need to create your own tiny programs. Does tcp/udp/connecting and serving. Buffers the line you are entering so it’s more useful than telnet.
Downloads for Windows seem to have dried up but you can always grab a port written in a scripting language like Python. The *nix downloads are still alive and kicking.
Note: this is an old post I’m clearing from my draft queue dating from 2007. I’m not sure it’s really relevant any more but what the heck. I think Advantage are on version 10 now.
If you aren’t using Advantage 8 and need to use Advantage 7 you can still use it all from .net. You just need to use the OLE DB driver that they provide.
A sample connection string for the OLE DB provider is,
Provider=Advantage OLE DB Provider;
The main difference between this and the .net data providers connection string is the server type.
I’ve always known Linux was easy to setup as a router but until just now I’d never actually gotten round to figure out how to turn a box into a gateway. I knew how to setup the network side, setting up the routes etc. but the bit where you tell a box to forward packets from one network to another I just never got around to finding. It’s dead simple so I figured I’d better jot it down for the next time.
/etc/sysctl.conf and uncomment out the
To set forwarding right now without a reboot or restart of anything you should then do this,
echo 1 > /proc/sys/net/ipv4/ip_forward
If you’re after a more detailed guide covering setting up your own gateway I found this information from http://technology.ezinemark.com/ubuntu-firewall-router-gateway-31d0966f5c3.html which covers the whole subject in more detail.