New Negotiations

  • From RSS
A story from corporate technology life.

How it was

On Friday the 13th, we launched the internal Negotiation service, version 1.4 - essentially rewritten by 70% compared to the previous version. The main change is a completely different engine.

Previously, “Negotiations” communicated with Exchange using two protocols at once: SMTP for booking and MAPI for receiving new events. With such a scheme with sending letters and checking their status, after some time the system had large delays and was less usable and convenient.

Now everything is reduced to a common denominator, and the service communicates with Exchange through one protocol - SOAP. Thanks to this, booking and synchronization occur almost instantly (within five seconds) and the service has become more responsive and nimble in the user interface. This is noticeable to the eye.

Negotiation Service

Another achievement was a higher accuracy in displaying the current picture of the busyness of the meeting rooms. If earlier there were cases of the disappearance of some meetings, zombie meetings or incorrect display of time, now it has been possible to achieve almost 100% true reflection of the real situation in Exchange.

In addition to the engine and related improvements, Negotiations acquired some more nice features. For example, determining the user's current office not only by his postscript in Staff *, but also by his current place of stay: the service can determine by IP what office the person is currently at.

Now some technical details about the development.

Under the hood

After it became clear that the transition to SOAP was required, the question arose: how to communicate with EWS (Exchange Web Services) from Python. It turned out (thanks to Sasha Pokatilov for the initial research) that everything is not so good with SOAP libraries. Some are too confusing, others are no longer supported, others are simply not able to make friends with obstinate Exchange.

The best contender for use was the Suds library. This is a fairly young SOAP client with dynamic circuit creation (others are trying to generate static stubs based on WSDL) and a "smart" interface. Although, studying a little deeper implementation, I was born the phrase - "Java of the brain." Draw your own conclusions :-)

I had to decent modify the library itself so that it could handle all the features of Exchange. From here the fork of the official version was born . There I patched all the necessary places to make it work correctly.

Exchange is generally very peculiar. Either he manages to give html to SOAP requests (IIS is more likely to blame), then in case of errors he gives an answer with the code 200, then he behaves unevenly in similar situations: for example, deleting an event with and without participants requires different calls. Which of the documentation on MSDN is not at all obvious. MSDN itself is a separate song ...

I also had to create a SOAP server interface based on Suds. The server is needed so that Exchange can push (push) alerts about new events (or about changing and deleting old events). This simplified the synchronization process and made it almost instant.

There were also my own puzzles: a long selection of unique keys for tables, and a setup with default collation for rows in MySQL, and a bunch of stupid programmer misses :-)

After a month of active fuss, I managed to get the service and Exchange to communicate in the same language.

The new engine simplified the process of laying out the package and lost a lot of bad dependencies on different marginal libraries (libmapi, samba, etc.).

Now we have the knowledge, experience and implementation of communicating with Exchange via SOAP!


Special thanks to Seryozha Andryukhin for active assistance, including moral support in difficult times of struggle with Microsoft products.

I hope this release will help Negotiations win the share of the domestic market from Outlook. There are several new features ahead that should finally bring the competitor to its knees :-)

It's no secret that every large company has its own, internal Internet, with its own, internal resources. And Yandex is no exception. For a long time, we used Microsoft Exchange to schedule meetings, which was convenient, but only for Windows users. The rest had to somehow get out of it, trying to come up with a way to book a meeting room or make an appointment. At some point, it became clear that it was no longer possible to live like that, and an internal “Negotiation” service was developed that partially solved this problem. And, like any Yandex Internet service, Negotiations are also developing and improving.

All this text is the so-called release notes, an internal message about what has changed in the service and how the development took place. It seemed to me that you would be interested to see how Yandex looks from the inside.

* "Staff" is a corporate address book.

Alexander Koshelev, champion of the convenience of negotiations


Also popular now: