Fundamental Paradigms for Java Developers: NoSQL and OSGI

29
Introduction to NOSQL Otávio Santana @otaviojava https://github.com/otavioj ava/ http://about.me/otaviojav a

description

With the amazingly rich Java ecosystem, Java developers have a load of frameworks and solutions to work from and to incorporate in their projects. Learn more in this session. How work Cassandra with OSGI.

Transcript of Fundamental Paradigms for Java Developers: NoSQL and OSGI

Page 1: Fundamental Paradigms for Java Developers: NoSQL and OSGI

Introduction to NOSQL

Otávio Santana@otaviojavahttps://github.com/otaviojava/http://about.me/otaviojava

Page 2: Fundamental Paradigms for Java Developers: NoSQL and OSGI

Agenda

CassandraArchitectureHierarchyModelingExample (Spring and Weld CDI)

Page 3: Fundamental Paradigms for Java Developers: NoSQL and OSGI

NOSQL

Not only SQLKnow your problem first

Page 4: Fundamental Paradigms for Java Developers: NoSQL and OSGI

SQL vs NOSQL•Driver•SQL ANSI• Transactions• High cost of IO• Easy change data base• Relationship

• API• No standarization• No transactions• Find by key• Woring change data base• No relationship

Page 5: Fundamental Paradigms for Java Developers: NoSQL and OSGI

Classification

Architecture StorageOrganization

Key-ValueDocumentGraphColumn Family

Page 6: Fundamental Paradigms for Java Developers: NoSQL and OSGI

CassandraDistributedConfigurableColumns Family

Page 7: Fundamental Paradigms for Java Developers: NoSQL and OSGI

CassandraGossipConsistency Levelwrite and read

ANYONELOCAL_QUORUMEACH_QOURUMALL

Availability

Consistency

Page 8: Fundamental Paradigms for Java Developers: NoSQL and OSGI

Modeling

AnnotationJPA 2.0

Page 9: Fundamental Paradigms for Java Developers: NoSQL and OSGI

Spring

Configuration xml or java Code

Page 10: Fundamental Paradigms for Java Developers: NoSQL and OSGI

Spring Data- Cassandra

Cassandra

Page 11: Fundamental Paradigms for Java Developers: NoSQL and OSGI

Spring Data- Cassandra

Cassandra

Page 12: Fundamental Paradigms for Java Developers: NoSQL and OSGI
Page 13: Fundamental Paradigms for Java Developers: NoSQL and OSGI

PersistenceSimpleImpl@Produces@Inject…

JSR 299

Page 14: Fundamental Paradigms for Java Developers: NoSQL and OSGI

Thank you

Otávio Santana@otaviojavahttps://github.com/otaviojava/http://about.me/otaviojava

Page 15: Fundamental Paradigms for Java Developers: NoSQL and OSGI
Page 16: Fundamental Paradigms for Java Developers: NoSQL and OSGI

#SouJava

Thomas Modeneis@thomasmodeneis

Page 17: Fundamental Paradigms for Java Developers: NoSQL and OSGI

Table of contents

• OSGI– Benefits• Developers

• BusinessReduce, Reuse, Easy Deployment, Dynamic, Adaptive, Fast, Secure.

– Architecture• Layering, Modules, Services, Implementations.

– Conclusion– Demo– Questions ?

Page 18: Fundamental Paradigms for Java Developers: NoSQL and OSGI

Benefits For the Developers

– OSGi reduces complexity.

– Provides a modular architecture

– Reduces development and maintenance expenses

– Realizes the promise of Component-based systems

Page 19: Fundamental Paradigms for Java Developers: NoSQL and OSGI

Benefits For the Business

• Reduces operational costs.

• Integrates multiple devices in a networked environment.

• Enables:

–Tackling costly application development

–Maintenance

–Remote service management

Page 20: Fundamental Paradigms for Java Developers: NoSQL and OSGI

Reduce, Reuse, Easy Deployment, Dynamic, Adaptive, Fast, Widely Used.

– Reduce• Bundles hide their internals Reducing defects and Simplifying the

development

– Reuse• Makes it very easy to use third party components

• An increasing number of projects providing JARs for OSGi

– Easy Deployment• OSGi installation and Management can be as simple as

– Command shell or –  A CLOUD interface like Amazon's EC2

Page 21: Fundamental Paradigms for Java Developers: NoSQL and OSGI

Reduce, Reuse, Easy Deployment, Dynamic, Adaptive, Fast, Widely Used.

Dynamic• Dynamic Model, Developers do not believe this can

be done.

• However, after some time, they realize it actually works

Adaptive• Registry is a dynamic, Service model allows bundles

to find out what capabilities are available

Small The OSGi R.4 Framework can be implemented in

about a 300KB

Fast• Linear list, pre-wires bundles, Each bundle knows

exactly which bundle provides the class

• Significant speed up factor at start up

Page 22: Fundamental Paradigms for Java Developers: NoSQL and OSGI

Reduce, Reuse, Easy Deployment, Dynamic, Adaptive, Fast, Widely Used.

Extensively used in many industries

Automotive, Mobile Telephon,

Industrial Automation ,

Eclipse Environment,

Spring Framework,

Foundation of IBM Websphere,

Oracle (formerly BEA) Weblogic,

Sun's GlassFish,

Redhat's JBoss

Page 23: Fundamental Paradigms for Java Developers: NoSQL and OSGI

Architecture

Page 24: Fundamental Paradigms for Java Developers: NoSQL and OSGI

ConclusionThough components have been on the horizon for long time.

– But so far, they failed to make good on their promises

– OSGi is the first technology that succeed with a component system that really is solving real problems in software development.

• The key reason OSGi technology is successful ?

– It provides very mature component system that actually works

– Code is easier to write, test and reuse is increased.

– Defects are detected earlier

– Is testified by the wide adoption and use in popular apps like Eclipse and Spring.

Page 25: Fundamental Paradigms for Java Developers: NoSQL and OSGI

Demo

• Apache CXF – (SOAP, XML/HTTP, RESTful HTTP, or

CORBA)

• Apache Karaf –Lightweight OSGI container

• Speaker Service Hello World Karaf & CXF

Page 26: Fundamental Paradigms for Java Developers: NoSQL and OSGI

Questions … ?

Page 27: Fundamental Paradigms for Java Developers: NoSQL and OSGI

References

• The Javadoc of the OSGi API

• The specification PDF

• OSGi in different industries and markets

• How to Get Started with OSGi

• Other Links

Page 28: Fundamental Paradigms for Java Developers: NoSQL and OSGI

Links

@soujava

https://www.facebook.com/soujava

http://goo.gl/unH3z

Page 29: Fundamental Paradigms for Java Developers: NoSQL and OSGI

Thank you#soujava

Thomas R Modeneis@thomasmodeneis