Upload
kuldip-jadeja
View
222
Download
0
Embed Size (px)
Citation preview
8/8/2019 ETCH CO. PPT
1/46
1Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Introduction to Etch
Scott Comer
Technical Leader
8/8/2019 ETCH CO. PPT
2/46
2Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Welcome
Introduction to Etch
what it is
how to use it to build a network service
where it is going
8/8/2019 ETCH CO. PPT
3/46
3Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
What is a network service?
Messages and formats
Action: query or control; Event
Definitions / abstractions / rules
Players / authorization / transports
8/8/2019 ETCH CO. PPT
4/46
4Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
What is Etch?
Network service description language
Compiler
Runtime
8/8/2019 ETCH CO. PPT
5/46
5Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Why Etch?
Language independence
Transport independence
Small and quick high performance
Symmetric
8/8/2019 ETCH CO. PPT
6/46
6Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Relationship to Cisco Unified ApplicationEnvironment
Application environment is a federation of services
Formalized APIs
Programmable and extensible
Enhances the Developer Experience
8/8/2019 ETCH CO. PPT
7/46
7Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Demos
Hello World
8/8/2019 ETCH CO. PPT
8/46
8Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
HelloWorld Example Overview
8/8/2019 ETCH CO. PPT
9/46
9Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
HelloWorld 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
8/8/2019 ETCH CO. PPT
10/46
10Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Sequence Diagram
Client Listener Server
Listen
8/8/2019 ETCH CO. PPT
11/46
11Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Sequence Diagram
Client Listener Server
Connect
Listen
8/8/2019 ETCH CO. PPT
12/46
12Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Sequence Diagram
Client Listener Server
Create ServerSession
Connect
Listen
8/8/2019 ETCH CO. PPT
13/46
13Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Sequence Diagram
Client Listener Server
Create ServerSession
Connect
Listen
Sends Hello
To Server
8/8/2019 ETCH CO. PPT
14/46
14Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Sequence Diagram
Client Listener Server
Create ServerSession
Disconnect
Connect
Listen
Sends HelloTo Server
8/8/2019 ETCH CO. PPT
15/46
15Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
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 / serverapplication.
8/8/2019 ETCH CO. PPT
16/46
16Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
HelloWorld Java Demo
Show using Etch in Eclipse
Start with existing demo
Add client callback
8/8/2019 ETCH CO. PPT
17/46
17Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Summary Hello World Demo
Java has similar experience to C#
Message sending looks just like procedure calls
Generated codes may be easily integrated
8/8/2019 ETCH CO. PPT
18/46
18Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Etch Language
8/8/2019 ETCH CO. PPT
19/46
19Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
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
8/8/2019 ETCH CO. PPT
20/46
20Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Etch Language, part 2
Constants
const int ZERO = 0
Enumerations
enum PrimaryColor ( RED, GREEN, BLUE )
Exceptions
exception LoginFailed( int code, string msg )
8/8/2019 ETCH CO. PPT
21/46
21Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Etch Language, part 3
Attributes
@Direction( which ) server, client, both
@Oneway
@Timeout( millis )
@Authorize( method, args )
8/8/2019 ETCH CO. PPT
22/46
22Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
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 )
8/8/2019 ETCH CO. PPT
23/46
23Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Etch Language, part 5
Mixins
service Foo
{
mixin Barmixin Baz
}
8/8/2019 ETCH CO. PPT
24/46
24Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
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 )
}
8/8/2019 ETCH CO. PPT
25/46
25Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Nitty Gritty Details
Compiler, architecture
8/8/2019 ETCH CO. PPT
26/46
26Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Etch Compiler
Written in Java (runs anywhere)
Uses Templates (easier to port)
Bindings (java, csharp, )
8/8/2019 ETCH CO. PPT
27/46
27Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Etch Process
Etch Source EtchCompiler
Interface
StubRemote
ValueFactory
Helper
Base
Main Impl
8/8/2019 ETCH CO. PPT
28/46
28Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Etch Inheritance
Interface
Remote Base
Impl
8/8/2019 ETCH CO. PPT
29/46
29Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Etch Architecture
Stub
Remote
Transport
Impl
Main
Stub
RemoteTransport
Impl
Main
8/8/2019 ETCH CO. PPT
30/46
30Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Etch Architecture
Stub
Remote
Transport
Impl
Main
Stub
RemoteTransport
Impl
Main
8/8/2019 ETCH CO. PPT
31/46
31Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Etch Architecture
Stub
Remote
Transport
Impl
Main
Stub
RemoteTransport
Impl
Main
8/8/2019 ETCH CO. PPT
32/46
32Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Etch Architecture
Stub
Remote
Transport
Impl
Main
Stub
RemoteTransport
Impl
Main
8/8/2019 ETCH CO. PPT
33/46
33Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Etch Architecture
Stub
Remote
Transport
Impl
Main
Stub
RemoteTransport
Impl
Main
8/8/2019 ETCH CO. PPT
34/46
34Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Runtime
Message model
Compiler support
Transport
Utilities
8/8/2019 ETCH CO. PPT
35/46
35Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
MessageModel
Representation (type, fields & values)
Meta data
Generated code is transport independent
8/8/2019 ETCH CO. PPT
36/46
36Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Transport
URI specification
Manages session
Moves messages
Message format is generic or transport specific
(binary, xml, soap, )
8/8/2019 ETCH CO. PPT
37/46
37Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Transport, part 2
Transport services and properties
Authentication, session, logging, rate control, filtering
ProtocolsNow: TCP, TLS
Planned: JSON, UDP, AES, SOAP
Extensible
JMS, REST,
8/8/2019 ETCH CO. PPT
38/46
38Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Transport, part 3
ValueFactory
StubRemote
Messagizer
Mailbox
Manager
Packetizer
Stream
Security
Filter Chain
auth
log
session
keep alive
8/8/2019 ETCH CO. PPT
39/46
39Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
More Demos
DistributedMap
8/8/2019 ETCH CO. PPT
40/46
40Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Distributed Map Demo
Provides access to a shared Map
Add notification when values change
Example of session management
8/8/2019 ETCH CO. PPT
41/46
41Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Roadmap
JSON, Python, C, Ruby bindings
More transports and transport modes
Web Services Gateway
Better Integration with IDEs, Maven
8/8/2019 ETCH CO. PPT
42/46
42Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Etch will be Open Source!!!
is
8/8/2019 ETCH CO. PPT
43/46
43Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Where from here?
Distribution:
http://developer.cisco.com/web/cuae/etch
Source
https://etchproj.svn.sourceforge.net
8/8/2019 ETCH CO. PPT
44/46
44Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Summary
Etch is a powerful tool that formalizes APIs used toaccess and extend Cisco Unified ApplicationEnvironment
Etch automates many tedious and distracting tasks
Etch may be used in your own projects, and embedded
in your own systems.
8/8/2019 ETCH CO. PPT
45/46
45Cisco Uni fied App licat ion Env ironment Developers Conference 2008 2008 Cisco Systems, Inc. A ll rights reserved. Cisco Publ ic
Q and A
8/8/2019 ETCH CO. PPT
46/46