Sunday, November 25, 2012

Carpet Cleaning

I have rarely had carpets as an adult.  My memories of carpet cleaning involved machines much more difficult and messy than the one I just rented.  About four months before my daughter died we moved to a new, much nicer house. I obsessed over the carpets, running around with spot remover.  Nevertheless "heavy traffic" stains showed up and I looked them up on the internet.  I put down throw rugs in those places.  The pets love the wall to wall carpet, I prefer wall to wall carpet.  

I began thinking about carpet cleaning and wondering what one of those machines could really do.  Then my daughter died.  And my family came.  And they are country which means they understand that in Hawaii you take your shoes off when you go in the house, but they it's harder to get them to put shoes on when they go out, and in the wake of my daughter with friends living here 24/7, then my family, the carpets went to hell and it was an odd emotional issue to finally, this morning, rent the machine, which was more reasonable then I expected. 

The nice thing is it's one of the few cleaning gadgets that more or less does what it says.  So the carpets seem remarkably clean.  And my thumb is sore.  And I miss my daughter.  Cleaning her room was the hardest. The stain where she left pink vomit on the carpet was already gone, I had cleaned that by hand the day she died.  That was hard too.  Still, I knew where it had been, and thought I could see it.

I often wonder whats worth living for even though I could name a dozen things including a loving girlfriend.  Maybe it's clean carpets.  But I doubt it.

Tuesday, November 20, 2012

What is Science

I've been discussing science via video with Barklord and some others taking part.  He has got me thinking about various aspects of how I view science and perhaps take for granted my view, which really is my own view.  There is no concensus that I ever found on exactly what science is, what it means, and our conversation is bringing to the fore various scandals and disgraces which may be laid at the feet of science.

On the one hand some things I do not fathom due to a basic difference of perspective.  I see the scientific  urge, which I see as a natural type of human curiosity, and not the only type, in all environments, in people in more or less, in principle, every village, city and community.

But in considering this, I have to admit, I also could complain about the corruption of science, which itself, it occurs to me, is so long that one could consider "it" (what I think of as corruption) as a part of "science". For example, I was considering good old Archimedes.  He was a military engineer.  I would of course grant that he is part of the history of science, but his work in the "science of throwing things at people".  So I'll write more on that later.

Monday, November 12, 2012

Video Site - JCN

So I accomplished a fairly significant refactor of the video server and I realized I'd like to use the blog to decompress from working on it.  It's a chance to talk a bit of technicals, youtube comments won't really allow proper space for.

So while the buzzword "cloud" has been around for a while, and is just a word for distributed computing... the fact is the true power of distributed computing has flowered slowly.  It doesn't seem that way, but it has.  We  struggle to do these things.  What I'm excited about now is the advent of open source clouds, i.e. OpenStack.  Buzzword-wise, programming on the Google App Engine is using "the cloud" or "cloud computing". But it's proprietary. The OpenStack way allows me to have a virtual machine.  It could even be a windows machine.  And it gets a part of a real machine to run on.  Since it runs in a virtual machine, it can be copied to disk, and then cloned.

So the advantage of this is that if someone is good at designing distributed systems, then when they have a good version, they can take a copy of that image, and it can be deployed in minutes to new servers.  The servers wake up and cooperate (like a cloud) to provide some service.  This is what large web sites do anyway, many servers pretend to be "Google" etc.  The cloud is really a word for operating that way without needing a multimillion dollar server farm, to by parts of that resource at commoditty pricing.

So the server is Ubuntu 12.something something.  I installed some software like clipbucket (tried one called Mediacore) but found it's a pain.  Integrating with it is a pain.  Accomodating it is a pain.  And I discovered that in the last 6 months the first step of the future arrived, the video tag exists in the latest browsers of significance (bite me IE), and they all play .webm.

I am running apache and using mod_wsgi to run a python module.  The standard approach is to use some SQL database, and I figured I'd have to do that, but I'm not that thrilled working with them.  They tend to take over the structure of the project.  My python modules were using the disk directly.  Of course, eventually that is not ok, because they'll write over each other.

However, I've decided to write a C++ server to organize the data on a distributed database idea that allows data to be on disk.  The central server will ensure the files are not corrupted, and will be able to compile indexed files for high speed access as the amount of data gets larger.  People that want to use SQL and SQL based tools on the database will be able to do so, but that will be exported from what the live systems use.  I think, after all, when using a database, you have to get the data into memory and use it somehow, so you can just keep it in that form with lots of data exporting to allow alternate indexing, etc, for different purposes.

Anyway, I got the python apache based server asking the c++ process for the video information instead of using naming conventions and going to disk, via back end http request.  At the moment the data fragments are just JSON that was dropped by the upload program.  This design allows me to support that, and when the number of videos gets to high, or rather, by that time, I'll be able also to compose the complete database into an indexed form that supports the larger number. I'll do this while still allowing utility programs and web page services to drop files like notes.

My data organizer (jcn) uses inotify to watch the disk for new files of interest to index and compose.