»Œ ¾¼¾´µ¼Œ½¸¹....

download »Œ ¾¼¾´µ¼Œ½¸¹. ¾»Œ·¾²°½¸µ ¾‡µ€µ´µ¹ °¸½…€¾½½‹…

of 35

  • date post

    18-May-2015
  • Category

    Documents

  • view

    301
  • download

    7

Embed Size (px)

description

Доклад на PGDay в рамках конференции Highload

Transcript of »Œ ¾¼¾´µ¼Œ½¸¹....

  • 1. PostgreSQL ik@PostgreSQL-ConsulLng.com

2. 2 3. vs , 4. Message Channel RouLng Filters Durability4 5. SOA 5 6. : : Concurrency 6 7. : : Concurrency 7 8. : : Concurrency , - . 8 9. 9 10. ? ACID, , 10 11. commit , Coordinator slave (slaves) 1PC, 2PC, PA, PC, 3PC (Skeen, Stonebracker, Gray, Ozsu, Mohan ...)11 12. 2PC 12 13. 2PCFigure 8.9 Two-phase commit protocol example.[Rahimi, Haug]331 13 14. 2PC : 2PC TerminaLon protocol 2PC Recovery protocol slave (>=1) - OK, coordinator slave - OK [Skeen&Stonebraker] 14 15. JMS (IBM WebSphere MQ, Oracle AQ, Tibco EMS, Oracle Open ESB etc.) ? EJB15 16. Oracle + Advanced Q IBM DB2 + IBM WebSphere MQ PostgreSQL + PgQ?16 17. PostgreSQL Postgres v.v. < 9.2 < 24 fsync Postgres !17 18. PgQ Python Ticker Event log table 18 19. PgQ Python Ticker Event log table : SQL PostgreSQL !19 20. PgQ Python Ticker Event log table Londiste ?;-) 20 21. mbus hp://code.google.com/p/mbus/ v 1.1 stable PostgreSQL extension depends on hstore only21 22. mbus=# create extension hstore;=# create extension mbus; v1.1 by default, Postgres 9.2=# create extension mbus version 1.0; specify version for Postgres 9.1 or 9.0 22 23. mbus hstore headers hstore payload paterns: queue publish/subscribe request/responce selectors delivery expiraLon/delivery delay23 24. mbusqueuembus.create_queue(qname, ncons) 24 25. mbusqueuembus.create_queue(qname, ncons)consumers_cnt , 2 128-256 - , - 25 26. mbus queuembus.post_(data hstore,headers hstore DEFAULT NULL::hstore,properties hstore DEFAULTNULL::hstore,delayed_until timestamp DEFAULT NULL,expires timestamp DEFAULT NULL) iid 26 27. mbusqueuembus.consume(qname) 27 28. mbus queuembus.consume(qname)Resultset :CREATE TABLE qt_model (id integer NOT NULL,added timestamp without time zone NOT NULL,iid text NOT NULL,delayed_until timestamp without time zone NOT NULL,expires timestamp without time zone,received integer[],headers hstore,properties hstore,data hstore); 28 29. mbus publish/subscribembus.create_consumer(qname, cname, selector) 29 30. mbus publish/subscribembus.create_consumer(qname, cname, selector) durable 30 31. mbus publish/subscribembus.create_consumer(qname, cname, selector) :$$(t.properxes->STATE)=DONE$$, 31 32. mbus publish/subscribembus.consume(qname, cname)mbus.consume__by_()mbus.consumen__by_(amt integer)32 33. mbus security mbus.control superuser = true relocatable = false schema = mbus mbus.create_view(qname, [cname, vname]) grant33 34. mbus roadmap 2PC JMS- 34 35. Gerhard Weikum, Gottfried Vossen - TransactionalInformation Systems: Theory, Algorithms, and thePractice of Concurrency Control and Recovery Saeed K. Rahimi, Frank S. Haug - Distributed DatabaseManagement Systems: A Practical Approach Gregor Hohpe, Bobby Wolf - Enterprise IntegrationPatterns35