ورود

View Full Version : خبر: مهاجرت توییتر از Ruby به Scala



Mehdi Asgari
شنبه 15 فروردین 1388, 16:38 عصر
خبر : http://www.technologyreview.com/blog/editors/23282/?nlid=1908
مصاحبه با برنامه نویسان: http://www.artima.com/scalazine/articles/twitter_on_scala.html
انتقاد!: http://unlimitednovelty.com/2009/04/twitter-blaming-ruby-for-their-mistakes.html
بحث در فروم آرتیما: http://www.artima.com/forums/flat.jsp?forum=226&thread=254430
http://www.scala-lang.org/node/1008


نظر من: با منتقد موافقم. اگه واقعا بهانه شون استفاده از JVM و GC خوب اونه ، خب JRuby (en.wikipedia.org/wiki/JRuby)
گزینۀ خوبی بود (مگر این که static typing خیلی براشون مهم باشه که در مصاحبه هم بهش اشاره شده)
در هر حال این مهاجرت تبلیغ خیلی خوبی برای زبانی مثل Scala (www.scala-lang.org)هست
(در ضمن تقصیر scale نشدن رو گردن روبی انداختن اصلا درست نیست. همینطور اختراع دوبارۀ چرخ (که همه در متن انتقاد بهش اشاره شده))
اگر هم واقعا scalability براشون مسئله است خب از Erlang (http://en.wikipedia.org/wiki/Erlang_(programming_language))استفاده کنن (همونطور که خیلیای دیگه از جمله Facebook (http://www.facebook.com/note.php?note_id=51412338919&id=9445547199&index=2)از این زبان استفاده می کنن)

پ ن: هر ابزاری رو باید برای حل مشکلی که براش ساخته شده استفاده کرد

Bayazee
یک شنبه 16 فروردین 1388, 14:41 عصر
سلام
البته برخی دلایلشون خیلی مهم هست و واقعا تاثیر گذار. نمونش این موردی که در ادامه آوردم. مبحث نخ ها خیلی مهم هست برای یه نرم افزار سنگین. و اینکه بتونه از پردازنده های چند هسته ای استفاده بکنه .

Also, Ruby doesn’t really have good thread support yet. It’s getting better, but when we were writing these servers, green threads were the only thing available. Green threads don't use the actual operating system’s kernel threads. They sort of emulate threads by periodically stopping what they are doing and checking whether another “thread” wants to run. So Ruby is emulating threads within a single core or a processor. We wanted to run on multi-core servers that don’t have an infinite amount of memory. And if you don’t have good threading support, you really need multiple processes. And because Ruby’s garbage collector is not quite as good as Java’s, each process uses up a lot of memory. We can’t really run very many Ruby daemon processes on a single machine without consuming large amounts of memory. Whereas with running things on the JVM we can run many threads in the same heap, and let that one process take all the machine’s memory for its playground.

Mehdi Asgari
یک شنبه 16 فروردین 1388, 15:49 عصر
اولا Ruby پیشرفت قابل توجهی در این زمینه داشته (اوایل فقط از green thread ساپورت می کرد)
ثانیا این زبان پورت هایی به پلتفرم هایی با پشتیبانی خوب از concurrency داره (مثل JRuby برای JVM و IronRuby برای دات نت)
ثالثا چرا Scala که هنوز در حد یک زبان research هست ؟ (و مثل #F هم یه پشتیبان بزرگ نداره)
سال هاست که زبان هایی مثل Erlang دارن مشکل Scalability رو حل می کنن (و بیش از هر زبان/سیستم دیگه ای هم خودشون رو در صنعت ثابت کردن. مثل سویچ های AXD 301 اریکسون ، استفاده در یاهو ، Facebook ، Amazon SimpleDB و ... )

Mehdi Asgari
دوشنبه 17 فروردین 1388, 01:22 صبح
http://ikaisays.com/2009/04/02/twitter-ruby-on-rails-scala-and-people-who-dont-rtfa/
این خیلی درسته:


Efficiency is a facet of scalability, yes, but it is not its only dimension. Reliability and uptime are very important dimensions of a scalable system.