1 / 102

< bigwig > A Programming Language for Developing Interactive Web Services

< bigwig > A Programming Language for Developing Interactive Web Services. Claus Brabrand. BRICS , University of Aarhus, Denmark. Plan. Introduction Runtime Model Dynamic Documents PowerForms Conclusion. Plan. Introduction Runtime Model Dynamic Documents PowerForms Conclusion.

deana
Download Presentation

< bigwig > A Programming Language for Developing Interactive Web Services

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. <bigwig>A Programming Languagefor DevelopingInteractive Web Services Claus Brabrand BRICS, University of Aarhus, Denmark Microsoft Research <bigwig> March 20, 2000

  2. Plan • Introduction • Runtime Model • Dynamic Documents • PowerForms • Conclusion Microsoft Research <bigwig> March 20, 2000

  3. Plan • Introduction • Runtime Model • Dynamic Documents • PowerForms • Conclusion Microsoft Research <bigwig> March 20, 2000

  4. What is <bigwig>? • A domain-specific high-level programming language for developing interactive Web services. HTML JavaScript Service Specification <bigwig> CGI Scripts HTTP Auth. Java Applets Microsoft Research <bigwig> March 20, 2000

  5. A collection of DSLs • C-like skeleton language with • Runtime system • Concurrency control • Database • Dynamic documents: DynDoc • Input validation language: PowerForms • Security • Cryptographic security • Syntactic-level macros Microsoft Research <bigwig> March 20, 2000

  6. A collection of DSLs • C-like skeleton language with • Runtime system (briefly) • Concurrency control (briefly) • Database • Dynamic documents: DynDoc • Input validation language: PowerForms • Security • Cryptographic security • Syntactic-level macros Microsoft Research <bigwig> March 20, 2000

  7. DSL vs. GPL • DSL ::= Domain Specific Language • GPL ::= General Purpose Language • DSL? • Targeted for specific problem domain • Abstraction level match problem domain • Examples: Lex/Yacc, LaTeX Microsoft Research <bigwig> March 20, 2000

  8. DSL vs. GPL • DSL ::= Domain Specific Language • GPL ::= General Purpose Language • DSL? • Targeted for specific problem domain • Abstraction level match problem domain • Examples: Lex/Yacc, LaTeX, <bigwig> Microsoft Research <bigwig> March 20, 2000

  9. DSL Advantages(vs. GPL + library) • Syntax • Design (and restrict) expressibility • Syntax conveys nature of constructs • Analysis • Analyze domain specific aspects • Implementation • Efficient implementation • Rely on syntax restrictions and analysis information Microsoft Research <bigwig> March 20, 2000

  10. Goals • Lower development time (= cost): • Targeted at Web services • Low-level  high-level • Increase functionality: • Compiler does “the dirty work” • Increase reliability: • Catch errors during development • Runtime errors  Compile-time errors Microsoft Research <bigwig> March 20, 2000

  11. Assumptions • “Rules of engagement”: • Lowest common denominator • Any browser/Web server combination • Only include basic primitives • Syntactic macro language does the rest Microsoft Research <bigwig> March 20, 2000

  12. Target Audience • Programmers! • No expert Web knowledge required • No multiple choice questionnaires “Reduce Web service development to a standard programming task.” Microsoft Research <bigwig> March 20, 2000

  13. Core Language Features • C-like to minimize syntactic burdens • Not C-like features: • Garbage collection • Relations, vectors, tuples • Strong type checking Microsoft Research <bigwig> March 20, 2000

  14. People • 1x Michael I. Schwartzbach • 1x Post Doc. • 5x Ph.D. students • 2x Programmers • 2x Testers • 1x External contributor Microsoft Research <bigwig> March 20, 2000

  15. Plan • Introduction • Runtime Model • Dynamic Documents • PowerForms • Conclusion Microsoft Research <bigwig> March 20, 2000

  16. Plan • Introduction • Runtime Model • Dynamic Documents • PowerForms • Conclusion Microsoft Research <bigwig> March 20, 2000

  17. 3 Approaches Script-centered Perl/CGI Microsoft Research <bigwig> March 20, 2000

  18. 3 Approaches ASP, PHP Page-centered Script-centered Perl/CGI Microsoft Research <bigwig> March 20, 2000

  19. 3 Approaches Mawl, <bigwig> Session-centered ASP, PHP Page-centered Script-centered Perl/CGI Microsoft Research <bigwig> March 20, 2000

  20. Script-Centered A script A script A page A page A script A page Microsoft Research <bigwig> March 20, 2000

  21. Page-Centered A page A page A page Microsoft Research <bigwig> March 20, 2000

  22. Page-Centered “Service code embedded in tags and interpreted by specialized Web server” • Increased level of abstraction • Easy to add dynamics to static pages • Scalability Microsoft Research <bigwig> March 20, 2000

  23. Script- vs. Page-Centered • As the service complexity increases: • Page-centered  Script-centered • Script-centered: • default programming, escape printing. • Page-centered: • default printing, escape programming. Microsoft Research <bigwig> March 20, 2000

  24. (Fundamental) Problems • Interpretation-based: • Typically no static checks • (Efficiency) • Not domain specific: • Cannot check Web related issues • Implicit control-flow: • A service = A collection of scripts/pages! Microsoft Research <bigwig> March 20, 2000

  25. Language Requirements • Compilation-based: • Static checks • (Efficiency) • Domain specific: • Check Web related issues • Explicit control-flow: • A clear service specification Microsoft Research <bigwig> March 20, 2000

  26. Language Requirements • Compilation-based: • Static checks • (Efficiency) • Domain specific: • Check Web related issues • Explicit control-flow: • A clear service specification Microsoft Research <bigwig> March 20, 2000

  27. Session-Centered client: server: e show show e one service program Internet Microsoft Research <bigwig> March 20, 2000

  28. Hello World service { session Hello() { html D = <html>Hello World!</html>; show D; } } Microsoft Research <bigwig> March 20, 2000

  29. Hello World service { session Hello() { show <html>Hello World!</html>; } } Microsoft Research <bigwig> March 20, 2000

  30. A Page Counter service { session Access() { sharedint counter; string name; show EnterName receive [name=name]; counter = counter + 1; show AccessDoc <[counter = counter]; } } Microsoft Research <bigwig> March 20, 2000

  31. A Page Counter  if (counter == 100) { counter = 0; show Congratulations <[name = name]; } else { counter = counter + 1; show AccessDoc <[counter = counter]; }  Microsoft Research <bigwig> March 20, 2000

  32. CGI Shortcomings • Stateless protocol • Session model requires state • No bookmarking • CGI URL bookmarked, not HTML URL • Back-button problem • “Step-back-in-time” does not make sense • Long response times • Clients get impatient Microsoft Research <bigwig> March 20, 2000

  33. Our Solution • Runtime System (based on CGI) • “Any browser/Web server combination” • Problems: Solutions: • Stateless protocol • No bookmarking • Back-button problem • Long response times Microsoft Research <bigwig> March 20, 2000

  34. Our Solution • Runtime System (based on CGI) • “Any browser/Web server combination” • Problems: Solutions: • Stateless protocol connector process • No bookmarking • Back-button problem • Long response times Microsoft Research <bigwig> March 20, 2000

  35. Our Solution • Runtime System (based on CGI) • “Any browser/Web server combination” • Problems: Solutions: • Stateless protocol connector process • No bookmarking use html reply file • Back-button problem • Long response times Microsoft Research <bigwig> March 20, 2000

  36. Our Solution • Runtime System (based on CGI) • “Any browser/Web server combination” • Problems: Solutions: • Stateless protocol connector process • No bookmarking use html reply file • Back-button problem use html reply file • Long response times Microsoft Research <bigwig> March 20, 2000

  37. Our Solution • Runtime System (based on CGI) • “Any browser/Web server combination” • Problems: Solutions: • Stateless protocol connector process • No bookmarking use html reply file • Back-button problem use html reply file • Long response times + refresh + timeout Microsoft Research <bigwig> March 20, 2000

  38. Runtime System • Availability: • in <bigwig> compiler • as stand-alone package • Underway... • Specialized runtime system: • CGI  Specialized Web server • efficiency, scalability Microsoft Research <bigwig> March 20, 2000

  39. Concurrency Control • Problem: • Parallel service processes. • Access shared resources. • Require synchronization. • Example: counter = counter + 1; Microsoft Research <bigwig> March 20, 2000

  40. Counter Example  counter = counter + 1;  Microsoft Research <bigwig> March 20, 2000

  41. Counter Example …add checkpoints  waitA; counter = counter + 1; waitB;  Microsoft Research <bigwig> March 20, 2000

  42. Counter Example …and constraints (“M2L-Str” logic) t,t’’: A(t)  A(t’’)  t<t’’  t’: t<t’<t’’  B(t’)  waitA; counter = counter + 1; waitB;  Microsoft Research <bigwig> March 20, 2000

  43. Counter Example “Ensure that service obeys constraints” t,t’’: A(t)  A(t’’)  t<t’’  t’: t<t’<t’’  B(t’)  waitA; counter = counter + 1; waitB;  Exclusive access Microsoft Research <bigwig> March 20, 2000

  44. Compilation Process t,t’’: A(t)  A(t’’)  t<t’’  t’: t<t’<t’’  B(t’) Mona DFA: Microsoft Research <bigwig> March 20, 2000

  45. In practice... service { session Access() { sharedint counter;  counter = counter + 1;  } } Microsoft Research <bigwig> March 20, 2000

  46. Syntax Macros service { session Access() { regionsharedint counter;  exclusive (counter) { counter = counter + 1; } } } Microsoft Research <bigwig> March 20, 2000

  47. Demo Example: Mutex labelA, B; t,t’’: A(t)  A(t’’)  t<t’’  t’: t<t’<t’’  B(t’) Microsoft Research <bigwig> March 20, 2000

  48. Demo Example: Mutex labelA, B; t,t’’: A(t)  A(t’’)  t<t’’  t’: t<t’<t’’  B(t’) session A() { while (!quit) { waitA; show Passed_A; } } Microsoft Research <bigwig> March 20, 2000

  49. Demo Example: Mutex labelA, B; t,t’’: A(t)  A(t’’)  t<t’’  t’: t<t’<t’’  B(t’) session A() { while (!quit) { waitA; show Passed_A; } } session B() { while (!quit) { waitB; show Passed_B; } } Microsoft Research <bigwig> March 20, 2000

  50. Plan • Introduction • Runtime Model • Dynamic Documents • PowerForms • Conclusion Microsoft Research <bigwig> March 20, 2000

More Related