Thursday, May 31, 2012

Friendsandfarms.com presentation @boordy @friendsandfarms

We are at the friendsandfarms.com launch party at Boordy vineyards.

100% traceable, locally grown from farm to your table in less than 48 hours.

Photo

Sustainability and fresh food is growing in popularity. Food is the foundation for good health and fresh produce is an important part of that.

We recognize this at HealthCa.mp and always strive to provide tasty and healthy food at our HealthCamp events. Looking at the menu for HealthCa.mp/dc on Monday I am excited that we will once again be able to provide great food to nourish the brain cells of the participants during te stimulating day of innovation and discussion we have planned at Kaiser Permanente's Center for Total Health. Are you joining us on Monday as Health Data and Innovation Week in DC kicks in to hug gear?


Mark Scrimshire
B: http://ekive.blogspot.com
....Sent from my iPhone

Posted via email from ekivemark: pre-blogspot

#HealthData Liberacion Summit @WhiteHouse same day as HealthCa.mp/DC @todd_park back to Basics:AEIOU

This week I was astounded to find my name listed in a group of people to follow for #HealthData. It is an incredible honor to be mentioned in the same company as amazing innovators such as Todd Park, the USA's new Chief Technology Officer. Despite gaining a wider set of responsibilities Todd is still busy in the world of Health Data Liberacion.

Apparently Todd is looking for some Presidential Innovation Fellows. Hopefully this is to drive Open Health Data Innovation. I am wondering if the invite only Patient Data Liberation Summit event at the White House on June 4th is related to finding these Fellows? 

Todd, i have a word of advice. if we are taking baby steps in the world of Health Data Liberacion let's go back to basics and start with our vowels. We need health innovators everywhere to remember their AEIOU's

  • Actionable
  • Easy
  • Immediate
  • Open
  • Unobtrusive
This was one of my messages from a session i gave at HIMSS earlier this year.
Scrimshirehimss

This is certainly a message I will be promoting at the upcoming DC Health Data and Innovation Week - which includes an exciting HealthCa.mp/DC

Posted via email from ekivemark: pre-blogspot

Wednesday, May 30, 2012

#bmoretechb @aol / advertising.com

This morning is the Baltimore Tech Breakfast

Global_113667632
Agenda for May 2012 Showcase:
8:10 - 8:15 - Introductions, Announcements - Ronald Schmelzer
8:15 - 8:25 - Down4Lunch.com - Jess Sadick
8:25 - 8:35 - Common Curriculum - Scott Messinger
8:35 - 8:40 
30 Second Lightning "Shout Outs"
8:40 - 8:50 - Splurge - Andrew Weltlinger
8:50 - 9:00 - Cinidex- Greg Gershman
9:00 - 9:05 
30 Second Lightning "Shout Outs"
9:05 - 9:15 - EatBmore (LocalUp) - Brian Sierakowski
9:15 - 9:25 - Open Data Part II - Shea Frederick
9:25 - 9:30 
30 Second Lightning "Shout Outs" & Last Words

The Tech Breakfast is the largest regular meetup for Baltimore Technology people.

Down4Lunch - Jess Sadick (jsadick AT down4lunch.com)

A Washington DC-based startup.

Meet new people for networking and career opportunities. Free, self directed professional networking at lunch and other workday breaks.

Nice integration with Facebook, Linkedin and GCal.

Accepting a lunch invitations requires membership of Down4Lunch.com.

Positive reviews get shared. 

Restaurant partners get placement on the site.

This is a Freemium model. There will be a premium option. Mobile Apps will be coming. Private domain options. Promote to conferences.

Grubwithus.com is a competitor but you don't get the opportunity to choose who you will be lunching with.

Down4Lunch is looking for PHP Developers. Also looking for help for better integration with GCal. 

Common Curriculum - Scott Messinger

Teachers and Districts want to:
- Save time
- Plan lessons
- Find resources

Rescheduling lesson plans is a pain. Propagating this to colleagues, administration and students and parents.

Microsoft Word is inherently un-social for what is a very social activity.

Lesson Plans also need to integrate with District guidelines.

Common curriculum turns this upside down. It starts with sharing, syncing with dropbox.  

Competition: Betterlesson, ClassConnect, LessonSmith. All these are based around file uploading (typically from Word).

Future features: More robust commenting.

Splurge - Andrew Weltlinger

"Catalogs collected and curated."

Catalogs a $270B industry. 20B mailed by 20,000 companies.

How do you keep track of interesting items from catalogs for gifts.

Poor distribution of brochures, look books etc. 

Also environmental issue: 53M trees, 3.6M tons of paper, 38B BTUs.

Splurge will move catalogs to the iPad giving better distribution to companies globally.

Comments:
Revenue model is upside down. Why would people pay for a brochure download when it is saving manufacturers on their mailing and publishing costs.
Cinidex- Greg Gershman

Watch something... (cinidex.com)
Connects you to sources for movies. Index availability information. Netflix, YouTube, iTunes, HBO, RedBox etc.  
Provides comparative pricing and availability across multiple sources. 

Has TV Airing information and working on Movie Theatre showtimes too.

Currently 80,000 titles in their database. 

Currently a proof of concept, created by a movie buff.

EatBmore (LocalUp) - Brian Sierakowski

Lessons learned from launching (relaunching) EatBmore.com

Going from Minimum Viable Product to New Version.

1. Stuff Done is > Stuff Talked about. (stuff done incorrectly is > stuff talked about)
2. Keep your ego in check (Perfect is the enemy of done)
3. Frameworks are good - Use Them. (Not just for development anymore - look at bootstrap)
4. Have a Product Manager (someone who is responsible for coordinating dev team and business needs)
5. Avoid Feature Creep (now is always the time for something, but not everything) - Stay focused.

Goals:
- Eliminate outdated tech stack. (make easier to release new features)
- reduced checkout drop out. 

Old tech - Microsoft Web Forms. 
New tech - .Net MVC.

Bootstrap used for flexibility and ease of use for junior designers/developers.
Didn't look at Mobile as a reason for Bootstrap.

Open Data Part II - Shea Frederick (Back from AOL Ireland)

This is a follow up to an earlier #BMoreTechB presentation. by Shea:

check out data.baltimorecity.gov for sources of Baltimore city open data.

The example used was bike lane data, blue light cameras (CCTV locations), public art inventory.

The public art inventory gives information on artists, composition etc.

Baltimore Open Data Hackathon is coming up on  June 8-10th.

What other data sources should the city release?

And if you are interested in Health come to DC on Monday June 4th for HealthCa.mp/DC at Kaiser Permanente's Center For Total Health.


Posted By:

Posted via email from ekivemark: pre-blogspot

Tuesday, May 29, 2012

Baltimore Wordpress Meetup Group - The Genius bar...

This evening I am at the Baltimore Wordpress Meetup Group.

This is a Q&A Session dealing with people's issues working with Wordpress.

One issue was the stripping of codes in the Visual Wordpress Editor.

I have used TinyMCE Valid Elements that allows you to add the codes you don't want Wordpress to strip. The issue occurs when people switch between the Visual and the HTML editor.

For e-Commerce: 
Volussion

Addon to Gravity Forms also offers a paypal add-on.

WooCommerce will also let you create expiring digital download links.

Prestashop.com - A standalone shopping cart - like 

How do you choose a website developer for a website you want?

It's like buying a house. What sort of house do you want?

Some fascinating discussions about how you select a developer to help you build a web site.
The issues:

- Track Record
- Trust and partnership
- Transparency

Posted via email from ekivemark: pre-blogspot

Sunday, May 27, 2012

@HealthCampRDU - The 4x4s

Last week at HealthCampRDU we ran a 4x4 session prior to agenda setting. 

The 4x4 is Four slides in Four Minutes. 

The slides have the following elements:
Slide 1: What is the problem you are addressing?
Slide 2: What have you done to improve this situation?
Slide 3: What are your roadblocks/what don’t you know/Where would you like help?
Slide 4: Who are you and what drew you to tackle this challenge?

For HealthCampRDU we ran three rooms in parallel. 

Room 1: Focusing around consumers and patients
Room 2: Provider Engagement
Room 3: Provider Tools and Health IT

Here are the 4x4s:

1_1_Squag_4x4 Presentation.pdf Download this file

1_2x_AutismSociety_Health Conference Slides.pdf Download this file

1_3_Susan Helm-Murtagh-BCBSNC.pdf Download this file

1_4x_Audax.pdf Download this file

1_5_analyticsforhealthacare.pdf Download this file

1_6x_Capstrat_Healthcamp RDU PPT Final.pdf Download this file

1_7_ MedThink_TheImperfectConversation 1 1.pdf Download this file

2_1_StevenKeith-SeeMoreImproveMore.pdf Download this file

2_2_KMHealthCaring5.pdf Download this file

2_3_RTI_HCRDU.4x4.Hubal.pdf Download this file

2_4x_Medication Adherence - HealthCampRDU.pdf Download this file

This is a message from the MailScanner E-Mail Virus Protection Service
----------------------------------------------------------------------
The original e-mail attachment "2_5_patex_21MAY12.ppt.pdf"
is on the list of unacceptable attachments for this site and has been
replaced by this warning message.

Due to limitations placed on us by the Regulation of Investigatory Powers
Act 2000, we were unable to keep a copy of the original attachment.

At Sun May 27 09:58:20 2012 the virus scanner said:
Attempt to hide real filename extension (2_5_patex_21MAY12.ppt.pdf)

3_1x_StrategicImaging.pdf Download this file

3_2x_Therasim-DRAFT.pdf Download this file

3_3x_Time Warner Healthcare 4x4.pdf Download this file

3_4_LifeSigns_HealthCamp.pdf Download this file

3_5x_Advance2000 Health Camp RDU.pdf Download this file

Posted via email from ekivemark: pre-blogspot

#HealthFoo and HealthCamp - what a week! (@HealthCampRDU and Healthca.mp/dc #hcrdu healthca.mp/rdu )

Last weekend I was invited to my first HealthFoo. I was really excited to participate. HealthFoo is an invitation only event held over three days, this time in Boston at Microsoft's amazing New England Research and Development (NERD) Campus. I actually got to camp! Then, three days later I was in Raleigh, NC to facilitate HealthCa.mp/RDU. It made for a busy and exhilarating week and a warm up for HealthCa.mp/DC and the Washington DC Health Data and Innovation week that kicks off next weekend (June 2nd)

HealthFoo is organized by the team at O'Reilly thanks to the sponsorship of the Pioneer Fund at the Robert Wood Johnson Foundation. It brings together people from across the health care spectrum for three days of intense discussion and activity. Just like HealthCamp the participants start off the event by building the agenda.

For me it was a renewing experience. It was great to be able to spend time with friends both old and new. It started at the airport in Baltimore where I found myself on the same flight as long time HealthCamper, David Hale (@lostonroute66) who is evolving his work on Pillbox to become a developer evangelist at the National Library of Medicine. This is the type of role that Government organizations desperately need as they liberate the vast amounts of data and depend on innovators in the private sector to unleash the true power of that data.

David and I travelled by public transport to Cambridge, MA and the NERD Campus. Stopping for breakfast at The Friendly Toast - well worth a visit!

On Friday afternoon HealthFoo kicked in to gear. It was wonderful to spend time with more old friends Ted Eytan, Regina Holliday, Susannah Fox, Stephen Downs, Nate DiNiro, Dave DeBronkhart (EPatientDave), Alexander Carmichael, Ernesto Ramirez, Dr Bryan Vartabadyan (DoctorV), Roni Zeiger and more. 

Regina spent the entire weekend painting. You can read about her first HealthFoo experience here.

While the schedule had time for sessions on Friday evening this morphed, as is often the case at these type of events, people were deep in discussions around the agenda wall and just busy catching up with others and making new connections. Consequently the sessions got started on Saturday morning.

I attended a variety of sessions. In the Open Health Data session it was great to hear about the work Nate DiNiro is doing with Code For Health to advance the american health care system. There was also a fascinating discussion about the rise of the Informed Patient. One comment was that this was the worst thing to happen to the medical profession. Now people come in armed with stacks of Google search results. I argued that we don't in fact have "Informed" patients. We have "scared" patients and if search tools had a better insight in to our medical history those searches could be more accurate and insightful. Then we might actually have a more informed patient.

In the next session a small group of campers got together with Paul Levy who no longer runs a hospital but has published a leadership book - Goal Play!: Leadership Lessons from the Soccer FieldIn this session Paul wanted to draw out some ideas to help Dr. Ross Greene in his quest to help troubled kids through his initiative:

Paul led a session to re-think the web experience so that it could serve kids, parents and social workers. Together we ideated over the challenges. Amongst the ideas was the concept that we needed 3 different ways to access the resources on the site. These were from the perspectives of: The kid, The Parent and The Relationship. 

it was important that the parties were not painted as "in the wrong". It was a relationship challenge where the answer is to find ways to communicate effectively.

In the DIY Public Health session it was once again a privilege to hear the insightful views of Tom Meunecke. Tom is one of the original designers of Vista, the system that powers the Veteran's Administration health system. Tom urges us to focus on simple conditions and solutions. On the internet simple has always won out and we need to keep that in mind as we re-think health care.

We need to use positive psychology to change behavior - Fear fails.

We also need to watch the evolution of the Quantified Self movement. Teaching people that they have the power to measure is a huge step forward. If you can't measure you can't change. 

In public health we get a snapshot every two years that is 9 months out of date when published. This is a horrible way to monitor progress. Yet, we have a growing array of sensors, like the Withings scale and the fitbit than are generating enormous amounts of data but this is completely outside the purview of public health. Empowering individuals to share and donate their Health Data is the idea behind the RainbowButton initiative. 

Health Food and Agriculture

This proved to be a fascinating session, partly due to the diversity of participants. Food is a foundation stone of health. "Food is medicine" - Jill Shah. We ignore that fact at our peril. This session was led by Amanda Eamich from the US Dept of Agriculture.

Looking at a global scale. 80% of water consumption goes to Agriculture. We are heading for a global water shortage in the coming decade. Livestock is also responsible for generating 20% of the CO2 - this is equivalent to the contribution to global warming by transportation.

70% of africans work the land but Africa is a net importer of food. 

Education is a critical component. We need to educate our kids, just as we did with smoking. 

Legislation at a federal and state level is also a factor. Adam Noah pointed out how it is allowable to raise chickens in the heart of New York city but state law prohibits this in rural West Virginia. How can we establish sustainable food chains when state law erects barriers?

Roni Zeiger suggested that we should have more information available at the point of purchase so we can make more informed decisions about the food we consume. eg. QR codes with links to educational videos. 

Brita Riley talked about fascinating innovations in Hydroponics for sustainable food. Hydroponics is the fastest growing area for Intellectual Property in the USA today.

Susannah Fox led a session to seek out ideas for evolving the What If Health Care meme.  

ideas at the session included:

- Spark a grassroots movement
- Create a speech
- Get industry and community leaders to give their spin on each idea.
- Connect to policy Initiatives
- Pin examples
- Strategic Initiatives for this cadre of thinkers - then challenge them with new questions.

This session was also shared with Carolyn Lawson from the State of Oregon Health Authority. This was Carolyn's second HealthFoo. Last year she attended after just taking her CIO role at the authority and had used HealthFoo to ask for help on what she should do.

Carolyn recounted her experience of the last year where she adopted a lot of the recommendations she received and her organization is now recognized as one of the leading innovators in State-based health care. Oregon is establishing Coordinated Care Organizations that integrate non-traditional health services. Every CCO must have a Community Advisory Board and must offer dental and mental health services. The population served is medicaid eligible and no one can be refused. There have been 50 applications to become CCO and the first round of 14 will cover 90% of the State's Medicaid population. The OHA is moving from being a delivery organization to being an enabling agency.

The transition is moving towards a capitated model with quality measures driving incentives for service providers.

Later I stepped in to a session led by Jonathan Briner on Health Insurance. I found myself to be one of the few people in the session with a background in the Health Payer world. In thinking back on the session it starkly exemplified that challenges with Health Care and the insurance model we have today. 

How do you incentivize people to be healthy and reward them for good health behaviors without discriminating against people who may have genetically driven health conditions that present them with severe challenges. Obviously with many of the chronic health conditions being derived from lifestyle decisions we have a lot of scope to encourage healthy behavior. 

In a session led by Alex Tam of Frog Design the question was: How do we connect Innovators with the people with needs?

This discussion involved representatives from Kaiser Permanente and the Mayo Clinic. Project Health Design was also represented. Stephen Downs pointed out that Blogging about success and failures in the Project Health Design process is a pre-requisite for payment. This is a great way to spread the knowledge.

It is clear that there are many approaches being attempted. HealthCamp is just one of these avenues. We need to look for opportunities to bring people together from across the health spectrum - including patients. 

Saturday evening was an exciting time at HealthFoo. A dozen or more 5 minute Ignite presentations were given. David Hale rocked the house with the tale of his genomic journey of discovery. Dr. Alan Greene unveiled his latest TICC-TOCC initiative to make a minute change in the birthing process for new born babies, one that could dramatically improve their health.

I also took my chance to present my first Ignite presentation. For those not familiar with the format. You have 20 slides that advance automatically every 15 seconds. It is a challenging format to deliver against but the presenters did an amazing job. Even when PowerPoint threw in unscripted pauses!

Here is my presentation: Fight DPS. I have loaded it on Slideshare:

Sunday morning began with Tim O'Reilly leading a session on Value Creation v. Value Capture

Can we think about Health Care differentlyif we focus on value Creation.

One of the points raised was that the existing Health Care system puts no value on the time of the consumer/patient. We build systems that expect patients to queue for service.

A fascinating alternative was given as an example. Dr. Jason Cunningham (Northern California) has equipped a corps of traveling nurses with iPads to visit patients. He conducts Doctor consultations via Facetime. The Nurses are roving professionals. This approach has seen his team of nurses expand and Dr Cunningham can see more patients than by having them come in to his office.

It is clear that we need to shift health towards prevention and this needs to be led by monetizing the prevention approaches. 

"Disruptors don't make deals - they circumvent."

The big disruptors are free. They grow up in to a paid economy.

Jamie Haywood: "We live in the myth of a market economy." 

Market economy requires transparency. In the USA 60% is not a market economy. The USA is a protector of captured value that is stifling innovation.

in one of the final sessions I attended we focused on HIV and AIDS. Ben Sawyer of Games for Health demonstrated an early alpha of a game aimed at youths at risk. 

This led to a discussion that revealed the remarkable level of iPad adoption in schools and low income families. There are already 3 million iPads in use in schools. 

The mobile platform is a great one for delivering education because the platform is perceived by the user as more private. You don't tend to be overlooked by others in the same way as when using a desktop computer.

After a busy weekend at HealthFoo I headed back to Baltimore to make the final preparations for HealthCampRDU. On Tuesday we drove down to Raleigh, NC for a one day HealthCa.mp/RDU at the Marbles Kids Museum. This was the first time the HealthCamp un-conference format had been experienced in the North Carolina area. We brought together about 70 people from across the area (and beyond) to discuss "innovating the care culture"

While HealthFoo brings together thought leaders from across HealthCare that are familiar with the un-conference approach HealthCamp typically finds itself reaching out in to the traditional health care world and introducing people to the inspirational nature of the "un-conference".

We started the day with Fire starter talks from Susan Helm-Murtagh of BlueCross BlueShield North Caroline (the major sponsor of HealthCampRDU) and Derek Zabbia and Henry DePhillips of Audax Health. Their short 10 minute talks got the participants thinking. Then participants faced their first decision of the day. We held three tracks of 4x4 presentations. These were four slides in four minutes. I will post the presentations in a separate blog posting. 

After the 4x4 sessions the participants were drawn back in to the main room in order to create the agenda for the remainder of the day. It was great to see the discussions ignite and the agenda wall fill up, changing and morphing as people merged sessions because they had common interests.

What followed was an intense day of networking and discussion and we ended the day with a report back from each of the sessions. 

What a Week!

It was an incredible non-stop week! A week interspersed with job interviews and software development. HealthFoo was an experience I will carry with me for a long, long time. A chance to re-charge the innovation batteries and re-connect with friends. it was a perfect pre-cursor to HealthCampRDU and HealthCampDC where we take the un-conference experience to new areas of health care around the country and open people's eyes to the potential of partnering with other passionate innovators to drive change in health care.

Posted via email from ekivemark: pre-blogspot

Wednesday, May 23, 2012

Saturday, May 19, 2012

#Ignite at #healthfoo part 2

David Wong - the healthcare revolution of 2012

David Hale - learned everything about himself from his genome

I spoke on fighting DPS - Disassociated Patient Syndrome

Doctor V - the future evolution for doctors in the world of Dr Watson (from IBM) post human medicine. The evolution of social health.

Physicians will be radically redefined. We need serious medical education reform.

Rebecca Norlander.

60% of personal bankruptcies are health related.

Put the consumer at the middle of changing health care.

Prosthetic arms - dealing with the absence of a limb.

An injured Iraq vet launches Stumpworks to create better prosthetic arms.

Jamie Haywood - truth in science. Who is the shareholder in science?

Probability of truth is cost of claim divided by the cost to refute.


Daniel Kraft MD - checklists taken from aviation and applied to medicine are transformative. Simulators have the same potential.
Moving from connected health to super connected health

Regina Holliday - the patient story.

When you de-identify the patient you lose the patient story.

Regina is at it again - changing the world!


Mark Scrimshire
B: http://ekive.blogspot.com
....Sent from my iPhone

Posted via email from ekivemark: pre-blogspot

Ignite at HealthFoo

An amazing line up Deborah Estrin - open sesame

Talking open modular health architecture. Apply Internet lessons to health. Do this in mobile today where there is little health legacy to distract us.

Decompose monolithic apps. Make things modular.

Dr Alan Greene - bullseye

Moving the world.distance and force create leverage. Empower the people.

30% of people are obese by 9months old!

2billion people are iron deficient. 30% of baby's blood is in the placenta.

90 seconds wait will supply the missing 30% of blood and nutrients.

Steve Zadig - confessions of a healthfoo newbie.

Sensors - changing the world. 4b under served people. Can a 15c sensor change the world.

Bring together thought leaders and go solve problems.


Mark Scrimshire
B: http://ekive.blogspot.com
....Sent from my iPhone

Posted via email from ekivemark: pre-blogspot

The view from 10th floor of Microsoft NERD campus as #healthfoo Saturday gets going

Photo

Mark Scrimshire
B: http://ekive.blogspot.com
....Sent from my iPhone

Posted via email from ekivemark: pre-blogspot

Friday, May 18, 2012

#healthfoo kicks office

It is great to be in Boston at the Microsoft NERD campus for healthfoo.

We are harnessing collective intelligence with overlapping interests but diverse backgrounds.

We are in the networking age. Per Reid Hoffman we need to place ourselves in networks were interesting and valuable people come to you.

Image

Paul Tahini, Sara Winge and Tim O'Reilly introduce #Healthfoo. Health and technology are on a collision course.

Crowd sourcing and health care on a collision course.

Looking at things that move slowly and gradually an then suddenly exploding. Health care feels like it is getting closer to that tipping point.

After introductions the wall gets created.

0image

I have propose a session for Noon on Saturday on
"breaking the glass wall in healthcare - embracing patient generated data"

Mark Scrimshire
B: http://ekive.blogspot.com
....Sent from my iPhone

Posted via email from ekivemark: pre-blogspot

Arrived in Boston for #Healthfoo

I arrived early in Boston for O'Reilly's HealthFoo.

First stop is food - the friendly toast.

I am with David Hale who went with a breakfast of champions which included M&M pancakes, toast and eggs.

I went for the peasant - eggs and Cuban rice, spinach egg whites and black beans, topped with enormous hunks of a cornmeal and molasses bread.

Delicious! Perfect to recharge the batteries after having just a few hours sleep a night for much of the last week.

Photo

Now I am ready for HealthFoo and ten back to prepare for Healthca.mp/RDU next week.

Mark Scrimshire
B: http://ekive.blogspot.com
....Sent from my iPhone

Posted via email from ekivemark: pre-blogspot

Wednesday, May 09, 2012

Just finished a great meeting w/Audax the firestarter's for @healthcamprdu

Why not join Audax at healthca.mp/RDU on Wednesday May 23rd in Raleigh, NC

Photo

The view from the Georgetown waterfront park near Audax Health's office.

Mark Scrimshire
B: http://ekive.blogspot.com
....Sent from my iPhone

Posted via email from ekivemark: pre-blogspot

Thursday, May 03, 2012

This evening I am reviewing Capstone Projects at #JHU Carey Business School

Tonight I am reviewing some of the capstone project presentations at the Carey Business School. I arrived early and am enjoying this incredible view while I sort out some details for the Washington DC Health Data and Innovation week on June 2-7th which include Healthca.mp/DC on June 4th. Otis going to be an incredible week. Come on and join us....

Meanwhile, back to that fabulous view...

Photo

Mark Scrimshire
B: http://ekive.blogspot.com
....Sent from my iPhone

Posted via email from ekivemark: pre-blogspot

Wednesday, May 02, 2012

Adventures in Apache/Python Configuration: Getting Python running in an Apache Shared Hosting environment

Recently I have been doing some development with Python/Django. I have been working with Alan Viars of Videntity and working with his Restcat open source activity tracker.

One thing I wanted to do was to get my own copy of Restcat running on my bluehost account. I have used Bluehost for many years. It has proven to be a reliable shared hosting environment for me offering good value for money.

One of the challenges with getting Python running with Apache is that in a shared hosting environment you can't necessarily get at the Apache Configuration file or the virtual server configuration file. This leaves you with a more limited subset of options that can be applied using the .htaccess file.

After a lot of experimentation I finally succeeded in getting Python running and I thought I would document the setup here. I am doing this for two reasons:

1. Other may find this useful in tackling a similar challenge.
2. I do not profess to be an expert in Apache configuration so I am sure that other experts can point out improvements to the configuration I ended up with.

First, let's start with an outline of the configuration.

The web documents used by apache are stored in {User Account}/public_html

I didn't want my Python files in the web document folders, so I created a Python Apps folder. I placed this in {User Account}/pyapps

I followed the instructions from Bluehost to install Python in my user account. I also used VirtualEnv to be able to isolate the setup for individual python apps. This resulted in python being installed in {User Account}/python. Python 2.7.2 is the version that is installed.

My virtualenv configuration placed python code in {User Account}/my_python_env1/ 

RESTCat was installed in to {User Account}/pyapps/RESTCat

Bluehost offers SSH Access so you can connect securely to your account and check that your python application works.

The next step is to get the python application to be run when you access via the Apache web server. This was the fun part!

To get this working I brought a number of elements together. 

I used cPanel to setup a subdomain. in this case http://restcat.ekive.com

In the Apache web documents directory {User Account}/public_html I created an apps directory. ie. {User Account}/public_html/apps

My plan is to create an application folder in side this apps directory for each Python Application I want to install. So for Restcat we have:
{User Account}/public_html/apps/restcat

I configured the subdomain redirection to point to a Document Root of {Home}/public_html/apps/restcat

The next step was to mess with .htaccess and use the FCGI Daemon that is configured in Apache. 

I setup .htaccess in {User Account}/public_html/apps/restcat

ie. {User Account}/public_html/apps/restcat/.htaccess

In the restcat directory I also placed a symlink to the location where the static files for the application are stored.

ln -s {User Account}/public_html/static/restcat/mainstatic/   static

This file is used to control how Apache handles content.

AddHandler fcgid-script .fcgi
Options +SymLinksIfOwnerMatch

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L]

ErrorDocument 500 '<h2>(Restcat) Application Error!</h2>Application Failed to load correctly'

I think the .htaccess file still needs optimizing in order to point to the location of the Static files and admin media files before getting to the python/fcgi stage but this gets the app going. 

What is in .htaccess?

AddHandler tells Apache to use the FCGI daemon when it encounters a file with a .fcgi extension.

I will leave experts in Apache configuration to explain most of this file but the last two lines are important.

The ErrorDocument 500 line will write something to the browser if the .htaccess file is executed but the application doesn't run (in this case the mysite.fcgi file)

The RewriteRule basically passes anything that hasn't been executed up to this point and passes it to the mysite.fcgi file. It is the mysite.fcgi file that will execute the python application. So let's look at that next. 

Getting this file working was troublesome because you can get different errors between Apache executing the file and running the file directly from the SSH command line. In the end this mostly seems to come down to getting all the necessary components added to the PATH before Apache tries to execute them. Once again I am sure there are Python and Shell experts out there that can tell me far more efficient ways to accomplish this, but at least this worked!

#!/usr/bin/python
import sys, os

sys.path.insert(0, "{USER ACCOUNT}/python")
sys.path.insert(0, "{USER ACCOUNT}/my_python_env1/lib/python2.7/site-packages")
sys.path.insert(0, "{USER ACCOUNT}/my_python_env1/lib/python2.7/site-packages/flup-1.0.2-py2.7.egg")
sys.path.insert(0, "{USER ACCOUNT}/my_python_env1")
sys.path.insert(0, "{USER ACCOUNT}/pyapps/python-omhe")

base = os.path.dirname(os.path.abspath(__file__))
sys.path.append(base)
sys.path.append(base + '/..')

sys.path.append('{USER ACCOUNT}/pyapps')
sys.path.insert(0,"{USER ACCOUNT}/pyapps/RESTCat")

os.environ['DJANGO_SETTINGS_MODULE'] = 'RESTCat.settings'

# switching to FCGI
from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")

So #!/usr/bin/python is there to execute in python

We then import the os and sys components. 

Next we add a series of directories to the PATH so that this routine can find all the components it needs. For me this involved pointing to the python installation, site-packages - so django and other components could be found, the flup egg file (Bluehost recommends flup as a fcgi to wsgi interface and who am I to argue). I also needed to point to the python-omhe installation which is needed by RESTCat.

I also added the location of my Python apps and RESTCat specifically to the PATH.

I then pointed to the RESTCat settings file.

The final step was to load the fastCGI interface from the django libraries and execute. 

When you put all these pieces together you can point at a sub-domain that is hosted on an Apache Shared Host have it execute a python application.

If I want to add another Python Application I can create an additional folder in the {USER ACCOUNT}/public_html/apps directory and tweak the mysite.fcgi file in that folder to point to a different python application. 

I welcome any suggestions to optimize this setup, in particular to see if it is possible to write an Apache rule in .htaccess to point to static files in a directory located elsewhere in the Apache document root, rather than being a sub-directory of the apps/{python app} folder in the web document area.

In other words:

Have http://restcat.ekive.com run from 

ekive.com/apps/restcat and use static files in

The same also goes for the Django static files used in the admin library.

This configuration successfully runs python from Apache wthout placing the python code in the Apache web document folder structure.

Posted via email from ekivemark: pre-blogspot

Reporting from #DCTech In Washington DC @dctechmeetup

This evening I was at the #DCTech Meetup in Washington DC. As reported by Peter Corbett of iStrategy Labs and one of the organizing team - This is the largest Tech Meetup on the Meetup platform. 

Here is the link: http://www.meetup.com/DC-Tech-Meetup/events/30727511/

Here is the Agenda - A lot of great quick fire presentations:

[7:00] Intro by Peter Corbett, CEO, iStrategyLabs (@corbett3000)
[7:05] Community News
[7:10] Talk 1: DC DECIBEL by David, Julia and Alex
[7:15] Talk 2: FakeIt Until You Make it by Rebecca Thorman
[7:20] Talk 3: The Crazy Story of Doodle or Die by Dylan Green and Aaron Silverman
[7:25] Talk 4: RelayFoods by Arnie Katz
[7:30] Talk 5: Hacking Diversity in Tech by Christine Johnson
[7:35] 
Q&A With First Group of speakers
[7:40] Talk 6: Hacking Startup PR by Navroop Mitter
[7:45] Talk 7: Fancy Lads Academy by Chris Bishop and Scott Cummings
[7:50] Talk 8: ExFed by Emily Coates
[7:55] Talk 9: SocialSamba by Cheryl Foil
[8:00] 
Q&A With Second Group of Speakers
[8:05] Talk 10: GE Social Fridge by
 Zach Saale & Audrey Matthias
[8:10] Talk 11: Zaarly by Eric Koester
[8:15] Talk 12: SuperPowered by Jason Kende & Ben Fisher
[8:20] Q&A With Third Group of Speakers
[8:30] Open Mic
[9:00] Exit

I was tweeting from the event: Here is my TweetStream for#DCTech

 is looking great. Finalizing the arrangements for Weds 5/23 in Raleigh,NC  Are you in?

Posted via email from ekivemark: pre-blogspot