Tuesday, May 4, 2010

To Ruby or Not to Ruby?


Ruby on App Engine Meetup (May 4, 2010) proved that Google App Engine is not all about Python and Java, although at present only the last ones are benchmarked and discussed by google app engine developers (try yourself)

Python is usually fast enough for what you want it to do (and faster than Ruby), while requires a third of the code of an equivalent Java program and is much easier to read. Both Python and Ruby are easy to learn.

Pythonistas think that Ruby syntax is ugly and inheritance distasteful. The philosophy of Ruby is similar to Perl: there is more than one way to do the same thing. This is great for some people, it leads to the creativity and richness of Ruby libraries like Hpricot and Rake. Ruby tries to take the best of Perl, Smalltalk and Lisp but has elements of a C/Java-like syntax. Rubyists are convinced that they have found the most enjoyable interpreted language. Ruby is younger than Python but already has a strong and loyal community and best web tools. Many programmers, however, don't like having too much power to change the syntax and keywords. This can be dangerous if they are not careful.

Arguments on what language is better resemble disagreements between cultures and ethnicities. For a programmer, it's always fun to learn something new that may be useful in the future. For a startup founder, it's always good to know what is fun and a good investment. Right choices of programming languages, web frameworks and platforms will lead to rapid development, the ability to attract talent, and offer a great expansion potential.

The Java language is an old favorite in the enterprise. There will be a large pull of candidates to work on Java projects, but this language won't make your startup the most attractive shop in town. Python and Ruby will.

The Python community has the Django framework while the Ruby language is paired with the Rails framework. DSL Sinatra is also good. What's the difference between the Ruby and Python developer crowds? RoR favors convention over configuration which means that any Rails programmer can drop immediately into any Rails application and have a very good idea of where to get started. Expect rapid development and prototyping and support from community working on updates and plugins. Ruby/Rails developers tend to be expensive but worth it. Complementary Javascript experience is perfect - for dynamic web pages and nice visual effects. PHP developers tend to be a little cheaper than Django and RoR, but watch out for bad coders in this crowd. All hosting providers can deliver a low cost PHP server environment, but there are great platforms for Ruby and Python - such as Heroku (that recently raised $10 million in Series B funding) and Google App Engine that let you develop for free.

The May 4th meetup was not on Ruby vs other languages. It was about Google App Engine.
Most Rubyists in the audience were using Heroku for their applications, some will now try to pioneer Google App Engine - or will they?..

One interesting observation was the "City” versus “the Valley" comparison of preferred languages: Ruby seems to be the City's favorite! Could it be due to cultural differences? Some even think it's as bad as PC vs Mac world - see this short clip.
There were no Java people in the audience and very few programmed in Python or wanted to learn it. Almost no one tried Google App Engine.

Matthew Blain presented BulkLoader, a minimal library providing a unified interface for loading, accessing and events notification for different types of content (Try the Bulk Loader sample at: http://bulkloadersample.appspot.com/)

John Woodell, Sr Web Developer at Google (twitter: @johnwoodell, e-mail woodie at google), gave the main talk -about running Ruby on the App Engine. Sarah Allen wrote a nice blog about this talk: http://www.ultrasaurus.com/sarahblog/2010/05/jruby-on-google-app-engine/. Another blog post summarizes the sources discussed:
http://jruby-appengine.blogspot.com/2010/05/google-app-engine-0012-gems-released.html

Check out his SlideShare Presentation:
App Engine Meetup
A few pointers and links from this talk:
  • Zero Configuration needs. Scalable services via standard APIs. Built-in application management console
  • Schemaless App Engine datastore: No writing to the filesystem. No relational database. No more than 30 seconds per request. Datastore API + DataMapper
  • Most common tasks: backups and cross-app migration.
  • A big Rails advantage is that it values convention over configuration and lets to avoid lengthy configuration of files. Load everything at once then initialize it. This helps to free more time to focus on business logic. Google App Engine does not work like that yet, but this is on roadmap.

Key Ruby App Engine Developers (check also this map):

John Wang - iPhone, Android, and Web Developer at Fresh Blocks in Honolulu, (Twitter: @johntwang Github: jwang) Provided RESTful JSON with Google’s Datastore to iPhone and Android apps.

Joshua Moore, Assurance Manger at Armorize Technologies (Twitter: @codingforrent, GAE blog). Coauthored the rails_dm_datastore gem, gave presentations on using jRuby on GAE. Rails 2.3.5, Datamapper, HAML, helped to find datamapper bugs

Leonardo Gallucci, IT Consultant and Software Integrator (Twitter: @leonardog). Wrote tutorial on getting started with Ruby on Rails on Google App Engine (it runs on GAE).

Vladimir Sizikov (github: vvs) . Developed jruby launcher: http://github.com/vvs/jruby-launcher

Sasaki Takeru, a hacker from Japan (Twitter: @urekat). Showed how to run Rails without Ruby Gems. Rails 2.3.5 01/21

Anagiotis Siatras, a Microsoft .Net/Gae+Rails consultant from Greece (Twitter: @azazeal)
Developed taxster.gr. See his useful Ruby tips at http://azazeal.xelixis.net/


More Links:

Reblog this post [with Zemanta]

Wednesday, April 28, 2010

Open source health gadgets

Sports Watch
How would you like to have a 3-axis accelerometer, pressure sensor, temperature sensor, RF wireless, and an LCD screen in a development package? You can actually have it - as a wristwatch offered by Texas Instruments. for just $49.
The package includes a USB programming and emulation dongle so that you can develop your own firmware. It uses Texas Instrument’s SimpliciTI and BM Innovations’ Blue Robin RF protocols that enable developers to establish wireless links right out of the box. The firmware transforms it into a sports watch with heart rate monitor, it is written for Windows but could be adopted for other platforms too.
First hackers that got hold of the package used it to wirelessly unlock doors with the buttons and accelerometer. You could utilize other functionalities as well, and jog around while configuring your Linux.

Peripheral nerve stimulator


The jfish peripheral nerve stimulator is a device used in anesthesia or intensive care to assess the degree of neuromuscular blockade (normal communication between motor nerves and skeletal muscle can be blocked by a drug). The device can detect both the magnitude and type of neuromuscular blockade. Itis developed by Daniel Jolley, a doctor and anaesthetic registrar, at The Austin Hospital in Melbourne, Australia. His device uses Texas Instruments' MSP430 line of microcontrollers - ultra-low power 16-bit RISC mixed-signal computers-on-a-chip. Check the document ‘The science and use of the peripheral nerve stimulator‘ for how to use the stimulator.

OpenECG
Open source hardware and software solution for electrocardiography was presented at the
34th Annual Conference of the International Society for Computerized Electrocardiology
The device is battery powered, it can also use an isolation transformer plus defib protection in front of the op-amps on the front-end.

OpenEEGMany EEG-based gadgets - like Zeo personal sleep coach - are in the market. OpenEEGproject can assist your brain-computer interface, bi-directional serial communication or neurofeedback experiments. The modularEEG is currently the most popular of all the designs Check online documentation for more. Then, go to the SourceForge page and download the ModularEEG project zip-file. You will find schematics, board layouts and parts lists that can be ordered from various distributors.

What a paradise for Hackers - they can design gadgets and let other people manufacture them. The open source hardware companies are predicted to be making over one billion in revenues by 2015. Most of them are offering educational electronics, but some of the packages could be utilized for health gadget development. See this talk presented at O'Reilly's foo camp east 2010.


Open source hardware $1m and beyond - foo camp east 2010 from adafruit industries on VimReblog this post [with Zemanta]eo.

Aurametrix is working on low-cost personal diagnostic devices to improve individual health

Wednesday, April 14, 2010

AWS for Startups: what's up there in the Cloud

gSounds great, isn't it - computing services that don't need any infrastructure on your end, almost instantaneous delivery of whatever server and storage capacity you need, suite of just-right software, middleware, virtualization, security, and management tools? The "cloud" label is placed on almost every Internet-based application, adding to the large crowd of cloud computing vendors.

In a previous article, we talked about new and established players offering cloud services. This one is about cloud computing pioneer Amazon and AWS Start-Up Event in Silicon Valley (hashtag: #awsstartup_sv). See also presentation slides from their 2009, 2008 and 2007 start-up events on slideshare.net.

The April 14th event was held at Plug and Play Tech Center

Dr. Werner Vogels, Amazon CTO, gave an overview of cloud computing. Here are a few notes taken from his talk:

Design for Automation is important, but things that are out of your control should not be automated. Examples are Human interfaces and Delete operations.
Every task should be decomposed into simpler form.
Ordering pipeline, for example, consists of cart - order - process - store - archive components that need storage and other functionality. If you decompose the pipeline into individual pieces, you will find that most of that storage is needed for particular tasks.
Good things about key value stores is that we know how to scale them. We can't do it with relational databases.
Database administration could be monotonous, overstressed, expensive. Should be more automated and scalable. Need DBA as a service.
Developer should decide how to implement services to obey regulations, failure jurisdictions, break transparency, avoid performance failures
Need evolution not revolutions.
A Virtual Private Cloud with secure VPN connection; a number of devices to have traffic routed through - such as spam, etc
Design with Security in Mind. For example, anonymous access time limit; other limits defined in scripts
Let your customer benefit.
During the past 2 years Amazon reduced pricing 6 times. Amount of bandwidth increased by orders of magnitude more than Amazon itself consumes (see this older slide showing the history of usage growth).
Amazon customers built great applications on top of AWS.
E.g., Cloudmmo - instance cloud, or cloud middleware to reduce infrastructure costs, technology risk and development time
Innovate for your customers
For example, innovate on cloud pricing models: on-demand instances; reserved instances, spot instances
Stax - elastic cloud app for J2EE
Heroku - ruby platform. maps ruby apps to amazon instances; SQL DB
Salesforce.com toolkit to build new cloud-based applications
Tibco's software helps to innovate by connecting applications and data in a service-oriented architecture, providing intelligence tools to make smarter decisions. They have templates that can be launched to cloud.
RightScale® providesfully automated management platform for Amazon EC2 cloud deployments.
Synteractive consulting and automation solutions provider, incl. CloudAdvantage

Also Netflix, Pfizer, eHarmony, Lilly, Malbec..

Pfizer uses Ec2, eHarmony uses MapReduce to find better matches.
Playfish - a fast growing social games company

Intuit - massive spiked testing with SOASTA's cloud test
Everyone files taxes at the last possible moment, so Intuit needed AWS to scale
Lots of companies use clouds for testing and simulations. Intuit simulates submitting tax forms -- if too many at a time
Ribbit; SimpleGeo; Siemens; twilio
Dr. Vogels' contact is werner at amazon or check him on twitter: @Werner

AWS Customer Presentations included VC-backed startups
@tubemogul, @rberger, @satyar73, @zynga
Adam Rose (adam at tubemogul.com) founded online video analytics startup Illumenix wich later merged with TubeMogul. The company helps in video delivery using IP and the Internet - deploying uploads and providing analytics, real-time viewership and engagement tracking.
See also useful tips from Nicolas of TubeMogul.
Robert Berger of Runa presented his company's experience with Elastic Compute Cloud, opschef and HBase, along with a few other useful AWS tips. His slides had a bit too large font size, at least for those in the front row. Guy Kawasaki says that optimal font size should be about half of the age of the oldest person in the audience. Centenarians would be certainly happy with this presentation.
A few notes I took were about Javascript for every page, every consumer, one or more AJAX calls; step function, Physical Layer; load every time a new merchant is added..
The company uses Opscode Chef for their tasks, helping to treat "Hardware"as Software .. which took under 5000 lines of ruby code
We are Living in "interesting" times with Amazon. The biggest problem is managing complexity of all the moving parts.
It's impossible to manage horizontal stacks - that's why to use Opscode Chef
there are lots of Learning Curves to Climb
Useful monitoring is hard but not critical
Satya Ramachandran of Jovian Data talked about the reasons to move to the cloud. He discussed HBase on AWS and how it may be dangerous, especially becouse of Hadoop namenode SPOF. if it went down, expect big problems
EC2 can surprise you if deploy multiple versions of horizontally scalable code
JovianData is a paltform as a service to optimize analytics of large data.
NoSQL does not solve application provision challenges
billions of impressions
10 users run 400 reports; 40% of them in hundred milliseconds
JovianData helps to avoid expensive data processing; Reduce Disk IO - by using their propriatory partitioning scheme - by materializing expensive groups (usage-based automatic view materialization).
3 main concerns:
Capital expenditure - long approval times
Over Provisioning - cluster up but nobody is using it
Application Isolation - one person runs unique report, another side section, how to isolate them to not let them run into one another
Biggest mistake - take entire image; 15 terabyte system monthly cost $30K
Role Based Clusters - example - double click services; data cleansing and creating models/ All model creation at night, than hybernated -- Hybernate Model
just kill 20 to 30 nodes; duplicate selectively then kill the nodes
ex: campaign manager needs to run lots of reports/ Classic Tera Scel won't be able to provision in minutes
Satya's advice was - If you are not getting 10x performance improvement - do not move in the clouds.
Aurametrix' comments - and if you do not need 10 or 100x improvement in performance, don't go in the cloud either. AWS is still a bit pricey for webapps and early-stage startups. Neither of the presenting startups fit the bill. A traditional VPS is a better solution if you only have hundreds or thousands of users or beta-testers. GAE is great for experimenting. Back to Satya's talk:
Dynamic Provisioning; using EC2 should be able to reduce performance by 100

Jayme Cox, talked on why Zynga chose AWS.
Zynga is conencting the world through Games. It's hosting 5 of the top 10 Facebook games
they use S3 - simple storage
Jayme Highly recommends RightScale
Scaling services without scaling Sys Admin Team
plan for success - could have 100K users
Horizontal scaling important

The 4 presenting startups also participated in
blockquote { margin:1em 20px; background: #dfdfdf; padding: 8px 8px 8px 8px; font-style: italic; }