1 / 46

Introduction to Etch

Introduction to Etch. Scott Comer Technical Leader sccomer@cisco.com. Welcome. Introduction to Etch what it is how to use it to build a network service where it is going. What is a network service?. Messages and formats Action: query or control; Event

sawyer
Download Presentation

Introduction to Etch

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. Introduction to Etch Scott Comer Technical Leader sccomer@cisco.com

  2. Welcome • Introduction to Etch • what it is • how to use it to build a network service • where it is going

  3. What is a network service? • Messages and formats • Action: query or control; Event • Definitions / abstractions / rules • Players / authorization / transports

  4. What is Etch? • Network service description language • Compiler • Runtime

  5. Why Etch? • Language independence • Transport independence • Small and quick – high performance • Symmetric

  6. Relationship to Cisco Unified Application Environment • Application environment is a federation of services • Formalized APIs • Programmable and extensible • Enhances the Developer Experience

  7. Demos Hello World

  8. Hello World Example Overview

  9. Hello World C# Demo • Create etch interface • Generate server and client code • Implement the hello message in the server • Call the hello message from the client • Build the server and client • Run the server and client

  10. Client Listener Server Sequence Diagram Listen

  11. Client Listener Server Sequence Diagram Listen Connect

  12. Client Listener Server Sequence Diagram Listen Connect Create Server Session

  13. Client Listener Server Sequence Diagram Listen Connect Create Server Session Sends Hello To Server

  14. Client Listener Server Sequence Diagram Listen Connect Create Server Session Sends Hello To Server Disconnect

  15. Summary Hello World C# Demo • Etch generated most of code. • Generated code does all of the plumbing. • Developer only needs to be concerned with implementing and using the interfaces. • Less than 5 minutes to build a simple client / server application.

  16. Hello World Java Demo • Show using Etch in Eclipse • Start with existing demo • Add client callback

  17. Summary Hello World Demo • Java has similar experience to C# • Message sending looks just like procedure calls • Generated codes may be easily integrated

  18. Etch Language

  19. Etch Language • Messages • int add( int x, int y ) • Native types • boolean, byte, short, int, long, float, double, string, object, List, Map, Set, arrays of those things • Structured data types • struct Point( double x, double y, double z ) • External data types • @Extern( java, “com.company.User”, … ) • extern User

  20. Etch Language, part 2 • Constants • const int ZERO = 0 • Enumerations • enum PrimaryColor ( RED, GREEN, BLUE ) • Exceptions • exception LoginFailed( int code, string msg )

  21. Etch Language, part 3 • Attributes • @Direction( which ) – server, client, both • @Oneway • @Timeout( millis ) • @Authorize( method, args … )

  22. Etch Language, part 4 • Formal Comments • /** • * Adds two numbers together. • * @param x the first number. • * @param y the second number. • * @return the sum of the arguments. • */ • int add( int x, int y )

  23. Etch Language, part 5 • Mixins • service Foo • { • mixin Bar • mixin Baz • }

  24. Etch Language Example module com.acme service GeoFun { • const double DEFAULT_HOW_FAR = 10 // miles • const int DEFAULT_NUM_LANDMARKS = 20 • struct Point( double latitude, double longitude ) • struct Landmark( Point where, string description ) • void addLandmark( Landmark landmark ) • void removeLandmark( Landmark landmark ) • Landmark[] searchLandmarks( Point where, double how_far, • int count ) }

  25. Nitty Gritty Details Compiler, architecture

  26. Etch Compiler • Written in Java (runs anywhere) • Uses Templates (easier to port) • Bindings (java, csharp, …)

  27. Etch Process Etch Compiler Etch Source Interface ValueFactory Remote Base Stub Main Impl Helper

  28. Etch Inheritance Interface Remote Base Impl

  29. Main Main Remote Remote Transport Transport Impl Impl Stub Stub Etch Architecture

  30. Main Main Remote Remote Transport Transport Impl Impl Stub Stub Etch Architecture

  31. Main Main Remote Remote Transport Transport Impl Impl Stub Stub Etch Architecture

  32. Main Main Remote Remote Transport Transport Impl Impl Stub Stub Etch Architecture

  33. Main Main Remote Remote Transport Transport Impl Impl Stub Stub Etch Architecture

  34. Runtime • Message model • Compiler support • Transport • Utilities

  35. Message Model • Representation (type, fields & values) • Meta data • Generated code is transport independent

  36. Transport • URI specification • Manages session • Moves messages • Message format is generic or transport specific • (binary, xml, soap, …)

  37. Transport, part 2 • Transport services and properties • Authentication, session, logging, rate control, filtering • Protocols • Now: TCP, TLS • Planned: JSON, UDP, AES, SOAP • Extensible • JMS, REST, …

  38. Filter Chain auth session log keep alive Transport, part 3 Remote Stub Value Factory Messagizer Mailbox Manager Packetizer Security Stream

  39. More Demos Distributed Map

  40. Distributed Map Demo • Provides access to a shared Map • Add notification when values change • Example of session management

  41. Roadmap • JSON, Python, C, Ruby bindings • More transports and transport modes • Web Services Gateway • Better Integration with IDEs, Maven

  42. Etch will be Open Source!!! is

  43. Where from here? • Distribution: • http://developer.cisco.com/web/cuae/etch • Source • https://etchproj.svn.sourceforge.net

  44. Summary • Etch is a powerful tool that formalizes APIs used to access and extend Cisco Unified Application Environment • Etch automates many tedious and distracting tasks • Etch may be used in your own projects, and embedded in your own systems.

  45. Q and A

More Related