Sunday, January 27, 2008

Another project/business idea for you

Previously I mentioned the need for a "liveblogging" server (and javascript client code) to handle millions of concurrent users. Perhaps not the biggest market, but in time you could extend it to other markets

Here's another idea. Recently I had the joy of playing around with ActiveMQ, the J2EE messaging api. I'm sure it's "fine"... the problem is that it doesn't have a focus. it does every possible type of messaging, pub-sub combination. And to handle this is uses the typical java bloatware. The internal engine is Derby. To store a single message they use a ful SQL database! Nutty! Also there are a million parameters, each with different ways of setting them. Some are in a config file, some are in the connection handler, some are in the message, some are JMX. As if the usual 1,000,000 java XML files weren't enough.

On the other end of the spectrum is Amazon's Queue service. I haven't kicked the tires, but people who have say it's good for small scale applications. Interesting idea.

Lots of small companies would love to use a queue to allow them to decouple various components. Most aren't financial. So if a message happens to get lost, it's not the end of the world. most of the time it doesn't even matter that much the order (meaning if they are out of sequence it's not horrible either).

So here's the idea. Queue in a Box. Not like Tervela. That's too high end. I'm talking about a $5k box, where you plug it in, Support a few protocols like memcached or STOMP or HTTP REST. A nice web interface to configure it, probably doesn't need more than dozen paramters, some monitoring. Add some raid disks for durable storage. DONE. One tricky part is to make it so you can just add more Q-in-a-Box and "it just works".

I personally know a few people right now that would buy these. hell you could expand the product offering with Squid-in-a-box too.

Tuesday, January 15, 2008

Project for U: LiveBlogging Client/Server

It's that time of year again. MacWorld 2008 is just about to start and already all of the liveblogging sites are clogged. Some are completely down due to demand. Others force you do hit reload, which fails 50% of the time. Why doesn't a good liveblogging client/server exist?

Here's what you'd need and other random notes:

  • A simple client library that does a poll to the server asking for everything since "last update" and updates the page appropriately (incremental). A little icon saying when next poll is, that a network connection is happing would be swell. If the "event" is over, then it knows to stop sending the request.
  • The server is more interesting. First you need a way of publishing (writing) data and no matter how busy the server is, the publisher must be able to get in. This probably means two servers to be absolutely sure, but who knows.
  • The ability to add more front end servers
  • A ridiculously fast HTTP server. As a goal a single server should do about 10k connections per SECOND. If you poll once a minute this hopefully will be able to serve 50k people per box.
  • Event-driven http is probably the way to go since you are going to be I/O bound, not CPU bound, but you could start with anything server for kicks and swap out the server as you go.
  • You could use fixed-size message block internally, say 1-4k, to make memory or file lookups easy. (e.g. append to the file, then the clients can stat the file and read from the end and go backwards to get the updates). Or something
  • A very fast time out.. any client taking more than a second, or even less, should get the boot!
  • You get the idea

It's a good project to work since you'll be able to work with all the fun stuff you normally don't get to do fool around with. It's not much of a business but who knows. Start with an open source and then do consulting and then hosting. If anyone is hell bent on doing this, let me know!

Note: CoverItLive.com appears to do this, but uhhh, not so well, since it's front door says it's out of capacity

Thursday, January 10, 2008

The Pitfalls of Java as a First Programming Language

I bumped into an interesting article Computer Science Education: Where Are The Software Engineers of Tomorrow which is really about why Java is poor first language to learn. (I found this by way of The Inquirer -- lots of funny comments). The authors are professors at NYU.

Juicy quotes include:

Java ... encourages the programmer to approach problem-solving like a plumber in a hardware store: by rummaging through a multitude of drawers (i.e. packages) we will end up finding some gadget (i.e. class) that does roughly what we want. How it does it is not interesting!
It [Texas A&M] did [teach Java as the first language]. Then I started teaching C++ to the electrical engineers and when the EE students started to out-program the CS students, the CS department switched to C++.

It's not a slam on Java, it's slam as using it as a first language, or perhaps how Java and programming are taught together. The author insist everyone must learn C, C++, Lisp, Java, and ... Ada. Huh? Well, the authors also run some Ada company. Oh well.

An interesting read, whether or not if you agree with their conclusions.

Sunday, January 6, 2008

stringencoders 3.7.0 released

Hi all,

I just released stringencoders 3.7.0. This fixes autotool/libtool which was borked on some platforms according to my spies. It also fixes up some C++ header annoyances. There are no logic changes, so if there is no need to update if it has been working for you so far.

BUT, if you haven't updated since 3.4, please do so since 3.4 has a core dumping bug, and 3.5 are some minor issues with modp_dtoa.

enjoy

Saturday, January 5, 2008

Change Leopard Dock to 2D

This is old news by now, but essential. It changes that gratuitous 3D shinny Dock to a more plain and usable 2D version. I learned about this tip here (which also has screenshots).

From Terminal, type:

defaults write com.apple.dock no-glass -boolean true && killall Dock

Ta-Da. To undo change the true to false

Making Finder be more like 'ls -a'

Finder has this annoying habit of hiding files and extensions it thinks will confuse you. As if!

Show all files

By default Finder hides files that start with "." (dot) and perhaps others too. To see all files, in Terminal type this

defaults write com.apple.finder AppleShowAllFiles true && killall Finder

To revert, change the true to false. I originally bumped into this here.

Show all extensions

Finder sometimes likes hiding the file extention like ".html" from you. To fix this: go into Finder's preferences, click the Advanced, and then click "Show all file extensions"

Enjoy!