Archive for the 'Apple' Category

Does MobileMe’s Push Email Really “Push?”

July 13, 2008

When Steve Jobs first announced “push email” for the upcoming iPhone 2.0 software, I was skeptical.  The two protocols I knew of, POP3 and IMAP, operate on a protocol that is always initiated by the client.  The user has to continuously check in with the server to see if new messages have arrived.  With POP3 and IMAP, you can approximate push email by polling server several times a minute.  I figured that Exchange supported some sort of persistent connection that allowed push, but from the way it was presented at Steve’s keynote, it seemed that they were touting push email for any mail account accessed by an iPhone.  I wrote off “push email” as a marketing ploy.  Im my mind, the mail server would have to know where the client was at all times to “push” updates.

Well, it turns out that MobileMe supports Push-IMAP, a relatively new protocol.  The way it works is a client logs into the MobileMe server with a long-lived HTTPS connection.  Through this connection, the client sends any updates to the server.  The server sets up a long-lived response to send back notifications of new messages.  Data is compressed to help lower bandwidth requirements.  P-IMAP is an open protocol and a P-IMAP to IMAP bridge can be set up to allow legacy mail servers to provide push services.  In addition to email updates, P-IMAP allows other data, such as contacts and calendars to be synchronized.

What seems surprising to me is that Apple is going to have to set up a system that will have to handle millions (well, at least thousands) of simultaneous connections.  Let’s hope they can do it!

So, is MobileMe’s push really “push?”  Well, technically, no.  The client still has to initiate and maintain a connection to the server.  If the server kept track of what IP address each iPhone had and initiated connections out to each iPhone, it would be a true push system.  In reality it’s a more scalable way to handle continuous polling.

 

More information:

P-IMAP

Ruby/Rails on Linux (oh yeah, Perl too)

April 26, 2008

So I’ve spent the last four months developing Rails apps, Ruby scripts, and Perl scripts on a Fedora desktop. I cut my teeth with Ruby/Rails on my Mac at home, so I was in on the TextMate and Growl goodness. It’s comical to see that 90% of Rails developers are on the Mac, and one would assume that it’s because if one must use a trendy framework, they must also choose a trendy development platform. The truth is, I just haven’t found sufficient analogues to Mac tools in the Linux environment.

The first editor I experienced (and the one I keep coming back to) is Eclipse/Aptana/RadRails. It is a beast of an IDE, taking several seconds to load on a capable dual core AMD 64. Here’s some other issues I run into on a daily basis with the 1.0 release (which, to me, would imply feature complete and stable):

  • RadRails “forgets” about syntax highlighting and makes everything purple.  Sometimes, typing space at the end of a line and saving will fix it, but it’s a crap shoot.
  • Eclipse will occasionally slow down to a crawl for about a minute.  The GNOME task monitor says the CPU is idle, but Eclipse would make you think it was sharing CPU time with a nuclear explosion simulator.
  • The “go to resource” dialog doesn’t quite load results for every file that matches your criteria.  It also takes an extra arrow key press to get through the list.
  • If left open for too long, the inevitable, “There was an error, would you like to exit the workbench?” dialog appears.  You can say “no” but then you’re just living on borrowed time.  Eventually, it will all come crashing down.
  • Of course, there are not nearly as many cool shortcuts and scriptability that TextMate offers.
After getting frustrated with RadRails, I turned to gedit, GNOME’s text editor.  Apparently, there are several plugins you can get to make it act almost like TextMate.  It’s also very lean and responsive.  First of all, the gedit website was down when I tried to get the plugins.  Then, it became a confusing ordeal to get the plugins installed correctly.  Gedit also liked to keep backups of each file sitting right next to the real files.  This made SVN a bit messy when I would just run an svn commit on everything.  Furthermore, the plugins, like the quick file open, didn’t even work 100%.  After some gedit crashes, I decided to ditch it and look further.
After trying the two major open source editors, I looked into ActiveState’s Komodo IDE.  It’s a paid app running at $300.  This IDE was the most consistent, stable, and feature-rich app out there.  However, it had major performance issues.  Simply scrolling through the list of files in a project slowed the app to a crawl.  I installed the version compiled with gcc 5, which offered a slight speed improvement, but still wasn’t snappy enough to facilitate rapid development.  It wasn’t worth $300.
So now I’m back to Eclipse.  Yes, I know there’s always vi and emacs, but I’m feeling too lazy right now to learn all the keystrokes required for things as simple as highlighting text and switching files.  I’d rather just use the mouse that God gave me.
As far as a Linux analogue of Growl, there is Mumbles.  At this point, it seems like too much of a hassle to find all of the plugins to make Mumbles work with even simple services/apps.  I love how many apps now (like Firefox 3) have Growl support built right In.  
Which brings me to my point.  The Mac is sort of like a “GUI on Rails.”  Its API sets stricter conventions on how an app should work, but with those limits comes the benefits of simply getting things done and the ability to focus on the grander issues – like interoperability and bleeding edge features.  In the Linux world there is an amazing freedom of choice, but with it comes chaos and a lot more work that goes toward just getting things to talk to one another.  While the freedom is nice, sometimes it’s nicer to work within stricter guidelines and get something done quickly.

    On The Air

    February 26, 2008

    It’s official!  This last Saturday, I hopped over to Grand Rapids, got to the Apple Store as it opened, and made use of my MSU ID (good as gold!) to purchase a brand new MacBook Air.

    As I stated in a previous post, I realized that top-of-the-line performance was not a major factor for me and I liked the ultra-portability it offered.  Plus, the price was just right.  So far, I’ve just been setting up apps and moving over data, but it is plenty speedy.  The only time I’ve run into slowdowns is when copying files over the network while running iPhoto from a shared network and copying files from an external hard drive.  Otherwise, it’s been running SO much faster than my PowerBook G4.

    I haven’t done any web development on it yet, so I’ll throw up a post when that happens.

    My comments so far:

    • The build quality is absolutely the best I’ve seen in a Mac.  It’s rock solid and there are no gaps in the seams of the case.
    • It’s very lightweight!  I hardly notice I’m using a laptop.  It’s like a natural extension of my body.
    • MagSafe is a GodSend.
    • The function keys are all messed up..but getting used to it.  The modifier keys combined with the expose key replace F9-F11.
    • The black keys make the back-lit keyboard much more functional.  With the PowerBooks, there wasn’t enough contrast between the silver keys and the white lit letters to make the lighting effective, except in pitch black.
    • I’m not missing the CD/DVD drive.
    • I’m not missing FireWire…yet
    • The monaural speaker is on the right side and sort of causes an imbalance when sounds are played – makes you think something is coming at you from the side.  Freaky!
    • The iPhone-like touchpad is awesome.  Three-finger swipe to go back/forward in Safari!  The system preferences also shows videos of all the different “moves.”

    This really is the ninja’s laptop!  The MacBook Pro/PowerBook is more of an armored knight.

    Completely Unteathered?

    February 4, 2008

    It’s not very often that I get to seriously consider what my next Mac will be.  My 4.5 year old PowerBook is on its last leg with a broken display and dwindling performance.

    I’m stuck trying to decide between two options.  Option 1 is to just get a MacBook Pro.  A workstation in my lap.  Option 2, however, is a bit more intriguing: get a MacBook Air. 

    I know, you’re saying to yourself, “Derek, for only $100 more you get a wider screen, a ton of ports, a lot more storage, and improved performance.  As a developer why would you even consider a less powerful machine?”  It’s because I’ve been toying around with the idea of becoming untethered. 

    Performance

    It’s true that MBP is significantly faster than the MBA.  The 7200RPM BTO hard drive option would blow the MBA’s puny 4200RPM drive.  The MBA has its video memory shared with the main RAM.  Games on the MBA wouldn’t be very good and I wouldn’t want to do any serious video editing.  But when I think about it, when’s the last time I played a computer game or edited video?  In all honesty, web development is more memory intensive than anything.  Macworld recently found that, while the MBA is slower than the MBP, it’s still significantly faster than the last PowerBook (which was significantly faster than my current machine).  So any of Apple’s current offerings would be an improvement over what I have now. 

    Storage

    The largest hard drive you can have installed on the MBA is 80GB.  I’m already filling up my 100GB drive and as I watch more online video, take more pictures, and listen to more music, my space requirements are only going to increase.  This is probably the primary factor that’s holding me back.  However, I’ve found that storing my photos on a network share over a 54Mbps wireless connection offers no serious penalty.  With an 802.11n connection, it would be even snappier.  Thus, storing all of my photos on our home server will leave me plenty of room (21GB) to work with on the MBA.

    Efficiency

    This is where the MBA shines.  The MBP is quite heavy.  I haven’t held the MBA yet, but from what I hear, it’s amazingly lightweight.  It would be nice to have to lug less weight around.  It would also be nice to have a more compact laptop for on the plane.  I loved my 12″ iBook in college and the MBA’s 13″ screen would be an adequate size. 

    The MBA only uses a 45W power adapter while the MBP uses a whopping 85W.  That’ll save me money on utilities!

    I also like the idea of a multitouch trackpad.  However, it’s expected that the next MBPs will have that as well in the next couple of weeks.

    Overall, it’s the portability that really draws me to the MBA.  While the power of the MBP is compelling, to me it seems like buying a Ford F-350 for my commute to work.  I’d rather go with the Honda Civic.

    An iPhone Letdown

    January 17, 2008

    One of the cool things with OS X’s address book is that with my old Sony Ericson phone, I could manage calls.  I would pair the phone with my Mac using address book (by pushing a little bluetooth icon).  Whenever someone called, their vcard and picture would pop up on my screen and I could choose to answer or ignore it.  Of course, I couldn’t talk through the Mac’s microphone/speakers, but it was nice when using headphones – I could still catch calls while the music was blasting.   It’s also interesting to note that under the bluetooth utility, it states the iPhone supports no bluetooth services whatsoever – no file syncing or address book syncing.  So, it’s really only for bluetooth headsets.  That’s pretty lame!