You are currently browsing the tag archive for the ‘Twitter’ tag.



  • 5/15/2011: Added link to previous blog on Twitter API ME and a How-To (see below)

Smartphones get a lot of attention these days, but feature phones running Java ME outsell smartphones by a 5x-10x margin and have an installed based measured in the billions, not millions.

So, as an application developer or ISV, if you are going for the big markets, Java ME really needs to be part of your platform story. Not only does Java ME provide the big numbers, but Java ME also has all the tools and features to make creating great applications easy – applications that look and feel like smartphone-class applications.

Ok, so, let’s say you want to create one of those cool, new-fangled social networking-/location-based/interactive mash-up applications … Where do you start?

A while ago, I created a presentation and a sample application on just that topic. I presented it first at JavaOne 2010 in San Francisco as session S314178: “Beyond Smartphones: Rich Applications and Services for the Mobile Masses” and you can find the presentation by searching at the JavaOne content catalog.

video-shot.pngI’ve been continuously updating it since, and have now released the source code under the BSD license on The “Meet Me For Dinner” sample application and project shows the core building blocks and development aspects of creating rich and compelling applications and content for Java ME platforms.

The sample app is not perfect (still has a few minor bugs and is lacking some nice-to-have features) but the goal is to show interested developers how to get started and enables them, due to the liberal BSD license, to copy-and-paste code as a starting point for their own projects.

Check out this short video for an introduction. Then go the “Beyond Smartphones” project on for the full sources, instructions on how to build and run the code, and a forum for questions. Also, see my previous post on the Twitter API ME for more information and a “How-To”.

Finally, if you’re planning to attend JavaOne in Hyderabad, India next week (May 10-11), be sure to attend the “Beyond Smartphones” session scheduled for Wednesday, May 11, at 3:45 pm.


— Terrence

Screen shot 2011-04-11 at 11.59.57.png Java scored twice at Twitter over the last few weeks. First, Twitter switched the back-end from MySQL to Lucene (a search engine library written in Java), and then the front-end from Ruby-on-Rails to Blender (a Java server).

The improvements in latency (3x drop) and workload capacity (x10 increase) are quite dramatic. Some quotes:

  • “Last week, we launched a replacement for our Ruby-on-Rails front-end: a Java server we call Blender. We are pleased to announce that this change has produced a 3x drop in search latencies and will enable us to rapidly iterate on search features in the coming months.”
  • “…our 95th percentile latencies were reduced by 3x from 800ms to 250ms and CPU load on our front-end servers was cut in half. We now have the capacity to serve 10x the number of requests per machine. This means we can support the same number of requests with fewer servers, reducing our front-end service costs by an order-of-magnitude”
  • “In the next phase of our deploy, we will eliminate Ruby on Rails entirely, connecting users directly to Blender and potentially reducing latencies even further.”

Technical details on the Twitter engineering blog.


— Terrence

201008051443.jpg201008051422.jpg Seems like every decent mobile app these days needs to integrate with Twitter somehow. And until last week that was pretty easy to do for your mobile Java application – using the Mobile Ajax libraries and Twitter client sample code.

However, as of August 1st Twitter switched from Basic Authentication to OAuth – and that makes logging into Twitter a whole lot more tricky. Now, you need to deal with certificates, SSL, handshakes, signing, token requests, authorizations, and other messiness 😉 Well, really, OAuth makes a whole lot of sense, and that is why pretty much every web service out there is moving to OAuth. So once you know how to deal with OAuth you’ll be covered for all of them.

Luckily, Ernandes Mourao Junior rose to the task and has built a Java library called Twitter API ME which makes interfacing with Twitter extremely easy. It supports OAuth (more specifically, xAuth) and runs on Java ME and Android. The code is open source under GPLv2 and the binary library is licensed under LGPLv3.

I just built a little test app that logs into Twitter and posts a tweet – all with six lines of code! Awesome. I’ve posted a brief How-To on the Twitter API ME forum.

Thanks Ernandes for a great project!


— Terrence

Enter your email address to subscribe to this blog

Join 180 other followers

Twitter Updates

August 2020

Blog Stats

  • 280,276 hits