Dave Noderer's Blog

South Florida does .NET!

  Home  |   Contact  |   Syndication    |   Login
  145 Posts | 0 Stories | 324 Comments | 63 Trackbacks

News

Twitter












Archives

Post Categories

Image Galleries

.NET Community

Life at the Beach

My Blog Friends

Friday, November 07, 2008 #

Spending the day at the Emerging Business Showcase in Deerfield Beach, FL just north of Ft Lauderdale. It is put on each year by the Enterprise Development Corp. of South Florida (EDC)  (http://www.edc-tech.org/)  and strategically held just a few miles from my house and a block from my office, what planning!

The purpose is really just to get a bunch of venture capital, angel investors, lawyers and bankers together and the highlight is 14 startups giving  short (3 min) presentations / demos of their product and what they are looking for money and partner wise.

Christos M. Cotsakos, Ph.D., Founder, Chairman & CEO of Pennington Ventures, LLC is the keynote speaker.

I like it, he uses the term “Vulture Capitalists”. He is advising entrepreneurs to pay more attention to the people behind the money than the money itself.

Points out that Florida is one of the best small business environments in the country but near the bottom of availability of money.

DSCN0577

He is not a Microsoft supporter (did mention .net  but that Microsoft charges huge fees) and probably correct that increasingly more young people will use free tools no matter what Microsoft offers. Although I don’t think anyone gives Microsoft enough credit in the open space environment and pretty much all the tools are available for free… visual studio express, sql server express and now the http://www.microsoft.com/bizspark/ initiative to give startups lots of free software and support for free.

Shameless plug… our user group is a network provider in this program: http://www.fladotnet.com/MSBizSpark.aspx

Now he is complaining that Florida developers are all .net so they had to go to India to get php / mysql people. I feel like an Obama supporter in a room full of republicans.. probably true too… Heavy suit tie group, i’m one of the only people in civi’s.

Companies each get three minutes:

Accellogic - Simulation acceleration, hardware?? he is not really saying what the technology or product is. Looking for future partners.

AccuBreak - Pharmaceutical product to allow tables to be broken into smaller pieces in a reliable way.

Arkiva - Asset management, external hard drives, internet backups, documents, video tapes, etc. Digital storage and conversion.

CatalRoom - Online poker for people to play with each other, win prizes in demographically separate areas, golf, travel, etc.

CHS Pharma -Early stage, developing multiple drugs. Skin and pre-cancel skin conditions and another is an over the counter sun protection.

CuRNA -Scrippts Florida spinout. Drugs for heart disease and cancer. Based on RNAI interference, knocks down one specific cell type.

Cyclone Power - Modern steam engine, small compact power to weight ratio. Many fuels in. Burn in a centrifugal at low pressures. Range of product  80 watt to 1 mega watt. Late stage prototype. Available late 2009. Looking for $5 mil.

Evolux Transportation - Tech at Georgia tech, FIT aerospace and cs at FAU simulations for helicopter / tilt-rotor to use existing infrastructure. Need $5.5 mil immediately.

Linxter  -Secure and reliable communications. Cloud middleware. Looking for acquisition end of 2009.

radWebTech -Distributed world is dictating information sharing making managing many portals like facebook, myspace, etc all in one place. Data portability and interoperability. International Data Portability Association. Looking for $500k. http://www.dataportability.org/.

RoboVault -Self storage, deliver storage items to the user and biometric security. Storage is separate from access.  Transports from secure storage to access area. In Davie.. $60 - $100 mil to build more.

ScriptRx -Print electronic prescriptions, discharge instructions, especially in ER rooms and urgent care centers. New version has med records, drug dispenser.

Virsona - Give customized persona to automation / communications on the web. Help desk, customer service, licensing to 3d virtual worlds.

World Response Group - Green tech human hair, clean, sanitize, smart mat to allow eco friendly growing, polymat replacement. Need $500k

Ok, i need to talk about the lunch speaker talking about the new age of space exploitation.

Jeff Krukin (http://www.jeffkrukin.com/) is a space futurist talking about the existing companies in the private sector that are starting and some are making money.

A number of these i’m aware of but the http://www.rocketracingleague.com   i was not aware of. They are starting a NASCAR type of organization for atmospheric rocket racing. Just move the racetrack into the sky. Is a earth to moon and back race very far away??

Sub-orbital and even round the trips to the moon are in the works for private citizens.

Buy his book! –> http://www.jeffkrukin.com/NewSpace-Nation-2008/

 

DSCN0578


Wednesday, November 05, 2008 #

I’ve become interested in a few aspects of SQL Server 2008. One is the new FILESTREAM datatype.

The basic idea is to have a SQL datatype you can use in queries and searches and is managed by SQL but which does not have any particular size limitation.

There are a number of articles on the multiple  steps it takes to setup a database  to utilize the new FILESTREAM features. I’m not going to cover that in this article. I highly recommend reading Paul Randal’s white paper on the subject, now published on MSDN: http://msdn.microsoft.com/en-us/library/cc949109.aspx. Both he and Kim  Tripp have lots of great SQL server content online at www.sqlskills.com. Paul also has some performance graphs of that will give you an idea of when to use FILESTREAM vs image or text.

Unfortunately there is very little on how to actually utilize the FILESTREAM from a programming standpoint. Most of them show how to utilize Win32 API and the SafeFileHandle, I only found one (I’m sure there are more) that talked about using the managed interface, SQLFileStream.  You can find that paper at: http://blogs.microsoft.co.il/blogs/bursteg , this was also all C#, not VB.

So I have created a vb project which illustrates using FILESTREAM… The presentation, visual  studio project and sql script can all be found here: http://www.fladotnet.com/downloads/SQL2k8TidBits_20081104.zip

One thing I found is that the old Text, nText and image sql types are being replace by varchar(max) and varbinay(max)  which all have a size limitation of 2 gb.

The FIlestream datatype is really just a flagged varbinary(max) column with a tag of FILESTREAM. The sample I've made uses a table declared as follows:

CREATE TABLE FSDemo.dbo.FSDemoTable
(
    [Id] [uniqueidentifier] ROWGUIDCOL NOT NULL UNIQUE,
    [Description] varchar(50) null,
    [JPG] VARBINARY(MAX) FILESTREAM NULL
)

Besides the FILESTREAM tag on the column, each table containing a filestream  column must have a uniqueidentifier (guid) column.

After inserting a row (see the 1_3_InsertData.sql script) the program will need two things in order to access the filestream data.

First is the path as defined by sql server. This is a reference to the file (not accessible directly through normal system.io) that contains the data for the row/column selected. A simple query of this for the table above is:

Select JGP.PathName() from FSDemoTable Where ID = @ID

This will give you a path: \\PLOVER2V3\SQL2K8\v1\FSDemo\dbo\FSDemoTable\JPG\0925394D-79D7-41FB-B438-9EA85C0FA232

The trailing 79D7-41FB-B438-9EA85C0FA232 is the @ID above but you won’t find a file by that name.

The second piece of information is the transaction context. To utilize filestream for reading or writing, you need to establish a transaction and then get the transaction context, a 16 byte array back from the db to pass into the SQLFileStream call. You can see this in the 1_4_FSGet.sql script and it looks like this:

select JPG.PathName(), GET_FILESTREAM_TRANSACTION_CONTEXT()  from dbo.FSDemoTable WHERE id = @id

Now for code… to write to a file stream the annotated code is below. I’m sure there are many improvements to be made but the idea is to illustrate the steps.

For this sample, a description of the file (photos) and the actual byte array containing the jpg file are passed to this routine for writing and an array of bytes returned after the read. Once  you get the path and context, the sqlfilestream operations are basically normal file IO.

Public Sub WriteFileStream(ByVal Description As String, ByVal SourceBytes As Byte())
    Dim cn As SqlConnection
    Dim tx As SqlTransaction = Nothing
    '
    Try
        '''''''''''''''''''''''''''''''''''''''''''''
        ' Open a connection and start a transaction
        '''''''''''''''''''''''''''''''''''''''''''''
        '
        cn = New SqlConnection(ConnectionStrings("conFSDemo").ToString)
        cn.Open()
        tx = cn.BeginTransaction
        '
        '''''''''''''''''''''''''''''''''''''''''''''
        ' Insert empty blob in the database
        '''''''''''''''''''''''''''''''''''''''''''''
        '
        Dim cmd As New SqlCommand("FSInsert", cn, tx)
        cmd.CommandType = CommandType.StoredProcedure
        cmd.Parameters.Add(New SqlParameter("Description", Description))

        Dim r As SqlDataReader = cmd.ExecuteReader(System.Data.CommandBehavior.SingleRow)
        '
        '''''''''''''''''''''''''''''''''''''''''''''
        ' Read the id and sql path back from the proc
        '
        '''''''''''''''''''''''''''''''''''''''''''''
        '
        r.Read()
        Dim ID As String = r(0).ToString
        Dim path As String = r(1).ToString
        r.Close()
        '
        ''''''''''''''''''''''''''''''''''''''''''''''
        ' Get the transaction token, required for filestream operations  should add this from the previous proc…
        ''''''''''''''''''''''''''''''''''''''''''''''
        '
        Dim cmd2 As New SqlCommand("SELECT GET_FILESTREAM_TRANSACTION_CONTEXT()", cn, tx)
        Dim obj As Object = cmd2.ExecuteScalar()
        '
        Dim txCtx As Byte()
        txCtx = CType(obj, Byte())
        '
        '''''''''''''''''''''''''''''''''''''''''''''
        ' Open the special managed "SQLFileStream" and write the bytes
        '''''''''''''''''''''''''''''''''''''''''''''
        Dim fs As New SqlTypes.SqlFileStream(path, txCtx, FileAccess.Write)
        '
        fs.Write(SourceBytes, 0, SourceBytes.Length)
        fs.Close()
        '
        tx.Commit()
        '
    Catch ex As Exception
        '
        tx.Rollback()
        '
    End Try
    '
End Sub

 

To Read the image the code is:

 

Public Function ReadFileStream(ByVal ID As Guid) As Byte()
    Dim cn As SqlConnection
    Dim tx As SqlTransaction = Nothing
    Dim txCtx As Byte()
    Dim SQLpath As String
    '
    Try
        '''''''''''''''''''''''''''''''''''''''''''''
        ' Open connection and establish transaction context
        '''''''''''''''''''''''''''''''''''''''''''''
        '
        cn = New SqlConnection(ConnectionStrings("conFSDemo").ToString)
        cn.Open()
        tx = cn.BeginTransaction
        '
        '''''''''''''''''''''''''''''''''''''''''''''
        ' Retrieve Path and transaction context of the filestream
        '''''''''''''''''''''''''''''''''''''''''''''
        '
        Dim cmd As New SqlCommand("FSGet", cn, tx)
        cmd.CommandType = CommandType.StoredProcedure
        cmd.Parameters.AddWithValue("@ID", ID)

        Dim r As SqlDataReader = cmd.ExecuteReader(System.Data.CommandBehavior.SingleRow)
        '
        r.Read()
        SQLpath = r(0).ToString()
        txCtx = r(1)
        r.Close()
        '
        '''''''''''''''''''''''''''''''''''''''''''''
        ' Read the file
        '''''''''''''''''''''''''''''''''''''''''''''
        '
        Dim fs As New SqlTypes.SqlFileStream(SQLpath, txCtx, FileMode.Open, FileOptions.None, 0)
        Dim Buf(fs.Length) As Byte
        '
        fs.Read(Buf, 0, Buf.Length)
        fs.Close()
        '
        tx.Commit()
        '''''''''''''''''''''''''''''''''''''''''''''
        ' Return the bytes
        '''''''''''''''''''''''''''''''''''''''''''''
        '
        Return Buf ' return the bytes
        '
    Catch ex As Exception
        '
        tx.Rollback()
        '
        Return Nothing
        '
    End Try
    '
End Function


Wednesday, September 24, 2008 #

We are here! Made it past Canadian customs and headed to downtown Langley to get a hotel room, shower, decent meal and nap…

Total Time 57 hours. Can’t do it much quicker, we had the one 3 hour car repair in Sioux Falls, SD.

Marc was amazing driving, he just did not get tired. Out of the 57 hours i drove only 5-6 hours, just enough to keep us going when  Marc needed a nap.

Signing off and 73’s (as they say in ham land) thanks for following our trip!

20080924_1202


We cleared Montana and ~ 70 miles of Idaho (way up there at the top). Marc did get a speeding ticket in Idaho 4 miles from the WA border. We both had  to give up our ID’s for a check.

it is 8:51 EDT (5:51  Seattle Time). I can only deive~ 100 mi at a time at this point. We have been on the road almost 52 hours. It’s not that I'm really tired but my eyes glaze over, especially in the dark.

Had a little incident getting gas a few minutes ago. American Express decided to trigger a security alert so i had to call, answer secret questions but the woman  gas pump computer was still waiting on authorization and was locked up. I finally just left her cash and let her figure it out.

My shirt was filthy from 3000 miles of spilled coffee so i changed all my cloths and put on some deoderant.  Marc is holding out until  we get to Vancouver which should only be a few hours away at this point.

20080924_0858


Too cold to get out and pee (7C) but we just passed the continental divide,  At that point, one side flows into  the Atlantic Ocean and the other into the Pacific. Elevation 6393 Ft.

Dark but going up and down mountains and the view of Butte Montana as we cam down out of the mountains was spectacular.

573.8 mi to Exit 10 on I90  in Bellevue WA. At that  point we are almost there, just another couple hours up to Langley, BC (a suburb of Vancouver).

 

20080924_0038


Tuesday, September 23, 2008 #

Streets and trips threw us for a 200 mile loop off of I90 West.

The good news is that the route on 59, 212 was ~ 70 mi shorter the bad news was:

  • Almost all of it was 2 lane with LOTs of big trucks  lumbering along making it difficult and dangerous to pass.
  • Something like 10 miles was total  construction after the sign “Road Ends” where a construction truck with yellow flashing lights took “convoy's” of cars and trucks through the worst and active part of construction. Luckly we went through this during daylight.
  • It went through a couple of small towns with 30 mph speed limits and suspiciously  modern looking court houses.
  • If it had been winter, the “Chain Up” designated area at the bottom of each hill would have had me very worried in our two wheel drive Blazer.
  • Even Verizon service failed 100 miles from civilization.

I sent Microsoft feedback through the feature in streets and trips!!

On the other hand it was an adventure and lots of very nice scenery and animals. We saw lots of deer, sheep, a Bentonite (is an absorbent aluminium phyllosilicate generally impure clay consisting mostly of montmorillonite.) mine and of course cows. It went by Custer National Forest and LIttle Big Horn, site of Custers Last Stand I  believe.

Some pictures of the landscape from the moving car:

DSCN0457

 

DSCN0456

And the route from hell itself:

20080923_2047


Marc is still driving since Sioux Falls, I’ll take over at the Wyoming border coming up in 163 miles. Long straight roads, very nice today 25C, sunny and Eric Clapton blasting from the Zune / car stereo, but i can only imagine what it must be like in the dead of winter with arctic storms blasting in from the north across the plains. There is some clue in this with all the road construction. For dozens of miles at a stretch they are totally replacing the lanes or removing and replacing concrete sections damaged by what I’m guessing is frost heaves. It sucks to type bouncing up and down on them.

Very pleased with Verizon service, both phone and internet connection have been pretty much solid the entire way so far.

Stopped for gas and lunch in Merdo, SD in the middle of South Dakota. It is a  small town with a bunch of houses  and businesses, what do they all do? Probably a dozen at each of the exits’ gas station/diner. Here is Marc cleaning the windshield with Lindsey at one of them:

DSCN0453y

Oh crap, between the picture above and below (~ 20 min) i managed to break the lcd screen on my Nikon S210.I fixed an L10 before i can probably do this and know where to get the parts now!

i’m  sure they all farm, we are driving through hundreds and hundreds of miles of fame land like this:

 

DSCN0454

 

There is also a lot of “tourist” traps like the “1890 Town” where you can take pictures but all that is seasonal and not active now.

 

And current location near the “Badlands'”!

 

20080923_1455


After a little over 3 hours and $887.86 we are back on the road again after some breakfast and a  nap in the waiting room of Chevrolet of Sioux Falls.

We are just a few miles from I90 West then it is a  straight shot to Seattle.

 

20080923_1120


i missed the entering South Dakota report because I’ve been driving for the past couple of hours. Some beef jerky, peanut butter crackers and a bit of a nap revived me while Marc actually started to get tired!

About 600 or 700 miles ago we started to hear some funny noises from the front left tire / wheel and by Sioux City decided we needed to stop and have it looked at.

Sioux Falls South Dakota is at the intersection of I29 on which we have been comming north since Kansas City (I think) and I90 that we are going to head west on for a long long ways.

Timing was great, it was 7:30 local time and we were the first car in the Chevy of Sioux Falls dealership,  just a block off of I29 (thanks internet!).

They are checking it out, if it will be a short repair (like an hour) we will just wait and keep driving. If it is going to be a day long repair (hopefully no longer), we will get a room in the Ramada Inn across the street and take a nap for a few hours and a shower and meal.

 

20080923_0841


Marc is driving again but we are stopping more frequently. Lindsey is always happy to jump out and see how many friends she can make. I like the  20’ extendable leash that Marc has, it works  very well for letting her run around a bit.

Any times you see are EDT. 4:52 am by our  clocks but on the cell it is an hour earlier. According to Kansas City weather, sunrise is around 7am at this latitude which we are still on.

Elevation ~ 920 feet. Nice clear moon and skies, 21C (yes Marc is practicing to be Canadian).

At the last truck stop (that's what's open here in the middle of the night), we  both felt distinctly out of place with shorts and short sleeve shirts in the cool, almost cold night. Definitely nobody else is in shorts. At least i wore my Tweener shirt instead of full Hawaiian.

 

20080923_0448


Passing Kanss City but not actually going into Kansas, looks like the highway may nip a piece of Kansas later, othewise it will be Missouri to Nebraska.

We started out with 200-250 mi chunks, then 150, then 100, i just gave up after 70 mi but Marc got a good 1/2 or more of sleep so he is good to go now.

Rolling Stones blasting!!

 

20080923_0239


Monday, September 22, 2008 #

We are still going but Marc is finally going to let me take a turn driving after he has driven over 17 hours.

Sunrise in Kansas City in less than 10 hours.

I think we have started planning for a Second Life Code Camp…

Less to look at now because it is dark. Light traffic, in central time zone now but we are not changing anything except the cell phones which adjust automatically.

Verizon Service both phone and internet have been working no problem all the way so far.

 

20080922_2236

Marc’s still driving although i think we will start stopping every 150 mi instead of 200, if for nothing else just to make sure we keep filled up.

Lindsey sleeping more now and i’ve tried to take a few naps.

Kentucky was pretty, mostly as you might expect in this area of the western part of the state, rolling farmland, not too many hills. The sun went down a little while ago but it is still not totally dark.

Crossing the Ohio River, going to stop in Metropolis! Marc took his contacts out and Lindsey made a few new friends (as always!).

 

20080922_2011


We’re still rolling, got a nice view of Nashville as we drove through at 6:15, lots of traffic and jams going south, more people live that way maybe? No problem going north on I24, a bit heavy traffic but not bad.

Cruise control just started working… We are in a 1999 Blazer that was originally belonged to wife Bobbi but went to Marc in 2002, his 2nd year of college. We were out looking for a car for him and i thought this is not right… give him the old car and buy Bobbi a new one!!

Marc is still driving, now at 13.5 hours.

Lindsey being good, now sleeping in back. She pokes her nose up front sometimes and sometimes we have to push her back but she has not been a problem.

Just passed Clarkesville (Last Train to Clarksville fame? if you remember that Monkeys’ song?), TN and into Kentucky.

 

20080922_1903


We  had a close call in Georgia, NO GAS!!! At two exits, we stopped at 6 gas stations, none of them had gas. I finally asked at BP and the manager said they had not had gas for a week. Helpfully he directed us to a Shell station on the other side of I75 that did have regular and diesel, no mid grade or high test, regular is fine for us but we were both getting worried!

Country side definitely different now with our first “mountain”. Really just a little hill but bigger than the highest rise in South Florida (the  trash  dumps).

 

20080922_1608