Case: Lokad Watchtower

by Rinat Abdullin, February 2012.

About the Problem

As companies grow, so do their business processes, internal structures and workflows. Usually this is accompanied by reduction in overall efficiency. For a small company like Lokad, it is essential to stay flexible while keeping efficiency high. This becomes more important because:

  • Teams are scattered around the world. For instance, members of sales team are located in Paris, Berlin and Ufa.
  • New services and products are continuously introduced thanks to effort of Lokad business and R&D teams.
  • We still try to keep our company small, lean and focused. We try to grow by doing things smarter and not by hiring more people.

So we needed a way to improve company communication and collaboration:

  • let everybody have common and real-time view of multiple heterogeneous systems;
  • reduce mental burden of using the system by organizing data, prioritising information, presenting it in natural way (i.e. no tables), providing context-specific hints;
  • protect development teams from continuously answering same questions (that could be dealt with automatically);
  • serve as sandbox for testing new technologies;
  • be able to adapt UI extremely fast, based on the feedback and needs of the other teem members.

Additional requirement was to avoid any complicated third-party technologies (like ORMs, relational databases or service buses).

That's how Lokad Watchtower was started, helping our teams to take care of customers and help them solve problems faster.


Actually, implementing watchtower was a no-brainer for a couple of reasons.

First, strategic perspective was guided by an established principle of digital nervous system:

The term 'digital nervous system' is kind of an interesting one. The analogy, of course, is to the biological nervous system where you always have the information you need. You always are alert to the most important things, and you block out the information that's not important. And companies really need to have that same kind of thing: the information that's valuable getting to the people who need to know about it. Bill Gates

Second, Watchtower has to integrate only with event-centric systems. It essentially is just a separate projection host that receives events from multiple systems, denormalizing them into persistent read models that are served to the client Web UI. Host is implemented as Lokad.CQRS engine, while web UI is an ASP.NET MVC 3 application with Loakd.CQRS client logic.

Third, notion of event replays (to populate new or changed views) has already been established at Lokad. We just needed to push it further by letting server handle view repopulation automatically. This massively reduced development friction in UI (and Watchtower is almost completely just a UI) allowing to deliver relatively large features to production within the same day. Besides, there was no need to waste time on SQL schemas or any relational persistence concerns whatsoever.

Fourth, relative ease of UI development allowed to experiment with new approaches to representing information to the users. Two most popular features were:

  • Plain text search.
  • Activity lists (similar to Facebook wall or timeline).

Fifth, there is already a lot of information available on making efficient UIs, given low development friction and no dependencies on relational storage. Github, twitter and Facebook provide plenty of inspiration in this field.


If you are a Lokad team member and read that far in this case study, then there is an easter egg for you. This UI works on iPad and smartphones as well… :)

  • Persistence ignorance inherent to CQRS solutions (initially explored in another Lokad project) helped to both reduce development friction and achieve cloud-portability design. Watchtower was initially designed for Windows Azure deployment, but currently runs on another cloud. The project can obviously run natively on local development machine as well.
  • Development stack for web UI includes:
    • ASP.NET MVC 3 (Razor)
    • jQuery
    • Twitter Bootstrap
    • Lokad.CQRS client
  • Server is just a Lokad.CQRS host with some projections and a few additional event streams plugged into external systems.

Learn More

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License