The Blog

The what's what of the Flowdock atmosphere.

Blog Archives

GET The Message! (via API)

February 29th, 2012

Mikael Roos

That’s right, you can now GET messages. It is an obvious extension to the Flowdock API, the ability to fetch messages of a flow given certain filters. You can fetch up to or starting from a specific ID, filter by event or tags and so on.

Read the docs ➝

A basic example of filter use:

GET /messages?until_id=3456&limit=20&event=message

This request will get you 20 plain chat messages leading up to the message with ID 3456 (which will not be included).

Searching With Tags

The new API lets you also search messages by tags. Getting all the messages tagged with the tags #feedback and #todo is as simple as

GET /messages?&limit=20&tags=feedback,todo

Tags are used to a lot of things internally in Flowdock. Filtering by tags gives you access to several features, such as fetching all the comments of a team inbox item with ID 12345

GET /messages?&limit=20&tags=:influx:12345

or listing messages that contain links or files:

GET /messages?&limit=20&tags=:url
GET /messages?&limit=20&tags=:file

Check out the tags documentation for specifics.

Message Types

We started documenting the different Message Types. There’s still a lot to be done on that front. We haven’t covered much of the team inbox events in the docs and we are going to be changing some of the events’ structure.

Full-Text Search with MongoDB — Flowdock Style

March 30th, 2011

Otto Hilska

Flowdock is a collaboration tool for technical teams. From the very beginning, we had this idea of using tags to categorize real-time discussions. It works really well for building lists (like ToDo lists, lists of competitors, notes etc.) and for categorizing links (think delicious.com for your internal discussions). It changed the way we work. Still, sometimes you just forget to tag something – which is probably why our recently announced full-text search was a very common feature request.

We store all the messages in MongoDB. Implementing tags with multikey indices was trivial, and using the same mechanism for full-text search seemed to make sense. Some characteristics of our use case are:

  1. Each flow (workspace) is separate, and there’s never need to search through all messages in the database.
  2. Search results are simply sorted chronologically, there is no need for a “Pagerank”.
  3. In Flowdock everything happens in real time, so people expect to see their messages in search results immediately.
  4. We use MongoDB to store messages (with 3 copies of each message + backups). Having all that data in another redundant system would be cumbersome.

Search implementation

The implementation was very straight-forward. Every message document would simply have a new field, _keywords, that gets populated from the message contents. At this point we decided not to do stemming, but to get feedback from our customers about what’s relevant and what’s not. This already resulted in adding the functionality to jump back in chat history.

A message document would now look like this:

{ id: 12345,
  author: …,
  content: “Hey @Otto, should you write the blog post?”,
  flow: “flowdock:developers”,
  _keywords: [“hey”, “otto”, “should”, “you”, “write”, “the”,
    “blog”, “post”],
  _tags: [“user:12”]
}

We needed to add new index { flow: 1, _keywords: 1, id: -1 }. It basically means that we’re not going to be able to search by tags and keywords at the same time.

Keyword population was enabled in our backend secretly much before we rolled out the end-user UI. We also had a Scala script to go through all the older messages and populate the field.

Operational issues

Even before this exercise our system was in state where indices are too large to fit in memory. As it turned out, the _keywords index size in our use-case is ~2500 MB per 1 million messages. Having accumulated more than 50M messages, this really turned out to be a challenge.

Tweeting about our indexing process

When running the migration we encountered several challenges:

  1. MongoDB supports generating the index in background. However, since the service was running at the same time, index generation and active users were aggressively fighting about the available resources. Since adding new messages already involved updating several large indices, and since background index generation was populating memory cache with its own values, all queries started hitting the disk and the user experience was not tolerable. To solve this issue we actually removed _keywords from all the messages that were populated by the backend so far, and then built the (empty) index. This way it was way faster.
  2. Running the _keywords population script also made all queries hit the disk. Since it’s not possible to give priorities to MongoDB queries, we ended up adding lots of sleep() calls in our script. Process 500 messages, sleep 5 seconds… By default MongoDB doesn’t ensure that the change was actually written to disk before returning from the query. This could lead to a situation where queries are just stacking up because the indexing script is faster than your database. Setting the Write Concern level appropriately will make the queries block until they’ve actually completed. If possible, it’s also good to optimize for data locality. If your data is partitioned per organization, it’s likely that two consequent messages from the same organization are closer to each other in the index than two completely random messages. In some cases this might ease the disk I/O a lot. Even with these tricks we’d still have to stop the script every once in a while, when the queries started getting too slow.

In the end we took a couple of shortcuts to make our lives easier:

  1. We deleted millions of messages from organizations who had stopped using Flowdock during the beta phase.
  2. Ordered SSD disks from our service provider. It turned out to be the best investment ever! Of course it’s not doable for people using Amazon EC2 etc. but in our case we got a HUGE performance improvement. We could now populate _keywords on a live database with minimal load.

Other solutions would’ve of course been to simply shard until the indices per server fit in memory. Since in our use case people mostly address their newer messages, we felt that SSD is a more efficient solution.

Now the search is running happily, with only a couple of queries per day taking more than 100 ms. Full-text search with MongoDB might be a good fit for many use cases, just be prepared for all the operational issues that any search solution will bring you.

Full Speed with Full-Text Search

March 16th, 2011

Mikael Roos

flowdock_searched

One of the key things in Flowdock from the very beginning has been to bridge the gap between conversation and knowledge, between a nonchalant talk one Tuesday morning and a fully organized wiki page. This has proved to be a difficult task. The concept that we introduced in Flowdock to solve the problem was tagging. We put tagging in a context where no on else has thought to try it – an ongoing conversation. It’s easy to spot important bits from flowing talk, but the next step, taking that important information and cultivating it into meaningful knowledge, can be laborous. With Flowdock, this step takes you about one second. Add a tag, and you’ve essentially added that piece of information to a labeled list.

For the longest time the only way of finding this content in Flowdock has been to look for them by their tags. Real full-text search has it’s technical problems but the real reason has always been that we wanted people to get acquainted with the idea of tagging parts of a conversation. At the same time, the most wanted feature amongst our user base has been for a long time – that’s right – full-text search. Now it has been implemented.

Introducing Full-Text Search

Search Dropdown

The search can be used in Flowser, just like searching with tags. The implementation is subtle. The initial UI hasn’t changed a bit. Instead, when you’re making a tag search, in the dropdown list of tags, the last option is an actual full-text search. We think the user experience is pretty smooth.

Search Results

The results show up really quickly.

Tell us what you think, how it’s working for you. We’ve already realized that this makes the need even more obvious to be able to jump into chat history from the search results. That feature is already underway.

Sound Notifications for @everyone!

September 6th, 2010

Mikael Roos

Flowdock is becoming the only great way for teams to work intensely together. Keeping this in mind, we’ve added a couple of features that make it easier for you to get your coworkers attention. All of this has been deployed into Flowdock right now.

Be Notified

Sound Notifications

Now, whenever someone mentions your name in a flow that you have open, you’ll hear a pleasant toned-down ble-bling. This is great when you’re too focused on something else to notice that someone needs you in the flow. Or even just to notice that you are being talked about. You can mute and enable the notifications with a single click using a button in the right upper corner of the flow.

Some of you requested for sound notifications whenever a message is posted, but we opted to use the sound notifications for a more important type of situation – someone actually mentioning you by name. If you haven’t already checked the help about visual notifications, do so at http://www.flowdock.com/help/desktop.

If you’d like to comment about this feature, check out the Uservoice thread.

Tell it to @everyone

Use @everyone in chat!

If you’ve been using Flowdock, you probably know about user tags. It’s a great way to point out any link, file or message to another user in the flow. It’s especially brilliant for assigning a #todo item. Now, we’ve added a special user tag, called @everyone. You can use it in any context just like the other user tags, but instead of just one user noticing the message, it will be highlighted and tagged to all the users in the flow.

User @everyone to notify all users about an important message

And… when you tell something important to @everyone in the chat, even a sound notification will be heard by everyone!

Minimalist Meetings

March 10th, 2010

Mikael Roos

Teamwork needs work. Flowdock attempts to minimize the amount of that work. The promise is: Keep your team up-to-date with no effort.

That means Flowdock reduces the need for meetings. In a good team, members know what the others are doing at all times. A good team does not constantly feel the need to have meetings.

When done right, an efficient meeting can be useful. There are a couple of things in specific that are required for a good meeting. Flowdock can give you them.

The Agenda

With Flowdock, you can collect the agenda just like you collect any list on Flowdock. We use the #agenda tag to gather things we need to go through during our weekly “administrative” meeting. Just like I showed you in my last post about handling todo lists in Flowdock, the lists form naturally from the path of the conversation.

Tagging with #agenda

Flowser gives us the complete agenda. We just tick out the #agenda tag off the items as we go through them.

Agenda in Flowser

On meeting day, there are rarely many additions or other surprises from attendees who “haven’t seen the agenda”, since on any given moment

  • anybody can contribute to the agenda
  • the agenda is right there for everyone to see

Track and stay organized

The second most important thing in a great meeting is efficient tracking of action points (or todos) and when needed, separate note taking.

We track todos the same way in and outside of meetings. We often go through the todos in these meetings to make sure they are progressing and to address any potential problems.

We don’t keep separate notes about these meetings. We keep notes all the time by tagging things in Flowdock. A meeting isn’t a special opportunity to be organized for a half an hour. With Flowdock, staying organized all the time is as easy as chat.

Public beta opens tomorrow!

How tags changed the way we work

October 28th, 2009

Otto Hilska

Flowdock is a real-time collaboration web app directed to teams. It allows co-workers to work together closely and coexist in the same space within their browser. Right now it’s going through an alpha stage where some 10 companies are trying it out and giving feedback.

The public beta is to be expected later this year. Before that we want to share some of the ways of using Flowdock with you. Today I’ll show you some ways to use one of the coolest features in Flowdock, tagging.

Lowering the barrier

We’ve noticed that lots of useful content is generated in instant Messaging, e-mail, Twitter and other medias. In a couple of minutes it may be totally forgotten, because it’s in no-one’s interest to structure that data to a wiki page, or even worse, to a Word document.

Imagine if logging a simple bug would mean just writing a short description to your group chat and ending the line with a #bug hashtag? With Flowdock’s team chat, that’s exactly how it works.

Flowdock team chat with tags

Tags can be added as hashtags or afterwards with a separate UI by anyone in your team. This helps you to ensure that all relevant content is tagged properly.

Information always accessible

All tagged content, including chat, files, content from e-mails etc. can be found using Flowser, an app-in-app of Flowdock for information management. When a bug is closed, for example, the user can simply remove the #bug tag.

When I’m looking for a screenshot of Flowdock for a blog post, I’m going to open Flowser and search for #screenshot. If I wanted to find screenshots only about our future promo site, I could just search for #screenshot #promo.

Searching for screenshots in Flowdock

All this has truly changed our way of working. Now I’ll never forget who’s managing contracts at one of our customers, because that information is tagged in our flow. And tagging that information didn’t cost me anything.