Hybrid Constraint Solving in ECLiPSe: Framework and Applications
Eclipse Communications Framework · 9 ECF | Eclipse Communications Framework ... Communications UI...
Transcript of Eclipse Communications Framework · 9 ECF | Eclipse Communications Framework ... Communications UI...
© 2005 by Scott Lewis; made available under the EPL v1.0 | 2/25/05 |
Eclipse Communications Frameworkhttp://www.eclipse.org/ecf
John BeattyKen GilmerScott LewisPete MackiePeter NehrerMary RuddyRhett SavagePaul Trevithick
2 ECF | Eclipse Communications Framework | © 2005 by Scott Lewis; made available under the EPL v1.0
Eclipse ArchitectureEcosystem
Tools Platform
Frameworks
Java Dev Tools C/C++ Dev Tools
Modeling Frameworks
Graphical Frameworks
Business Intelligence & Reporting
Test and Performance
Web Tools
Project Model
Rich Client PlatformRuntime(OSGi)
Generic Workbench Update
3 ECF | Eclipse Communications Framework | © 2005 by Scott Lewis; made available under the EPL v1.0
ECF Containers
Java Dev Tools
C/C++ Dev Tools
Modeling Frameworks
Graphical Frameworks
Business Intelligence & Reporting
Test and Performance
Web Tools
Ecosystem
Runtime(OSGi)
Generic Workbench Update
Project Model
Native
XMPP
JMS
SIP
ECF Containers
...
Network Providers
SO
SO
SO
SO
ECF Containers
SO
ECF Network
Providers
4 ECF | Eclipse Communications Framework | © 2005 by Scott Lewis; made available under the EPL v1.0
Why Another Framework/Abstraction Layer?
Answer: Communications InteroperabilityGoals
Isolate protocols from component and/or application codeIntroduce 'lightweight container' No client-server assumption...assume only dynamically changing 'group of peers'Peers all potentially contribute state (and code) to distributed app – via shared objectsConsistent session, messaging, and reliability semantics
Eclipse-based clients that use multiple-protocols-per-app
Try to make (reliable) distributed applications development mucheasier
5 ECF | Eclipse Communications Framework | © 2005 by Scott Lewis; made available under the EPL v1.0
How: A higher-level comm APISimple/Minimal/Small (< 100K for core interfaces/classes)
Join/Leave/Group membership info...that's it!Open Implementations
Anyone can implement a provider as extension
Existing protocols can be implemented open source or not Runtime Extensible
Adapters
6 ECF | Eclipse Communications Framework | © 2005 by Scott Lewis; made available under the EPL v1.0
Container-Provided ServicesGroup Join/Leave
joinGroup(), leaveGroup()Group Membership/Failure Detection
getGroupMemberIDs(), getGroupID()
Critical for reliabilityLifecycle and context for SharedObjects
createSharedObject(), addSharedObject(), removeSharedObject()
Event NotificationaddListener/removeListener
Asynch events: ISharedObject.handleEvent(Event)
7 ECF | Eclipse Communications Framework | © 2005 by Scott Lewis; made available under the EPL v1.0
Example Client Code// Create container instance via named providerISharedObjectContainer container = SharedObjectContainerFactory.makeSharedObjectContainer(“org.eclipse.ecf.provider.generic.Client”);
// Create service idID groupID = IDFactory.makeStringID(“ecftcp://composent.com:3282/server”);
// Connectcontainer.joinGroup(groupID,null);
// Create/add ISharedObjectISharedObject sharedObject = new HelloSharedObject();
container.getSharedObjectManager().addSharedObject(IDFactory.makeGUID(), sharedObject, new Properties(),null);// shared object component communicates here
// Disconnect/Disposecontainer.dispose(0);
8 ECF | Eclipse Communications Framework | © 2005 by Scott Lewis; made available under the EPL v1.0
Shared Objectpublic class HelloSharedObject implements ISharedObject {
ISharedObjectConfig config = null;
public void init(ISharedObjectConfig config) throws SharedObjectInitException {this.config = config;
}
public void handleEvents(Event event) {
// Handle all container-provided events here!System.out.println(“got event: “+event);
// Send message to all in groupISharedObjectContext context =
config.getContext().sendMessage(null,”hello world”);}
public void dispose(ID container) { config = null; }}
9 ECF | Eclipse Communications Framework | © 2005 by Scott Lewis; made available under the EPL v1.0
ECF Providers
Implement ECF core Extension Points: containerFactory, namespaceImplemented so far: ECF Generic, XMPP/JabberPlanned: SIP, JMS, JXTA, JGroups, Bitorrent, ...Can support both open and proprietary network protocols (legacy and new)Appeal
1st choice: Consider implementing your favorite provider and contributing to ECF2nd choice: Ask us to do it for you
10 ECF | Eclipse Communications Framework | © 2005 by Scott Lewis; made available under the EPL v1.0
Provider Implementation// In your plugin.xml
<extensionpoint="org.eclipse.ecf.containerFactory">
<containerFactoryclass="com.myco.MyContainerInstantiator" name=”generic”>
</containerFactory></extension>
public class MyContainerInstantiator implements ISharedObjectContainerInstantiator {
public ISharedObjectContainer makeInstance(SharedObjectContainerDescription description,
Class[] argTypes,Object[] args)
throws SharedObjectContainerInstantiationException {
// Make new container instance here of appropriate typereturn new FrobozSharedObjectContainer();
}}
SharedObjectContainerFactory.makeSharedObjectContainer(“generic”)
11 ECF | Eclipse Communications Framework | © 2005 by Scott Lewis; made available under the EPL v1.0
Applications: Human-Human Communication
File SharingIM/ChatApp SharingVOIPConferencingDrawing/WhiteboardMulti-Player Games??
12 ECF | Eclipse Communications Framework | © 2005 by Scott Lewis; made available under the EPL v1.0
Tool Communication (plugin-to-plugin)
GraphShare: Shared Model EditingShared Debuggers/SimulationWorkflowCollaborative Content Creation/Mgmt??
13 ECF | Eclipse Communications Framework | © 2005 by Scott Lewis; made available under the EPL v1.0
Existing Codebase: Core Plugins
org.eclipse.ecfFramework interfaces, factories, and exception classes
org.eclipse.ecf.providerECF provider interfaces and classes
Runtime Requirements: JRE 1.4+, OSGI 3.0 only
14 ECF | Eclipse Communications Framework | © 2005 by Scott Lewis; made available under the EPL v1.0
Other Infrastructure Plugins
org.eclipse.ecf.sdoGraph share framework – talk about this shortly
org.eclipse.ecf.uiCommunications UI code: e.g. Abstract 'Buddy List View'
org.eclipse.ecf.docEclipse help docs: API docs, overview docs, etc
15 ECF | Eclipse Communications Framework | © 2005 by Scott Lewis; made available under the EPL v1.0
Example App Pluginsorg.eclipse.ecf.example.collab
Real-time collaboration application (url sharing, file sharing, chat, etc)
org.eclipse.ecf.example.sdo.editorGraph share example application
Coming (very) soonJabber Provider: org.eclipse.ecf.provider.xmppApps
Shared Editor for Team Outlining (SETO)(Distributed) Team Project Planning Tool
16 ECF | Eclipse Communications Framework | © 2005 by Scott Lewis; made available under the EPL v1.0
What is GraphShare?
Replicating graph data structuresSDO Data Graphs (using EMF ref impl)Serialized Form is XMLParticipants distribute and then receive updates, apply changes to local replicationFramework supports extension/customization of
Replication algorithm – when and whereChange propagation -- whenConflict resolution – how to resolveAdding extension points to org.eclipse.ecf.sdo right now
17 ECF | Eclipse Communications Framework | © 2005 by Scott Lewis; made available under the EPL v1.0
Default Graph Share Implementation
Updates optimistically – any participant may commit at any timeUpdates must be received in sequence
Otherwise, all subsequent updates to the replica fail
Clients handle this (e.g., re-subscribe)New group members are initialized arbitrarily
All members send their Data Graph copy
The first one received is acceptedNo server/coordinator required
18 ECF | Eclipse Communications Framework | © 2005 by Scott Lewis; made available under the EPL v1.0
Default Update Provider
EMFUpdateProviderUses EMF-SDO API to
Extract local changesSerializeDeserialize on other endApply to remote replicas
Reverses local changes when applying remote updates (this may be configurable in the future)
19 ECF | Eclipse Communications Framework | © 2005 by Scott Lewis; made available under the EPL v1.0
Example: Shared Model Editing
Extended SDOEditorSupports editing of arbitrary EMF models with SDO supportWhen saving, broadcasts changes to group membersRemote updates immediately savedShared models are identified by their workspace-relative path
20 ECF | Eclipse Communications Framework | © 2005 by Scott Lewis; made available under the EPL v1.0
FutureRespond to Community FeedbackMore Providers: JMS, JXTA, Jgroups, SIP, your favoriteMore Applications: GEF Graph Share, VOIP, yourfavoriteIntegration with RCP appsIntegration with Eclipse Trust FrameworkMore/Better Libraries for Protocol Patterns
e.g. Both optimistic and pessimistic protocols...e.g. transactions
Replicated Data Structures (e.g distributed hashtable)Layered APIs for user presence, other comm/collab componentryDynamic Lookup and Discovery (?)Others Requests (?)
© 2005 by Scott Lewis; made available under the EPL v1.0 | 2/25/05 |
Consider Participating!!
Special Thanks
Feedback from you on Desired DirectionsBuild Communications Components (shared objects) and Apps
– License them if you want to!Implement Containers/ProvidersContact: http://www.eclipse.org/ecf newsgroup, OR
[email protected], [email protected]
Eclipse Foundation: Mike M, Bjorn FB, Brian B, John WOTBC: Open Technology Business CenterIBM Jazz Team: Li-Te Cheng, John PattersonAll Team Members: They are doing on own dime/timeThanks to All Families