The Artima Developer Community
Sponsored Link

Agile Buzz Forum
More than one way to skin a cat

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
More than one way to skin a cat Posted: Sep 1, 2005 5:47 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: More than one way to skin a cat
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

Tim Bray makes some assumptions about threading and scalability here:

In that recent Ruby piece, I remarked that Ruby threading struck me as kind of feeble, and that threading is getting real important. Well, I know one way to solve that problem. So I tracked down JRuby geek Tom Enebo and got some news and he pointed to me to some code that I think is pretty cool.
On that threading thing, Tom tells me that “We currently implement Ruby threads using Java native threads. It is our plan to continue doing so.” So, JRuby is ready for the threading era.

That may not be the best way to handle it. We actually have some good experience in this area, due to the port of Opentalk (our communications framework) to ObjectStudio for the last release. ObjectStudio maps its threads down to platform (in this case, Windows) threads. That makes them non-deterministic and much harder to control. It also means that any error made by a developer in an individual thread has the ability to tie things up very nicely - at the platform level.

In VisualWorks, threads are green. This makes them really, really inexpensive. For instance, in BottomFeeder, I spawn a thread per feed (I'm subscribing to 309 as I write this). I don't need to worry about thread pools, or overwhelming the platform. If I tried such a feat with native threads, I'd have to worry about those things.

Sure, you'll say, but what if I have a multi-CPU (or multi-Core) box that I want to take advantage of? Simple - run more than one image (process) and have them communicate as needed. That's actually the classic Unix approach to scaling, and it works quite well. The programming model is vastly simpler - I don't have as many complex synchronization issues to deal with. External APIs (such as database calls, etc) can already be threaded at the platform level, so you don't have a blocking issue.

Read: More than one way to skin a cat

Topic: Log Analysis - 8/27/05 Previous Topic   Next Topic Topic: Simplicity loses

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use