riena project - eclipsecon europe 2019 · riena project christian campo, eclipsecon 2008, march 17,...
TRANSCRIPT
© 2002 IBM Corporation
Confidential | Date | Other Information, if necessaryMarch 25, 2008 Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
1
Riena Project
Christian Campo, EclipseCon 2008,
March 17, 2008
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0 2
Distributed
Services
OSGI
UISecurity
Object Transactions
Persistence
Authentication
Authorization
Reporting
Where do we come from ?
Status
Software Update
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
Where do we come from ?
Smart Client project in the financial / insurance sector
more than 30.000 clients, distributed server environment
3 year project, more than 150 people
based on our commercial framework „spirit“
based upon open source components (log4J, axis, hessian,
hibernate, hivemind, commons-*, junit, httpunit, jfreechat,
jgoodies, nuvola, rhino ... and many more)
Service Oriented Architecture
3
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
Components in various Application Models
4
ServerClient
Rich
Web
Smart
GUI Logik Persistence
DB Connection
HTML ,Images,JScript
Web Services
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
Smart Client Cornerstones
highly integrated client / server application
homogenous programming model / platform
distributed components
remote services
rich user interface
integrated local applications (mail, office, pdf)
integrated client software update
5
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0 6
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
Components in Riena
based on OSGi Services
inject services
transparent access remote services (using proxies)
configurable services (using ConfigurationAdmin)
Riena provides default implementations
replace (remove the default)
override (using Service Ranking)
can be created using Declarative Services
7
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
Components
8
JVM
Equinox (OSGi)
Config
Admin
Log
ServicePackage
Admin
Http
Service
Equinox
Authent.
Service
Permission
CacheAuthorization
Service
Subject
Holder
Exception
HandlerConfig
PluginRiena
Customer
Search
Zipcode
LookupCustomer
Store
Application
A B C
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
Distributed Services I
9
JVM
Equinox (OSGi)
Package
Admin
JVM
Equinox (OSGi)
Log
Service
Config
AdminHttp
Service
Package
AdminLog
Service
Config
Admin
Equinox
Remote Service
Proxy
Remote Service
Endpoint
Authoriz.
ServicePermission
CacheAuthent.
Service
Authoriz.
Service
Authent.
Service
Permission
CacheRiena
Exception
Handler
ServerClient
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
Service Registration
10
HashTable <String,String> props= new HashTable<String,String>();
props.put(“riena.remote”, ”true”);
props.put(“riena.remote.protocol”, “hessian”);
props.put(“riena.remote.path”, “/AuthorizationService”);
context.registerService(IAuthorizationService.class.getName(), new AuthServiceImpl(), props);
Server
Client
new RemoteServiceFactory()
.createProxyAndRegister(IAuthorizationService.class.getName(),
“http://172.15.26.56:8080/hessian/AuthorizationService”, “hessian”);
URLs can be configured at runtime through ConfigAdmin
using Notations like “http://${hostname}/hessian/AuthorizationService”
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
Distributed Services II
11
JVM
Equinox (OSGi)
Package
Admin
Authoriz.
Service
JVM
Equinox (OSGi)
Log
Service
Config
Admin
Permission
Cache
Http
Service
Authent.
ServicePackage
Admin
Authoriz.
Service
Log
Service
Authent.
ServiceConfig
Admin
Permission
Cache
Equinox
Riena
Exception
Handler
Customer
SearchZipcode
Lookup
Customer
Store
Customer
Search
Customer
Store
Application
ServerClient
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
Service Lookup - I
12
ref = context.getServiceReference(ICustomerSearch.class.getName());
if (ref != null) {
ICustomerSearch search = (ICustomerSearch) context.getService(ref);
if (search != null) {
search.findCustomer(“Bill”);
…
}
context.ungetService(ref);
}
classic
• context get for each service call
• multiple checks for null
• unget Service after use
• ServiceListener would be better, but requires even more code
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
Service Lookup - II
13
private ICustomerSearch search;
…
public void bind(ICustomerSearch search) { this.search = search; }
public void unbind(ICustomerSearch search) { this.search = null; }
//… init code
new ServiceId(ICustomerSearch.class.getName())
.injectInto(this)[.bind(“bind”).unbind(“unbind”)].andStart(context);
}
// later
if (search != null) {
search.findCustomer(“Bill”);
}
ServiceInjector
fires existing and
changing Services
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
Services – replace / overwrite
14
Permission
Cache
Authoriz.
Service
Replace
Permission
Store
My Perm
Store
Permission
Cache
Authoriz.
Service
Permission
Store
Overwrite (using Ranking)
RANK = -100
My
Cache
RANK = 0
Used when you always have your own. Used when the default is often good enough.
new ServiceId(IPermissionCache.class.getName()) .useRanking().injectInto(this).andStart(context);
context.getServiceReference(IPermissionCache.class.getName()) uses ranking already
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0 15
Distributed Architecture
Service oriented
Riena uses services in many places
Simple for application developers
Supports multiple protocols (Hessian, SOAP, ...)
Enable other components / Eclipse projects
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
Security – Distributed Aspect
JAAS based (now)
equinox.security based (later)
Uses standard java objects i.e. Principal, Subject, Permission,
PolicyProvider, LoginModule
Remote Services for Authentication/Authorization
Embed authentication/session information in remote service call
Easy access to current Subject (client / server)
Remote Services are executed in the context of the Subject
(“doAsPrivileged”)
16
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
Persistence – Distributed Aspect
Work with persistent objects on Riena client
No persistance framework on client
Track modifications in objects on the client
Send only modified properties to the server
Use ObjectTransaction
Only update modified values in database
EclipseLink, Hibernate
17
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
Reporting – Distributed Aspects
collect data on (server)
consolidate, aggregate, group, calculate (server)
render to output format (client)
incremental load of data (client / server)
BIRT
18
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
Software Update + more
Software Update
sync latest version to client to fit latest server version
mandatory software update
transfer deltas (diff actual client version to latest version)
userspecific software update
P2, Maynstall (already committer in P2 project)
External application integration (Office, PDF)
merge document support
show PDF
Monitoring of Client State
19
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0 20
one more thing …
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
UI – the IDE
21
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
UI – typical RCP apps
22
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
UI Vision
Eclipse IDE UI is great for developers
Developer != End User
Workbench Layout is very generic and flexible
too much for endusers
proposed changes
static layout
simplify navigation, different navigation tree
modulegroups and modules
no tabs for views (access views from navigation tree)
tabs to distinguish subapplications
new UI is default not mandatory !!!
23
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
UI – Vision Riena
24
Click
Click
Click
Click
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
UI – Vision Riena (another default)
25
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0
Status
Started in October 2007
Incubator, current version 1.0M1
We have:
Remote services
Security
Samples
JUnit Tests
Configuration
We are working:
ObjectTransaction
UI
26
Copyright © 2008 compeople AG, Made available under the Eclipse Public License v 1.0 28
Thank you