Ruby

Ruby • December 2nd, 2008 • 4 Comments

Factors of Memory consumption and Start-Up times of a Ruby And Rails application

While managing TechEntreprise, I found out that:

  • Routes.rb plays a significant role in the application’s startup times and also memory consumption. Dropping formatted routes (using named routes instead of mapped resources) shelled out 30Megs of RAM from every thin server instance, and the application was also significantly faster
  • Associations (has_many and belong_to), and number of models increases significantly the quantity of RAM needed. Interestingly, the thin/mongrel server doesn’t take up significant RAM resources at the beginning, but will grow as users request to use the model or resource. The latest update (rev #529 or so) introduced more associations, which were the core of the new product feature, and the thin server all went beyond the memory amount limit (120M), and were restarted automatically by monit.

In the last case, users who connected to the website restarted the thin servers, since monit was alerted, and got average time serving of 20 seconds or so, with visible degraded performance.

The lesson here is: when your application grows, be mean and lean, stay DRY, and consider existing associations before introducing new features.


Design, Heri, Ruby, World • October 8th, 2008 • No Comments

TechEntreprise, a place for technology communities

I’ve been working on TechEntreprise for the past 4 months, and while it’s not official or launched yet, I still want to share the project on this blog.

In the technology world of Montreal, I am mostly known for having started MontrealTechWatch, a blog whose tagline is “Technology and Innovation”. The blog covered extensively technology events, new projects and ventures, entrepreneurship. It was especially exciting since it followed the birth of the technology community in Montreal. I was there for BarCamps, for Blitzweekend, or for any other *camp or technology event.

This has been a wonderful learning opportunity, since it was my 2nd blog, and was also started 2 months after I decided to try out the “blogging” thing.

The blog grew then from a little place on blogspot to a full-blown wordpress blog, with its own customized template and domain name. I especially have to thank every person in the Montreal Technology community for giving their time and offering the gift of reading and interacting with MTW.

After a while though, it stalled … or should I say, I saw more opportunities about the concept. With its mix of tech news, jobs, events, articles, and also user comments, I foresaw the possibility of having a public place where everyone could contribute.

Here is a screenshot of TechEntreprise, on the Montreal network:

TechEntreprise

Visitors can signup, have a profile, contribute to news and public forum section. There’s also dedicated sections for jobs, events, groups, and articles. I especially like the events page, where you can see who is going to an event, and then have a look at their profile in case you want to meet them at the event.

I’m planning to open up networks in Seattle, Cape Town, HK, and other places like Boulder and Boston. And yeah other cool places too.

Now, where does it lead us? Here’s a mission statement from the website:

… bet that any city can become a technology centre, and believe that TechEntreprise can be a key resource and platform for this to happen…

The sentence is for now a bit incomplete since the final mission goes much more beyond that, but it should be more than enough for now.

Now, before TechEntreprise officially launches, I want to use my blog to gather my thoughts and share the different aspects of the project to you, such as technology, product design, marketing and also monetization (drum rolling on this last one) That’s about 4 to 6 posts for the upcoming 2 weeks. Hope you’ll enjoy the ride!


Ruby • June 21st, 2008 • 3 Comments

Distributed and Interoperable Social Networks

Early June, I went to yulblog, a monthly event gathering Montrealers who blog. I usually don’t come to this kind of event, but since I was in the neighborhood, I thought I’d drop by.

yulblog takes place at La Quincaillerie, which is a great spot for this kind of event. They’ve got big tables — think tables for 15+ people, plus beer, and a young festive crowd.

yulblog montreal bloggers

I didn’t met many people. For those who know me, I’m not the kind of guy who will speak to everyone every minute; I’d rather have a long conversation with someone, be it a friend or someone new. One of those was with Alexandre Enkerli. He teaches at Concordia University, and is studying social software.

We had a long exchange; he argued that not that many people will use services like Twitter or other social services common tried by early adopters. In Twitter’s case, I argued that it has novelty uses, and I see very well most people use it as a communication medium in the years to come. Alexandre pointed out that Twitter has too many flaws to be massively adopted. I guess though we had the same thoughts; I foresaw that a new distributed, interoperable social software would come up; something that could be used by any so that they could own their own data but still participate and exchange with their contacts/friends. In more practical words, that means a software that could be installed like Wordpress on a user’s server, where he/she would put their activity stream, photos, videos, blog posts, and profile info, and would automatically pull data from their friends, be it from their own servers or a big provider like Facebook.

I have no idea who will come up with this software, but I think that’s the way it should be; and I bet it would be achieved by dec. 2009.

Now, for the technical part, I’m still thinking things over. OAuth seems to be a laudable initiative, although I find the authentication dance between the 2 websites (the server provider and the consumer) completely ridiculous, on an user experience point of view. It’s confusing, way too technical, and screams nerd overload.

Ideally, a website should be able to automatically detect if a user is using a website that has interesting information, open up an overlay form asking if the user wants to use his profile from that website, go to this website, and finally clicks the confirmation box. And that should be all. 1 screen, 2 clicks and no more to authenticate and make the 2 websites “talk”.

I am also currently building a webapp that would even bring down the total of actions required to just 1. This is a special case, because even though the services are on different servers and locales, the ring of websites share the same codebase.


News, Ruby, Technology, World • April 27th, 2008 • 2 Comments

News information filters

I get my news nowdays mostly from blogs RSS subscriptions. These blogs are around my centers of interests, and prove in the past to provide valuable insights. I also visit some time to time news from Hacker News or general websites like lemonde.fr. rss
I found out that those were valuable websites that filter the digital noise on the Internet, and allows me to keep-up-to-date with what’s important and meaningful for me.

The thing though is that it does not take into account serendipity, and of course I find myself overlooking some piece of news that were not reported in these selected news feed. And I find myself looking for a tool that would get all important news, but would also feature from some time to time a page or a post which might not be a high-profile blogger, but who would bring up a new idea or something meaningful.

Techmeme is known to sort technology blog posts, especially the startups/web2.0 “stuff”, and does a good job in doing so. From what I know, it features on its homepage new items that gets lots of trackbacks or mentions in other blogs, a sort of social validation much alike Google’s Pagerank algorithm. I also noticed it also takes into account keywords used in the headline.

Techmeme is an interesting project, although in my opinion, it encourages “memes”, and I’ve seen many posts that were just paraphrasing a featured blog post. It’s also a firehose of information, and you will see yourself loose a lot of time if you decide to take your technology news from that website. And as I said, there is no serendipity or “small blogs” in techmeme.

I’ve been thinking about this, and there are some tools avalaible out there (AideRSS or Technorati’s API come to my mind), I’ve done a quick architecture of the whole thing, and it seems trivial to create a blog aggregator that would do what I describe. And I thought it would be great to do a Québec-theme blog aggregator, or one around Madagascar.

Of course, this is just an idea stage. I know it’s technically feasible, I only need to find the time. And yes, get a web server. But yes, finish those other ruby on rails projects. But in a time where everyone and their pet has a blog and is media, I think this would be a tool that many would use.


Creativity, Ruby • December 2nd, 2007 • 5 Comments

New project

I am looking for beta-testers for a fairly simply (web) project related to blitzweekend.

Helps if you are a freelancer, a designer, a developer, or an entrepreneur and always looking for talent, in your city or in other parts of the world.

Email me at heri@madmedia.ca

thanks!


Creativity, Ruby • July 22nd, 2007 • 4 Comments

WorkCruncher

I wanted to present something at democamp, and it was OpenSpace.

But that was last month, which seems like an eternity for me, and I have moved on. This doesn’t mean that OpenSpace is dead but I think I would need to overhaul it to make a great demo. I have learned my lessons and am planning new design features that would make it more interesting.

For democampMontreal3 I will be presenting a _small_ web application I have been using locally for a few weeks and that I think will have some potential. It’s called workcruncher, it’s not ready for public testing yet, but it’s definetely more interesting than OpenSpace.

workcruncher

Sorry for hijacking the event :-) In return I promise I will write a full post about it on this blog, just after/during democamp


Creativity, Ruby • May 28th, 2007 • 2 Comments

Ruby on Rails adoption

excerpts from DHH’s report on RailsConf 2007 :
* they went from 500 to 1600 attendees
* ThoughtWorks announcing that 40% of all new business in the US is Ruby on Rails projects
* banks and insurance companies are beginning to use Ruby on Rails too


Ruby • March 20th, 2007 • No Comments

/bin/rm: argument list too long

At “MadMedia“, we handle a website that gets around 300k unique visitors monthly. The website is operated with Ruby on Rails, has social networking and voting features, and sessions are stored on hard disk. User sessions are not that big, we store hashes and all the usual stuff but after a while, you need to clean it up.

Now I was puzzled by rm this afternoon
rm -f * in /tmp/sessions directory. The terminal choked and gave out

-bash: /bin/rm: Argument list too long

Apparently there are a maximum number of files that can be passed to rm
ls -1 | grep ruby | wc -l


382611

gulp! 382 611 session files! Imagine that the application has to cycle through all of them every time (yeah, we implemented a _refresh_user_from_cookie_ method for every user logging in) Now, no wonder why logging took so much time!

The solution, by the way is:


find . -name 'ruby*' | xargs rm

Everything is smooth now, even though I am looking forward to “memcache-client“.


Ruby • March 6th, 2007 • 2 Comments

Highrise and RoR



Recent Projects

Categories

Recent Comments

Recent Posts

from heri.tumblr.com

Design

Friends and People I like reading

Marketing

Technology

World



Photos

snapshotGriot AfriqueTigre; Festival Nuits d'AfriqueSalam, Festival des nuits d'afriqueart anywherephoto.jpgphoto.jpgphoto.jpgmontreal startupdrinksNil Bleu

See more pictures

Heri is also at

Heri does not use Instant Messenging or other communications means that disrupts workflows.


© 2007 2008 Heri Rakotomalala
Photographs and Screenshots are under Creative Commons. Attribution-NonCommercial-ShareAlike 2.0
Screenshots, logos, videos, and trademarks showcased on this blog are the property of their respective owners.