Archive for the 'stack overflow' Category

Are there any libraries/apache modules for implementing a persistant data stream like Twitter’s Firehose?

Jul 23 2010 Published by jqs under stack overflow,twitter

I'm looking at building something like Twitter's fire hose to expose my company's data to the masses and want to build a proof of concept to show how we could use it.

Preferably I would like to find an apache mod that would allow for the persistent connection, but so far I've not found anything with my searched.

If there aren't any mods or libs to do what I want, I'm curious as to how difficult it would be to create the apache module for this purpose.

Comments Off

Comment by jqs on Best practices for creating a license for a program? Tie to a hardware or just use a UUID?

Jul 06 2009 Published by jqs under stack overflow

Thanks, that adds fuel to the fire. I might suggest he convert it to a web service. It make much more sense for the type of application anyways.

Comments Off

Best practices for creating a license for a program? Tie to a hardware or just use a UUID?

Jul 05 2009 Published by jqs under stack overflow

I'm working with a developer who has placed his faith in a license scheme that makes little sense to me. He wants to tie a desktop application to a hardware component value, one of which is easily changed, the MAC address of the ethernet controller.

Now, I know no one likes licenses, he does want to protect his hard work and I can understand that. What can I tell him to help him out? In the very least I'd like to give him a path other than tying a license to a hardware component.

Comments Off

Answer by jqs for Replace ‘keys’ in file with DB data

Mar 11 2009 Published by jqs under stack overflow

You need to write a parser to look through the $output to find what is between your delimiters and then call a function if it is defined. I assume you want to do it this way to save the calls until they are needed. I wrote a template parser that effectively worked this way. Unfortunately it wasn't in PHP.

Comments Off

Comment by jqs on mySQL large text comparisson performance… best practices?

Feb 10 2009 Published by jqs under stack overflow

Nope, full compares against the column, never a word part. I'll look at Sphinx and Lucerne thanks.

Comments Off

What is an easy way to tell if a list of words are anagrams of each other?

Feb 06 2009 Published by jqs under stack overflow

I was asked this one when I applied for my current job.

Comments Off

mySQL large text comparisson performance… best practices?

Feb 04 2009 Published by jqs under stack overflow

I've got a largish (~1.5M records) table that holds text strings of varying length for which I run queries against looking for matches:

CREATE TABLE IF NOT EXISTS `shingles` (
  `id` bigint(20) NOT NULL auto_increment,
  `TS` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `shingle` varchar(255) NOT NULL,
  `count` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `shingle` (`shingle`,`TS`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1571668;

My problem is that I need while I'm doing comparisons against this table I am constantly adding and removing data from it, so maintaining indexes is hard.

I'm looking for best practices for managing the inserts in a timely fashion while maximizing the throughput for the selects. This process is running 24hrs a day and needs to be as quick as possible.

Any help is appreciated.

Update: To clarify, I'm doing one to one matches on the 'shingle' column, not text searches within it.

Comments Off