15
Better answers NonStop SQL/MX NonStop SQL/MX Transactional Transactional Queuing and Queuing and Publish/Subscriber Publish/Subscriber Services Services Johannes Klein Johannes Klein Robbert Van der Linden Robbert Van der Linden

Better answers NonStop SQL/MX Transactional Queuing and Publish/Subscriber Services Johannes Klein Robbert Van der Linden

Embed Size (px)

Citation preview

Page 1: Better answers NonStop SQL/MX Transactional Queuing and Publish/Subscriber Services Johannes Klein Robbert Van der Linden

Better answers

NonStop SQL/MXNonStop SQL/MXTransactional Queuing and Transactional Queuing and Publish/Subscriber ServicesPublish/Subscriber Services

Johannes KleinJohannes Klein

Robbert Van der LindenRobbert Van der Linden

Page 2: Better answers NonStop SQL/MX Transactional Queuing and Publish/Subscriber Services Johannes Klein Robbert Van der Linden

2Presentation nameBetter answers

E-commerce and globalization forces businesses E-commerce and globalization forces businesses to automate back office procedures to sustain to automate back office procedures to sustain rapid growth and react in real-timerapid growth and react in real-time

Business processes often consist of up to 100 IT Business processes often consist of up to 100 IT transactiontransaction

Current back-office infrastructures and messaging Current back-office infrastructures and messaging subsystem are not prepared for the dramatic subsystem are not prepared for the dramatic increase in back-office transactions increase in back-office transactions

Back Office AutomationBack Office Automation

Page 3: Better answers NonStop SQL/MX Transactional Queuing and Publish/Subscriber Services Johannes Klein Robbert Van der Linden

3Presentation nameBetter answers

The Zero Latency EngineThe Zero Latency EngineApplApplApplAppl

Adapters

ApplApplApplApplApplApplApplAppl TransactionProcessing

Monitors

DistributedObject

Manager

DatabaseGateways

MessageTransport

Service

Adapters

Ada

pter

s

Ada

pter

s

ApplApplApplAppl

WorkflowEngine

Page 4: Better answers NonStop SQL/MX Transactional Queuing and Publish/Subscriber Services Johannes Klein Robbert Van der Linden

4Presentation nameBetter answers

Delivering on ZLEDelivering on ZLE

The Zero Latency Enterprise removesknowledge and processing latencies. At the heart of the Zero Latency Enterpriseis an active database with up-to-date data and up-to-date information on scheduling business processes.

Page 5: Better answers NonStop SQL/MX Transactional Queuing and Publish/Subscriber Services Johannes Klein Robbert Van der Linden

5Presentation nameBetter answers

Active relational database Active relational database

High-performance relational queuing and High-performance relational queuing and publish/subscribe servicespublish/subscribe services

High-performance trigger services (second release)High-performance trigger services (second release) Tightly integrated into NonStop SQL/MX databaseTightly integrated into NonStop SQL/MX database High availability through process pair technologyHigh availability through process pair technology Scalability via partitioning and load balancingScalability via partitioning and load balancing Common transaction managementCommon transaction management Common audit trail and recovery managementCommon audit trail and recovery management

Page 6: Better answers NonStop SQL/MX Transactional Queuing and Publish/Subscriber Services Johannes Klein Robbert Van der Linden

6Presentation nameBetter answers

Publish/SubscribePublish/Subscribe

Producers ConsumersChannel

publish subscribe

select * from stream(channel);insert into channel values(…);

Page 7: Better answers NonStop SQL/MX Transactional Queuing and Publish/Subscriber Services Johannes Klein Robbert Van der Linden

7Presentation nameBetter answers

QueuingQueuing

Producers ConsumersQueue

dequeueenqueueselect * from ( delete from stream(queue)) as queue;

insert into queue values(…);

Page 8: Better answers NonStop SQL/MX Transactional Queuing and Publish/Subscriber Services Johannes Klein Robbert Van der Linden

8Presentation nameBetter answers

Scalable Queuing ServicesScalable Queuing Services

Partitioned transactional queues Partitioned transactional queues data dependent routing data dependent routing load balancingload balancing online re-partitioningonline re-partitioning

Set-oriented queue access Set-oriented queue access mini-batch processing mini-batch processing hot spot avoidancehot spot avoidance

Integrated database and transaction supportIntegrated database and transaction support pre-fetch of operational datapre-fetch of operational data remove two-phase commit overhead remove two-phase commit overhead

Page 9: Better answers NonStop SQL/MX Transactional Queuing and Publish/Subscriber Services Johannes Klein Robbert Van der Linden

9Presentation nameBetter answers

Scalable Queuing ServicesScalable Queuing Services

Clients Queue Server Classes

Partition A

Partition C

Partition B

Operational Data

Enqueues routed by range or hash partitioning function

Server class per partitiondequeues and processes

requests

Dequeue, update of operational data, enqueue of reply is done in

single local transaction

Page 10: Better answers NonStop SQL/MX Transactional Queuing and Publish/Subscriber Services Johannes Klein Robbert Van der Linden

10Presentation nameBetter answers

Core ConceptsCore Concepts

Stream access modeStream access mode stream access to subscribe and wait for qualifying stream access to subscribe and wait for qualifying

tuples to appear in SQL tabletuples to appear in SQL table Skip conflict access modeSkip conflict access mode

skip conflict to skip tuples locked by concurrent skip conflict to skip tuples locked by concurrent transactions in conflicting modetransactions in conflicting mode

Embedded update and deleteEmbedded update and delete embedded delete and update to read and at the embedded delete and update to read and at the

same time delete or update tuplessame time delete or update tuples

Page 11: Better answers NonStop SQL/MX Transactional Queuing and Publish/Subscriber Services Johannes Klein Robbert Van der Linden

11Presentation nameBetter answers

SQL/MX Queuing ExampleSQL/MX Queuing Example

------- create table to capture orderscreate table orders (customerno int, itemno int, … );

-- dequeue orders and retrieve associated customer recordsselect * from (delete from stream(orders)) as orders left join customer on orders.customerno = customer.customerno;

Page 12: Better answers NonStop SQL/MX Transactional Queuing and Publish/Subscriber Services Johannes Klein Robbert Van der Linden

12Presentation nameBetter answers

SQL/MX View ExampleSQL/MX View Example

--- define view for dequeuingcreate view ready_tasks as select * from (update stream(tasks) set state = ‘closed’ where state = ‘open’) as tasks, workflow where workflow.wfid = task.wfid;

--- dequeue entriesselect * from ready_tasks for skip conflict access;

Page 13: Better answers NonStop SQL/MX Transactional Queuing and Publish/Subscriber Services Johannes Klein Robbert Van der Linden

13Presentation nameBetter answers

Application InterfacesApplication Interfaces

SQL/MX queuing and publish/subcribe SQL/MX queuing and publish/subcribe services are accessible via embedded SQL services are accessible via embedded SQL and ODBCand ODBC

Queuing and publish/subscribe services are Queuing and publish/subscribe services are accessible from NonStop DOM, NonStop accessible from NonStop DOM, NonStop Tuxedo, iTP WebServer and Pathway Tuxedo, iTP WebServer and Pathway

XML support and HTTP integrationXML support and HTTP integration

Page 14: Better answers NonStop SQL/MX Transactional Queuing and Publish/Subscriber Services Johannes Klein Robbert Van der Linden

14Presentation nameBetter answers

SQL/MX Queuing FeaturesSQL/MX Queuing Features STREAMS STREAMS EMBEDDED DELETES AND UPDATESEMBEDDED DELETES AND UPDATES SKIP CONFLICTSKIP CONFLICT PARTITIONED TABLESPARTITIONED TABLES SET ON ROLLBACKSET ON ROLLBACK ROWSETSROWSETS HOLDABLE CURSORSHOLDABLE CURSORS VIEW SUPPORTVIEW SUPPORT ORDER BY / INDEXESORDER BY / INDEXES

Page 15: Better answers NonStop SQL/MX Transactional Queuing and Publish/Subscriber Services Johannes Klein Robbert Van der Linden

15Presentation nameBetter answers

Questions Questions

Mailto:[email protected]