1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All...
-
Upload
job-mitchell -
Category
Documents
-
view
214 -
download
0
Transcript of 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All...
1Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Introduction to Etch
Scott Comer
Technical Leader
2Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Welcome
Introduction to Etch
– what it is
– how to use it to build a network service
– where it is going
3Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
What is a network service?
Messages and formats
Action: query or control; Event
Definitions / abstractions / rules
Players / authorization / transports
4Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
What is Etch?
Network service description language
Compiler
Runtime
5Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Why Etch?
Language independence
Transport independence
Small and quick – high performance
Symmetric
6Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Relationship to Cisco Unified Application Environment
Application environment is a federation of services
Formalized APIs
Programmable and extensible
Enhances the Developer Experience
7Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Demos
Hello World
8Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Hello World Example Overview
Client Server
Etch Etch
9Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
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
10Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Sequence Diagram
Client Listener Server
Listen
11Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Sequence Diagram
Client Listener Server
Connect
Listen
12Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Sequence Diagram
Client Listener Server
Create ServerSession
Connect
Listen
13Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Sequence Diagram
Client Listener Server
Create ServerSession
Connect
Listen
Sends HelloTo Server
14Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Sequence Diagram
Client Listener Server
Create ServerSession
Disconnect
Connect
Listen
Sends HelloTo Server
15Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
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.
16Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Hello World Java Demo
Show using Etch in Eclipse
Start with existing demo
Add client callback
17Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Summary Hello World Demo
Java has similar experience to C#
Message sending looks just like procedure calls
Generated codes may be easily integrated
18Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Etch Language
19Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Etch Language
Messagesint add( int x, int y )
Native typesboolean, byte, short, int, long, float, double, string, object, List, Map, Set, arrays of those things
Structured data typesstruct Point( double x, double y, double z )
External data types@Extern( java, “com.company.User”, … )
extern User
20Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Etch Language, part 2
Constantsconst int ZERO = 0
Enumerationsenum PrimaryColor ( RED, GREEN, BLUE )
Exceptionsexception LoginFailed( int code, string msg )
21Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Etch Language, part 3
Attributes@Direction( which ) – server, client, both
@Oneway
@Timeout( millis )
@Authorize( method, args … )
22Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
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 )
23Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Etch Language, part 5
Mixins
service Foo{
mixin Barmixin Baz
}
24Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
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 )
}
25Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Nitty Gritty Details
Compiler, architecture
26Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Etch Compiler
Written in Java (runs anywhere)
Uses Templates (easier to port)
Bindings (java, csharp, …)
27Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Etch Process
Etch Source EtchCompiler
Interface
StubRemote
ValueFactory
Helper
Base
Main Impl
28Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Etch Inheritance
Interface
Remote Base
Impl
29Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Etch Architecture
Stub
Remote
Transport
Impl
Main
Stub
Remote
Transport
Impl
Main
30Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Etch Architecture
Stub
Remote
Transport
Impl
Main
Stub
Remote
Transport
Impl
Main
31Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Etch Architecture
Stub
Remote
Transport
Impl
Main
Stub
Remote
Transport
Impl
Main
32Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Etch Architecture
Stub
Remote
Transport
Impl
Main
Stub
Remote
Transport
Impl
Main
33Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Etch Architecture
Stub
Remote
Transport
Impl
Main
Stub
Remote
Transport
Impl
Main
34Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Runtime
Message model
Compiler support
Transport
Utilities
35Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Message Model
Representation (type, fields & values)
Meta data
Generated code is transport independent
36Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Transport
URI specification
Manages session
Moves messages
Message format is generic or transport specific(binary, xml, soap, …)
37Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Transport, part 2
Transport services and propertiesAuthentication, session, logging, rate control, filtering
ProtocolsNow: TCP, TLS
Planned: JSON, UDP, AES, SOAP
ExtensibleJMS, REST, …
38Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Transport, part 3
ValueFactory
StubRemote
Messagizer
Mailbox Manager
Packetizer
Stream
Security
Filter Chainauth
log
session
keep alive
39Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
More Demos
Distributed Map
40Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Distributed Map Demo
Provides access to a shared Map
Add notification when values change
Example of session management
41Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Roadmap
JSON, Python, C, Ruby bindings
More transports and transport modes
Web Services Gateway
Better Integration with IDEs, Maven
42Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Etch will be Open Source!!!is
43Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Where from here?
Distribution:
http://developer.cisco.com/web/cuae/etch
Source
https://etchproj.svn.sourceforge.net
44Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
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.
45Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public
Q and A
46Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public