[Main] [Photos] [Resume]

Perl: November 2006 Archives

Jabber interop and DJabberd

| | Comments (2)

While doing the big spruce up on my servers for Dytara/whatthefuck.com, I've had the opportunity to play with a few things that I never had the chance to play with. Since I moved the primary web server from FreeBSD to Linux (for shame!), I can finally play with some of the Danga/bradfitz tools that have come out over the past couple of years. Since most of the cool toys he releases rely on Danga::Socket, which relies on Linux epoll(), I couldn't use them on FreeBSD.

One of my favorites so far is DJabberd. It's a pretty elegant and small implementation of the Jabber XMPP messaging architecture, commonly implemented by jabberd and ejabberd. It's no secret that I've tried to implement a nice messaging system for wtf, but it has been aborted too many times due to things being too easy to break into or a pain the behind to integrate. I was hacking together a custom bahamut IRC server for use by a private client for wtf, but this may work out much better. In the distribution, I have built in interop with GTalk, LJTalk, and many other networks (meaning your whatthefuck.com IM account can talk to people on LJTalk or GTalk), instant authentication against my own user database, and a nice plugin architecture that will allow me to create hooks into services on the web site, right out of the chat client. I have an army of clients that support it, from Psi and Trillian on Windows to Adium and iChat on OS X, to about 300 clients on Linux. :D

Hell, I can even connect from a Newton and my Nokia 770.

Anyhow, if any of you are on wtf and want to just try it out and see what happens, feel free to login with username@whatthefuck.com and your wtf password. All of the standard config should apply -- port 5222, SSL enabled, can use anything as a resource. Your connect server is also 'whatthefuck.com'.

Catalyst Studio, anyone?

| | Comments (1)

I've been toying with the fantastic idea of a "Catalyst Studio" type of application. Not saying I would or could write such a thing -- I likely could, it's merely a matter of a "serious lack of time".

A quick and dirty back story: I've been finishing off the newest revision of whatthefuck.com in Catalyst 5.7 on Perl. It's really quite a neat tool, really designed for large scale web applications that require the ability to scale, and will likely have many hands on it. It lacks the (relative) simplicity of your average PHP script, as well as the elegance and niceties that go with other object oriented web application servers such as WebObjects.

WebObjects, for those who don't know, is one of the modern founding fathers of MVC web application development. Large companies used WebObjects to create high availability, large scale applications and paid anywhere from $5,000 to $50,000 for the privilege to do so. WO was originally developed by NeXT Software, was written using Objective-C, and ran on NeXT Server software. As time went on, it ran on Solaris and Windows, and converted completely to Java between version 4 and 5. After Apple bought NeXT, WebObjects became a part of Apple Enterprise. Now, you can't write a WO app in Objective-C, and development is free with any copy of Mac OS X 10.4, and deployment is free with any copy of Mac OS X Server 10.4. Unfortunately, you can't even pay them money to deploy or develop on any other platform. It's simply end of life.

History lesson being complete, I can finally rejoin my train of thought, 200 miles down the track. WebObjects was really cool in that you never had to touch a database, and sometimes, never had to touch code. You would use an application called EOModeler to design a database schema, creating the data sets you need, designing relationships to other tables, and creating a data map. This is a lot easier than it sounds -- if you've ever organized a database, even an Excel spreadsheet, you can use EOModeler. Now here's the cool part. EOModeler will then create the tables in any of its supported JDBC databases, and generate Java classes for you to add, remove, modify, or delete data, so you never really have to write any SQL unless you absolutely have to.

The ORM features in Catalyst allow the same type of system to happen. You can tell Catalyst to generate some classes based on your existing MySQL, or Postgres, or whatever database, and you can use those classes to do the same add/remove/modify/delete as above. Except for the fact that you have to manually declare relationships within each class. The references to them are kinda odd as well, but I can go into that later.

The other issue with Catalyst is the fact that it's written in Perl, so there are twelve different ways to do the same thing. Catalyst is the perfect microcosm of perl culture. When I first looked at Catalyst, early in 2005, there was a certain recommended way of creating your application, and a certain database model (Class::DBI or Class::DBI::Sweet if you were on the edge), and most tutorials had you manually creating classes anyhow. Now, it's all DBIx::Class::Schema and RenderView, and this will probably all be replaced in 5.8. On top of that, many of the handy perl IDEs won't help you much with your Catalyst object ($c), or render the standard Catalyst tree very well. Java users have all sorts of fun tools, and WebObjects users have a whole IDE that work very well. Sure, we have TextMate or Komodo, but they aren't the whole shebang, and I want the whole shebang.

Maybe I will take on a project that works like EOModeler, but works with DBIx::Class::Schema and Catalyst. Maybe we can go from there.

Technorati Tags: , , ,

Dytara

http://www.dytara.com
My little shell and holding company, currently under construction.

My Projects

Twitter Updates

    About this Archive

    This page is a archive of entries in the Perl category from November 2006.

    Perl: September 2006 is the previous archive.

    Perl: March 2007 is the next archive.

    Find recent content on the main index or look in the archives to find all content.

    Pages

    Powered by Movable Type 4.21-en