Filtered By: Scitech
SciTech

Twitter fast-tracks move to 64-bit messaging


Fast growth has prompted micro-blogging site Twitter to speed up its transition to a 64-bit-based system for its Direct Message IDs. In a blog post, the Twitter API team advised developers that direct messages, just like tweets, would become 64-bit "Snowflake" IDs starting September 30. "(W)e'll begin using Snowflake for direct message IDs beginning one week from today, on September 30, 2011. This transition cannot be delayed or waylaid and we apologize in advance for any inconvenience this may put on applications not already utilizing the string-based identifier representations or relying on 32-bit integers," it said. Snowflake is a network service for generating unique ID numbers. It was a new way to generate ID numbers as Twitter moved away from MySQL towards Cassandra. This prompted some parties to expect direct messaging problems in the coming week in some apps. "Watch out for direct message problems this time next week in some apps," said TweetSmarter. Under Snowflake, Tweet IDs will not be sequential, as in current IDs, but will be time-based. A full ID will include a timestamp, worker number, and sequence number . The Twitter development team said it had introduced "id_str" fields in most API responses, and began encouraging developers to favor string-based identifiers instead of integer-based identifiers whenever encountered, due to the inability for many Javascript-compliant languages to actually consume these numbers this big. With the transition to a 64-bit system September 30, it recommend that all developers begin utilizing the "id_str" property of direct messages if they are not already. "If you're using the 'id' field with JSON in a Javascript-related language, there is a very high likelihood that the integers will be silently munged by Javascript interpreters. In most cases, this will result in behavior such as being unable to load or delete a specific direct message, because the ID you're sending to the API is different than the actual identifier associated with the message," it said. But developers who are already storing and utilizing the "id_str" value as a string need not take further action, it said. Still, it said it is most advisable to sort by an object's created_at date rather than relying on the identifiers as having any kind of meaning. — TJD, GMA News