Apache Mina + DNS
May 31st, 2008
I’m currently implementing DNS on top of Mina 2. If you are interested, feel free to take a look at the makeshift page.
Maybe I’ll create a DNS based load balancing solution from this somewhen, featuring a nice Web backend for editing and adding routines for node failure detection to it (maybe Rhino based?). So, when a server is down, DNS servers will notice this and deactivate the corresponding nodes until they are back online. In combination with a good clustered filesystem this could be the base for a highly available cluster on cheap linux boxes without huge configuration needs (ok, a ~10 second downtime of single nodes still needs to be tollerated). I think I’ll look for a domain company supporting real NS entries soon :-).
Update:
Ok, I got most of the features that I personally need ready. Now you can define a datasource for DNS records and for now this can be either “Memory” (records created at runtime and fully cached) or “Database” (a JDBC layer). With the database datasource it is possible to update records on the fly while the caching features of “Memory” still remain as long as records do not change (think I’ll create a quick PHP backend for this). You could also run status daemons in the background that automatically deactivate unreachable hosts (UPDATE dns SET active=’0′ WHERE …).
You can also use every database that is supported by JDBC (e.g. MySQL, PGSQL, MSSQL, Java DB, SQLite etc.) - I think this is a big feature plus that I never saw before for a DNS server. Of course you can also implement your own custom datasources (maybe LDAP) and I am thinking about adding a simple zone file datasource so you can use the DNS server as a BIND replacement easily.
FastCGI for Apache Mina
May 9th, 2008
One of my recent activities focused on the excelent Apache Mina NIO framework. I played around with it while creating an improved version of the current chat server for Schlach.com and besides added FastCGI support to Mina to try out the possibilities. With the library it is now possible to develop efficient FastCGI server applications easily and I also added all the tools to talk to remote FastCGI servers like PHP/Ruby etc.
If you are interested in trying this out, take a look on its makeshift page. The client side code seems to be still a little slow, so if you find some improvements especially to using the IoConnector, please let me know.