Feeds:
Posts
Comments

Posts Tagged ‘technology’

I figured I would pass along some info I have collected while playing around over on the free services of Amazon AWS. One of the nifty things about AWS is that they offer a number of ‘free tier‘ services for trying out what they offer as well as getting familiar with the environment.  (Other services can be used with minimal expense for low-level usage – just pennies per month)

On such free tier service is the EC2 virtual server environment, which supports a number of operating systems including Amazon’s linux, Ubuntu, Windows, and other operating systems on a 1Gb memory, 8Gb storage* virtual server. (free services can also add elastic storage to increase the 8Gb if needed)

One problem you’ll run into right away is that 1Gb of memory is a small amount when using some modern tools. No problem, you can create virtual memory with a swap file using some of that free tier storage space. However, the instructions on the AWS documentation pages assumes a system larger than the free tier and won’t work as written.
The first problem will be encountered right off the bat. As with most other static-swapfile implementations, they create a static file using dd in conjunction with /dev/zero to create the initial file. The problem is, their example uses a blocksize equal to (1Gb) the total memory of the EC2 free tier instance. So instead use a smaller blocksize and a bigger count.  I used 128M which uses a count of 8 for 1Gb in size. So for example, to create a 1 1/2 Gb swap file:

$ sudo dd if=/dev/zero of=/swapfile bs=128M count=12

The rest can be done as documented: How do I allocate memory to work as swap space in an Amazon EC2 instance by using a swap file?

Another useful diddy is the ability to mount an S3 bucket as a local fuse device. This is made possible with >s3fs. Follow their instructions then you can even mount the device using an fstab entry. Example:

s3fs#mybucket /media/mybucket fuse _netdev,use_cache=/tmp,allow_other,default_acl=public-read,endpoint=us-east-2,dbglevel=info,uid=33,gid=33,mp_umask=002,multireq_max=5,url=https://s3-us-east-2.amazonaws.com 0 0

Replace ‘mybucket’ with the name of your bucket after the s3fs# and pick your own mount point as the second option. A few notes on some of the other options. You can exclude the default_acl if you want to use the bucket default. In this case I use ‘public-read’ to mark any newly created files as publicly readable. The combination of the endpoint and the url options makes sure you are accessing a region-specific bucket without error. uid and gid can be set to whatever user you wish. (in this case I am setting both to www-data). mp_umask is a reverse mask of the file permissions when mounted. You can also vary the debugging level as needed when troubleshooting. (be sure to read the instructions on setting up the /etc/passwd-s3fs file)

One thing to note is that you will need to assign permissions (likely an IAM role) to your EC2 instance that has access to S3 or at least your S3 bucket depending on what specific functions you want to do over the virtual-fuse connection. (e.g. give S3 createObject/delObject permissions if you want write access, getObject to read, etc – one easy way to do this at first is to add the S3FullAccess policy until you learn specifically what you need)

If you plan on playing with lambda, especially with custom runtime environments, the EC2 free tier is also useful as you can create an Amazon linux instance to compile the runtime environments to work on lambda. (NOTE: lambda uses the original version of Amazon linux, not Amazon linux 2. You’ll get GLIBC errors if you don’t downgrade the gcc environment on other platforms to match the libraries used on the original amazon linux)

It should be noted that the free tier servers on EC2 give you 32 days per month total. So this is more than enough to run a single free-tier-eligible instance non-stop all month, or to run multiple instances intermittently in so long as the combined usage does not exceed 32 hours. For example, I run an Ubuntu non-stop, but have an amazon linux instance for creating the runtime configurations that I only power up when needed. That gives me 24-48 hours of usage per month on the second instance without exceeding the total usage. (bonus time in February!)

Read Full Post »

(written as a response to a view that too many people texting on cell phones is bad)

The Jacquard Loom

Jacquard LoomIn 1801, a guy named Joseph Marie Jacquard invented a new machine called a ‘Jacquard loom‘ to simplify the process of manufacturing textiles with complex patterns. He based his machine upon designs of earlier inventors but was the first accredited with perfecting the concept. The machine he invented was controlled by a card that had holes punched into it to tell the machine what threads to use to create pre-determined patterns on the fabric it created.

Although the loom did not manipulate the information on the cards in any way but simply used it as a set of instructions to follow, this invention is now retrospectively looked upon as one of the first primitive forms of computer programming and is definitely the first use of a technology later re-introduced for the very purpose of programming the early main frame computers which used nearly identical punch cards to enter information into the silicone based programmable computing machines.

The period of time known as the Industrial Revolution quickly followed the introduction of this device and other similar inventions such as Eli Whitney‘s cotton gin in 1794 (also hailed for the first well known application of interchangeable, uniform component parts and leading to the creation of cotton mills), Edmund Carwright‘s 1784 invention of the power loom that helped lead to the Jacquard device, Paul Moody‘s 1828 creation of the  leather-belt-and-pully transmissions (later dubbed a ‘line shaft‘) which became a standard in many mills.

These innovations along with the eventual invention of mechanical ‘sewing machines’ in the mid to late 1800’s when combined with improvements in transportation, sanitation and communications virtually created a fashion industry, brought people cheap, affordable, high quality clothing and improved lives as well as made fortunes around the globe.

Luddites and Luddite-ism

Perhaps you have heard the term ‘luddite‘ used to describe people opposed to technology? Were you ever made aware of where that term came from?

Luddites is a term coined from the name of Ned Ludd. It was originally applied to textile artisans who were opposed to the use of the mechanical and programmable looms in early 19th century England around the time of the introduction of the Jacquard and other power loom devices.

Ned Ludd allegedly destroyed a couple of these machines a quarter of a century before the discontented textile craftsman began their protests and thus was seen to symbolize the ‘machine destroyers’ and his name used to identify them. Of all places for those protests to begin, they got their start in none other than Nottingham, England and many modern mythologies sprung up by those in the movement depicting Ludd as a modern day Robin Hood, even going so far as alleging he lived in Sherwood Forest. And of course, there are many similar examples of people who have opposed various technologies (and gained notoriety as a result) throughout the ages.

Breaking the Frames

I already alluded to the influence the punch card loom had in leading to digital programming. It is not a stretch to say that the introduction of mass produced textiles is far reaching throughout our modern society. It led to not only cheaper and more cloth based goods and products, but influenced hygiene and health care and has improved just about every other modern industry in one form or another.

As with most things, there is a good and a bad potential in any of them. But the possibilities of the use of technology are enormous! Some accredit the cotton gin and power loom with increasing the practice of slavery. Many still today accuse clothing manufacturers of facilitating child labor and sweat shops in third world nations. (there was such a story about a factory fire in Bangladesh just yesterday, and initial reports are claiming it to have been industrial sabotage)

I don’t know about you, but I’m not really interested in going back to wearing dried and stretched animal skins or very expensive, hand-loomed silks as my primary form of clothing. And I’m not about to give up my cell phone either.

Read Full Post »

I used to worry that natural selection was being contradicted in modern civilized society.  We’re doing things like creating ‘super-bug’ diseases through over-use of antibiotics, meanwhile we seem to be coming up with ways to allow people with all sorts of maladies and genetic no-nos live and produce offspring. A human thing to do, but hardly a way to upgrade the gene pool!

I also worried that ideas were subject to the ‘noise’ factor, especially since the exploding popularity of the internet and talk radio. There is so much information out there and many of the sources are so highly questionable. (I would qualify this with ‘on the net’ but it seems with a couple hundred cable channels, even television is not a reliable source for ‘accurate’ information and journalism is more about ratings chasing than about integrity of information)

I realized last night, neither is true. Or at least neither is worth worrying about.

The Helix Epiphany

Sometimes it is funny how seemingly unrelated concepts can come together to give you a better picture of something else. Someone was talking the other day about a new theory on how DNA and RNA came into existence over hundreds of millions of years. Some scientists apparently now think that a pseudo natural selection process took place with certain ‘bubble’s or collections of chemicals that proved to be more stable than others eventually spawning primitive re-producing cells. But of course, the story started out mentioning the churning cauldrons of primative earth’s volcanically timultuous seas.

What I realized in regards to natural selection is you can’t look at just your own lifetime or those immediately before and after. Natural selection is a process of many many many generations. To assume it is going to be averted by a hundred years or so of technological civilization that still hasn’t sorted out it’s optimal ‘form(s)’ yet is short sighted.

Internet and Computers as a Collective Memory Aid

And the noise on the internet and talk radio? That is not much unlike that early timultuous sea. One of the other unrelated ideas that came to me was when I was thinking about how useful it has been for me to start blogging. I’ve found since I started it, that it helps me keep my ideas on track and gives me something to refer back to, review and revise as my ideas take form – sort of an external surrogate for my own brain. I can write down and retain small details of events or thoughts that I otherwise might not remember in full clarity as my mind moves on to other things. This is probably not much different than has been the case with people writing journals and diaries for thousands of years…. but!

Now there’s this internet thing, this tumultuous cauldron of untested ideas where everyone is now blogging their thoughts and ideas.  The internet is having a ‘shared’ collective memory and little by little the more radical among them move to the top or the edges to be tested against the extremes of the rest of the bubbling soup. Some succeed and some fail, some gain prominence some are dismissed as idiocy. And the process of technology allows all these noisy intermingling ideas to do this more rapidly than ever in human history.

So then you might worry well ‘what if the bad ideas’ win out somehow? Or worse, what if a ‘bad’ idea proves to be the most ‘fittest’ to survive in such conditions. Really? Then I look at current events. I see socialist ideas failing in Greece and Spain. I see socialist ideas failing in America. I remember back to socialist ideas failing in Russia.  I see comments about Cuba and Venezuala having problems. I see people fighting for more freedoms in China and Libya and Iran.

What gives me hope are the new conventions and arenas for the ideas that advance mankind. Sure, they can be prone to the same misuse and abdication as things in the past, but the sheer velocity of how new ideas can spread now and gain prominence is amazing. It’s like giving gun rights to early Americans. You build in a new expectation upon individual freedom that the anti-gun folks have been spending more than 100 years trying to demonize and destroy. How many people do you suppose would willingly give up their internet access after having it now for less than 15 years?

The key is to not focus upon such a narrow slot of time as an indicator of the dominant trait. It’s a form of anthropomorphism more specific to our own reference point of our own lifespan. Sure, I’d like to see robot shells that could instantly transport me to alpha centauri and back for an afternoon luncheon at the Andromeda Cafe’ – but that’s unrealistic. Change takes time and the process of that change is speeding up. But it’s still going to take time.

It’s a rough ride, but the natural selection is live and well and I welcome the noise! Bring it on!!! The cream rises to the top!

Read Full Post »