Flow Based Programming & the new Python coding style
Since being introduced in the language, generators (and their lesser cousins, list comprehensions) are finally making it into the community mindset. In the long term, I think that this change will have a lasting effect on the way we write Python programs.
In the beginning, Python was a conventional scripting language that happened to have a exceptionally clean syntax and a solid object model. So most Python programs would resemble conventional sequential scripts. As the language evolved, the applications grew more complex, but their essence was still the same. The network-enabled modules pushed the envelope early on. Two architectures to handle multiple simultaneous requests were implemented, following (again) the conventional wisdom: async modules (based on the standard Posix select() call) and threaded execution.
Stackless Python was a interesting event in Python's history. It's still one of the most amazing pieces of Python-related software. I personally believe that the most important effect of Stackless was to break out the paradigm box. Once Stackless became available, people could see other ways of doing things. I personally believe that Stackless was a very strong driving force, even if only as a reference of what could be done once the conventional restrictions of the sequential processing model were lifted.
List comprehensions were added first to the language. The iterator protocol followed it, and soon after, generators were introduced. People started using then, at first slowly. List comprehensions in particular have lead a number of calls for help from people trying to grasp their syntax. But now, more and more systems rely on these new style constructs to implement complex programming patterns. While checking libraries, I can often see list-comps being used in places where loops would be used just a couple of years ago. More recently, the Web SIG defined a generator-based interface in the WSGI spec, that will allow async-style calls between the web server and the application engine. And new modules and projects seem to be getting to grips with the async nature of generators, and are using them in highly interesting and innovative ways.
After following these changes over the past few years, I was surprised to be a late "rediscoverer" of Flow Based Programming. Just a quick reading on the topic shows how much can be done in terms of application modelling with Python. There are strong parallels between FBP and other paradigms, such as functional programming; a good discussion can be found on the C2 Wiki (Flow Based Programming). The basic premise is that business applications are data-driven by nature, and thus, poorly suited to the strictly sequential Von Neumann model. This may sound like old talk today, but it's interesting to note that this stuff was developed over 30 years ago, in a time when concepts like Object Oriented Programming were still an academic novelty. Critical applications written using FBP are still in use today, which proves its suitability for an extremely demanding task.
I personally believe that right now, more and more people are "rediscovering" how to think and write data centric code in Python. The newest features (specially generator expressions) will encourage this style of programming. This will lead to a change as the Python community incorporates this data-centric paradigm shift into new applications. The trend is already stablished; it's one more great application for Python, with a huge potential for success.
In the beginning, Python was a conventional scripting language that happened to have a exceptionally clean syntax and a solid object model. So most Python programs would resemble conventional sequential scripts. As the language evolved, the applications grew more complex, but their essence was still the same. The network-enabled modules pushed the envelope early on. Two architectures to handle multiple simultaneous requests were implemented, following (again) the conventional wisdom: async modules (based on the standard Posix select() call) and threaded execution.
Stackless Python was a interesting event in Python's history. It's still one of the most amazing pieces of Python-related software. I personally believe that the most important effect of Stackless was to break out the paradigm box. Once Stackless became available, people could see other ways of doing things. I personally believe that Stackless was a very strong driving force, even if only as a reference of what could be done once the conventional restrictions of the sequential processing model were lifted.
List comprehensions were added first to the language. The iterator protocol followed it, and soon after, generators were introduced. People started using then, at first slowly. List comprehensions in particular have lead a number of calls for help from people trying to grasp their syntax. But now, more and more systems rely on these new style constructs to implement complex programming patterns. While checking libraries, I can often see list-comps being used in places where loops would be used just a couple of years ago. More recently, the Web SIG defined a generator-based interface in the WSGI spec, that will allow async-style calls between the web server and the application engine. And new modules and projects seem to be getting to grips with the async nature of generators, and are using them in highly interesting and innovative ways.
After following these changes over the past few years, I was surprised to be a late "rediscoverer" of Flow Based Programming. Just a quick reading on the topic shows how much can be done in terms of application modelling with Python. There are strong parallels between FBP and other paradigms, such as functional programming; a good discussion can be found on the C2 Wiki (Flow Based Programming). The basic premise is that business applications are data-driven by nature, and thus, poorly suited to the strictly sequential Von Neumann model. This may sound like old talk today, but it's interesting to note that this stuff was developed over 30 years ago, in a time when concepts like Object Oriented Programming were still an academic novelty. Critical applications written using FBP are still in use today, which proves its suitability for an extremely demanding task.
I personally believe that right now, more and more people are "rediscovering" how to think and write data centric code in Python. The newest features (specially generator expressions) will encourage this style of programming. This will lead to a change as the Python community incorporates this data-centric paradigm shift into new applications. The trend is already stablished; it's one more great application for Python, with a huge potential for success.
44 Comments:
At January 12, 2005 at 10:14 AM, Anonymous said…
Carlos, I have copied this post onto the Flow-Based Programming wiki. Hope this is OK.
paul dot morrison at rogers dot com
At November 2, 2005 at 10:51 AM, Roberto Iza Valdés said…
This comment has been removed by a blog administrator.
At December 10, 2005 at 8:02 PM, Roberto Iza Valdés said…
This comment has been removed by a blog administrator.
At December 25, 2005 at 6:01 PM, Roberto Iza Valdés said…
This comment has been removed by a blog administrator.
At December 7, 2006 at 7:12 AM, Anonymous said…
http://utairway.com/en/reg-Shetland_Islands-505-6.html - Shetland Islands
Shetland Islands
At December 9, 2006 at 3:20 AM, Anonymous said…
http://utairway.com/en/reg-Fishing-365-358.html - Fishing
Fishing
At December 10, 2006 at 4:24 AM, Anonymous said…
http://utairway.com/en/reg-Outdoors-113-7712.html - Outdoors
Outdoors
At December 11, 2006 at 4:39 PM, Anonymous said…
http://utairway.com/en/search-windsurfing_destination.html - windsurfing destination
windsurfing destination
At December 12, 2006 at 1:05 PM, Anonymous said…
http://isater.com/news/categ-Internet_Marketing_Consultant-163.html - Internet Marketing Consultant
Internet Marketing Consultant
At December 13, 2006 at 2:24 AM, Anonymous said…
http://giftsoffers.com/news/categ-christmas_down_free_load_music-306.html - christmas down free load music
christmas down free load music
At December 19, 2006 at 7:48 AM, Anonymous said…
Check this out for FREE...
This opportunity says:
"Your Ad" Will Be Instantly Displayed on Thousands of Websites and Read By Over 10 Million People Per Week For FREE, and It Only Takes 60 Seconds To Get Started!
To find out more visit: proven system site. It successfully exposes FREE information covering Traffic and proven system related stuff.
At December 19, 2006 at 9:39 AM, Anonymous said…
WOW...!!! LOOK OUT... Hi my friends! I'm writing to you because I just came across a business that I think has great potential. It lets you save money on almost everything. Make money from almost everything, Including home loans- plus... help lower your taxes--best of all--it requires absolutely no investment. I thought you might be interested and like to check it out...
Here I have a home based business site/blog. It successfully covers home based business related stuff and almost everything else!
Come and check it out if you get time, Scott.
At December 21, 2006 at 12:32 AM, Anonymous said…
http://teonix.net/en/categ-Motorsports_and_Racing-108.html - Motorsports and Racing
Motorsports and Racing
At January 4, 2007 at 1:58 PM, Anonymous said…
http://utairway.com/en/reg-Holiday_Offers-188-186.html - Holiday Offers
Holiday Offers
At January 7, 2007 at 4:59 PM, Anonymous said…
http://roorex.net/en/search-bedford.html - bedford
bedford
At February 1, 2007 at 7:46 PM, Anonymous said…
Wow, you've got some great stuff aboutcash money millionaire here on your blog.
Please come check out my site if you get a chance cash money millionaire
At February 3, 2007 at 10:21 AM, Anonymous said…
I always learn something about student loan debt consolidation on your blog.
Come see what you think about mine. It has some good info on student loan debt consolidation too.
thanks.
At February 4, 2007 at 12:21 PM, Anonymous said…
targeted internet marketing
At February 5, 2007 at 2:39 PM, Anonymous said…
Check this out for FREE...
This opportunity says:
"Your Ad" Will Be Instantly Displayed on Thousands of Websites and Read By Over 10 Million People Per Week For FREE, and It Only Takes 60 Seconds To Get Started!
To find out more visit: business grants site. It successfully exposes FREE information covering Traffic and business grants related stuff.
At February 14, 2007 at 5:21 AM, Anonymous said…
http://www.moneymakersecrets.com/firstmoneysecrets/ First Time To The Market business home online opportunity work
Enjoy the opportunity, change your life -business home online opportunity work. Don't Miss business home online opportunity work - Visit Today...http://www.moneymakersecrets.com/firstmoneysecrets/
At February 14, 2007 at 4:05 PM, Anonymous said…
Saw your blog about home equity loan rate - as it is along the same lines I thought I would share this link with you. We were paying far too much for family things like clothes for us and the kids, games consoles inc the new Wii and soon to be PS3, car insurance/home insurance/pet insurance, broadband, mobile phones, landline calls, home and garden items, camping equipment and utilities/loans etc - you name it, we were spending too much on it.
Then a friend of mine recommended a site called www.bargainplace.co.uk. We were able to get cheaper electricity, gas, mobile phone, broadband and loan deals at bargainplace. Thanks to my friend (and the site) I am saving something like £100 a month and can afford an extra holiday abroard each year. Booked of course on www.bargainplace.co.uk. Thanks bargainplace ;-) !!
At February 21, 2007 at 5:38 AM, Anonymous said…
I have a affiliate associate program site/blog. It pretty much covers ##KEYWORD## related stuff.
Come and check it out if you get time :-)
affiliate associate programaffiliate associate program
At February 23, 2007 at 11:02 PM, Anonymous said…
Hello
Very like it!
Nice work you've done here. Here a lot of helpful information.
Also visit my sites:
http://onlinecasinos-online.blogspot.com/ online casinos
http://onlinecasinos-here.blogspot.com/ onlinecasinos
http://craps-onl.blogspot.com/ craps
http://gambling-online-s.blogspot.com/ gambling online
http://ws-poker.blogspot.com/ world series of poker
Ciao!
At February 27, 2007 at 11:39 AM, Anonymous said…
It is good to come across a site that discuss the various issues surrounding marketing, seo, Internet marketing
At February 28, 2007 at 4:07 AM, Anonymous said…
view free amateur home web cam
At February 28, 2007 at 5:23 PM, Anonymous said…
difference between love and friendship
At March 2, 2007 at 5:02 AM, Anonymous said…
Tremendous blog on atlanta internet marketing, I found it very interesting as I have a atlanta internet marketing site and I found your information very "fresh", take a look at mine site sometime?
At March 5, 2007 at 3:37 AM, Anonymous said…
*
THE FREE SEO TOOL FOR 2007!!
--------------------------------------------------------
Hi matey
I'm sure it was your blog I was reading a while ago where someone was after the name of the online marketing/promotional website that gives you free links back to yours and increases your website/blog traffic.
I asked the techi guy at work and he managed to find it - or one that is definitely similar.........and works!! The program is called the Link Referral Program 2007 and is free to sign up. Basically you agree to place a button on your webpage and you visit other websites to generate traffic for your own.
I signed up a couple of weeks ago because I have a website ppc search engine promotion. In no time my traffic exploded and my affiliate sales have gone through the roof!!
The knock-on effect of this is my website has increased to the top page of Google and I'm getting more sales than ever before!! Don't miss out - Linkreferral.com -
Always pleased to help, the anonymous tipster!!
Remember to share marketing and promotional tips with your blog pals!!
Especially when they are FREE!! ;-)
*
At March 6, 2007 at 9:28 AM, Anonymous said…
First To The Market work from home business opportunity
Enjoy the opportunity, change your life -work from home business opportunity. Don't Miss work from home business opportunity - Visit Today...
At May 24, 2007 at 4:34 PM, Anonymous said…
Free link welcome you to free add links and .
At August 23, 2007 at 6:16 PM, Unknown said…
This comment has been removed by the author.
At February 28, 2010 at 11:01 AM, Anonymous said…
All the frustration and rage boiling within her poured into the choking bodies around her. With one last pat on Erikins arm, she left them to climb the staircase alone. For a heartbeat, Nialdlye thought shed fall into Radins embrace and that Savous would follow. Nialdlye shook her head. Then she opened her eyes. They sat on the dusty floor of a wide cavern. That Hyle was fascinated by all things magical had brought them even closer together. He cupped her chin, gazing into her eyes. She loved them as much as she loved her parents. She had that under tight control. Without using magic, she didnt stand a chance against his strength. Tykirs soft words stopped her. What do you say, Eyrie? He kissed her before she could answer, lips pressing to hers. She screamed, unconsciously tearing at his hair. Then he lowered her onto Brevins chest. He, too, enjoys your garden. A page had been called to provide service for a hasty nineday. I fell in love with you when I was only a shadow in the darkness. I cant see where Im going.
At March 2, 2010 at 11:03 PM, Anonymous said…
Hed been brought to his old suite of rooms and laid out on his bed. It is akin to the spell that has protected him for the last two decades. Shes already denied me. They had him clean in moments. His were smiling down at her, pride brimming in the swirling red and black.
[url=http://cumonshot.1sthost.org/index11.html]free facial cum shots[/url]
[url=http://cumonshot.1sthost.org/index12.html]vaginal cum shots[/url]
[url=http://cumonshot.1sthost.org/index13.html]blonde shots her pussy cum everywhere[/url]
[url=http://cumonshot.1sthost.org/index14.html]vaginal cum shots[/url]
[url=http://cumonshot.1sthost.org/index15.html]video cum shots[/url]
[url=http://cumonshot.1sthost.org/index16.html]young male cum shots[/url]
[url=http://cumonshot.1sthost.org/index17.html]free male cum shots[/url]
[url=http://cumonshot.1sthost.org/index18.html]free cum shots in ass[/url]
At March 19, 2010 at 1:33 PM, Anonymous said…
super mario galaxy rosseta hentai
At August 7, 2012 at 1:31 PM, pay per head horse racing said…
Excellent blog! I truly love how it’s easy on my eyes as well as the info are well written. Great job!!
At February 24, 2013 at 9:35 AM, Anonymous said…
Hi, Neat post. There is an issue with your web site in
web explorer, may check this? IE nonetheless is the marketplace chief and a huge part of
folks will omit your magnificent writing because of this problem.
My web blog; wordpress grundlagenschulung
At February 25, 2013 at 4:04 PM, Anonymous said…
Hey! I know this is kinda off topic nevertheless
I'd figured I'd ask. Would you be interested in trading links or
maybe guest writing a blog article or vice-versa?
My website goes over a lot of the same topics as yours and I feel we could greatly benefit from
each other. If you happen to be interested feel free to shoot me
an e-mail. I look forward to hearing from you!
Superb blog by the way!
My blog post zöliakie sprue
At February 27, 2013 at 10:49 AM, Anonymous said…
Good way of explaining, and nice paragraph
to take facts about my presentation topic, which i am going
to present in institution of higher education.
Here is my page internationaler bilanzbuchhalter ihk münchen
At March 1, 2013 at 2:56 PM, Anonymous said…
Woah! I'm really enjoying the template/theme of this site. It's simple, yet effective.
A lot of times it's very difficult to get that "perfect balance" between usability and appearance. I must say that you've done a awesome job with this.
Also, the blog loads super quick for me on Internet explorer.
Superb Blog!
Look at my website: Wichtige Neuigkeiten über die glutenfreie Lebensform
At March 2, 2013 at 6:42 AM, Anonymous said…
Hello! This is my first visit to your blog! We are a collection of volunteers and starting a new
initiative in a community in the same niche.
Your blog provided us valuable information to work on. You have done a wonderful job!
Also visit my blog post - low calorie diet
At March 2, 2013 at 4:25 PM, Anonymous said…
Wonderful blog! I found it while browsing on Yahoo News.
Do you have any tips on how to get listed in Yahoo News? I've been trying for a while but I never seem to get there! Appreciate it
Here is my homepage - arbeitszimmer im eigenen haus absetzen
At March 2, 2013 at 5:16 PM, Anonymous said…
Hi there, its pleasant paragraph about media print, we
all understand media is a fantastic source of
data.
Also visit my page - a healthy diet
At March 3, 2013 at 3:05 PM, Anonymous said…
Hey there just wanted to give you a brief heads up and let you know a
few of the pictures aren't loading correctly. I'm not sure why but I think
its a linking issue. I've tried it in two different browsers and both show the same results.
Here is my blog; adkins low carb diet
my website: kohlenhydratarme Ernährung Rezepte
At March 4, 2016 at 8:32 PM, Anonymous said…
ninest123 16.03
prada outlet, nike outlet, longchamp outlet, burberry outlet, gucci handbags, ralph lauren polo, cheap jordans, louis vuitton outlet, louis vuitton outlet online, oakley sunglasses, uggs on sale, louis vuitton outlet, tiffany jewelry, replica watches, ralph lauren outlet, michael kors outlet, longchamp outlet, cheap oakley sunglasses, ray ban sunglasses, michael kors handbags, replica watches, michael kors outlet online, oakley sunglasses, uggs on sale, louboutin shoes, christian louboutin, ray ban sunglasses, uggs outlet, nike free, christian louboutin, uggs outlet, tiffany jewelry, nike air max, oakley sunglasses, longchamp bags, uggs on sale, michael kors outlet online, michael kors outlet online, nike air max, louis vuitton handbags, oakley sunglasses, louis vuitton, ray ban sunglasses, louboutin uk, michael kors, tory burch outlet, burberry factory outlet, prada handbags
Post a Comment
<< Home