1 / 27

Software design A look from the field…

Software design A look from the field…. Ofer Egozi, CTO Babylon Ltd. Goals. Review some software design issues we came across at Babylon R&D Demonstrate the importance of some principles you study here, in the “real world”

sheba
Download Presentation

Software design A look from the field…

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Software designA look from the field… Ofer Egozi, CTO Babylon Ltd.

  2. Goals • Review some software design issues we came across at Babylon R&D • Demonstrate the importance of some principles you study here, in the “real world” • But also show the constraints that cause us not to follow them, and what happens then

  3. Babylon – the company • Established in 1997, single-click dictionary • Internet global distribution, eyeballs model • Added conversions, user-created glossaries • Monetization attempts (2000) disappointing • Major restructure in 2001, team halved • Move to licensing model, retail + corporate • Added PRC, Enterprise information (2003) • Today growing, balanced, ~70 employees

  4. Babylon-Pro Basics OCR [ trap click , get context ] Content-Manager Local Glossaries Server Glossaries Server GUI Result-Manager Client

  5. 3.0 2.1 4.0 5.0 2.0 3.0 4.0 5.0 2.0 1.0 3.0 2.2 2.0 3.0 Babylon R&D – products Babylon-Pro Public Server Babylon-Builder Enterprise-Server 5.0 1997 1998 1999 2000 2001 2002 2003 2004 2005

  6. A lesson in what not to do… • High cohesion, low coupling, locality, understandability… • Versions 2.0 – 4.0 were almost anything but the above… example • Why? time to market, prototypes that become products, never time to rewrite • Still we survived until a rewrite could be prioritized (v5.0), toward the Enterprise-Server

  7. Inherent constraints • Millions of active users (can’t babysit at customer site, at least not retail…) • Backward compatibility major issue (BDC), hard to simulate in Technion assignments… • Retail market much less customer-driven, design may start earlier than full specs (U3) • At some stages, time to market critical, at others – not (and stability critical)

  8. Gloss BES Babylon-EnterpriseServer Public Server BES-ext Content Server Requestor XML/httpXML/”COM” Babylon Client Content Manager General architecture (5.0) Note: describes only BDC data sources!

  9. Content Server - Deja-vu • Don’t duplicate code – trivial, isn’t it? • Initially content serving was client code only (v2.0). Then, marketing demand for a quick online implementation (v2.1). • Main challenge – wrapper, core sources shared • With time, this on-demand porting was somewhat neglected, and coordination drifted • Only in 2004 (v5.0), code was restructured and unified, first as sources, then as a portable DLL

  10. Content Server – “classic” classes • What would you expect classes of a Glossaries’ Content Server be? • Surprisingly, we actually do use the real-life objects in these classes: CBDC, CBDCRecord,CBDCWordRecord, CBDCTranslationRecord, CBDCInfoRecord, CBDCTranslationsIndexTableReader • Observation 1: all these are internal, access is only through high level calls • Observation 2: additional, “physical” classes, e.g. BRandomAccessReader(low-level) or CBDCWordsTableReader (install/upgrade)

  11. Request/Persist - Abstraction • Recall architecture… • Request / Reply format (v4 example) • Configuration / Persistency (registry / .ini) • Natural unification solution: XML format • Proprietary – integrity-check, compress, typing • Markup interpreted to/from XML, interpreter is a portable recursive class • Designed to solve data integrity problem, then generalized and used throughout products

  12. JBanner - interpreter • J frequent prefix, but does not stand for Java…  • Element for proprietary advertising (2000), go beyond animated gif (no Flash then!) • Marketing requirements too unpredictable, wanted to allow maximum flexibility • Created a simple but powerful scripting language, power ranged from simple banners to arcade • Interpreter always adds a level of complexity, bridging it to “user-level” is important • In our case, it was not bridged… 

  13. BES-extensions - cake-baking • Recall architecture… • Enterprise-Server requestor implemented at first in public-server requestor • Very quickly, differences grew to be significant, and complicated code • Hard work invested to detach the BES-extensions module • Module then put in a DLL (BES client only) with a “narrow interface” to enforce

  14. Testing • We know how to do that, don’t we?  • I’d like to talk about: “Post-Testing” Testing?

  15. Post-Testing Testing - logs • QA is the process of finding bugs, not proving there aren’t any… • On release, load shifts from QA to support • Empower support using readable and detailed logging in Release (example) • More difficult to add good logs after development... • Development/debug logs should be cleaned and kept, with LogLevel support

  16. Post-Testing Testing - crashes • On the Complexity of Debugging Crashes…  • Until v3.1 (2000), many client crashes were X-files. Then, crash-reports were introduced. • Crash rate shrunk by an order of magnitude, crash visibility and investigate-ability rose  • Here’s what the user sees.... • Infrastructure – simple macros, embedded in main entry points and sensitive code • With time, recovery added too (use sparingly!!)

  17. The trivial rules of thumb  • Avoid “NIH” syndrome if possible… (example: GUI) • Trade-off between abstraction and speed (example: glossary installation) • Entire module rewrite gets a low priority a-priori – cause for developer frustration  • Rewrite is also dangerous - listen to Joel…

  18. That’s all folks… • Questions?… 

  19. Main header (partial)v3.1 , 2000

  20. Sample request/reply – v4.0 217.66.199.240 - - [04/Sep/2004:00:02:11 -0400] "GET /cgi-bin/trans40.cgi?00GFA2IAC3136FCJ0,645,385;748B;2AEF;1199;182A;87C;C01;11EE;638B;4EA;4E8;4F8;4E7;38E;4EB;38D;38C;38B;38A;4E4;389;9DA;388;4E5;387;386;390;38F;0:2:33:.AAcknowledgement HTTP/1.0" 200 6 "-" "Babylon"

  21. Babylon-Pro Basics – server_reg OCR [ trap click , get context ] Content-ManagerPersistency Request context Request Server GlossariesPersistency Local GlossariesPersistency Server GUIConfigurationLocalization Reply Reply Result-Manager DOM Client

  22. JBanner (interpreter)Email from marketing to R&D team leader…

  23. Logging – example (client init) • Support process flow

  24. Exception handling facilities • Code running at exception must be “thin”! • Example for CSHost service

  25. Shared client/server code (pre-v5.0)

  26. Shared C/S code (v5.0 - CSHost)

  27. When there is too much sugar… 

More Related