CUBRID Inside - Architecture, Source & Management Components
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

CUBRID Inside - Architecture, Source & Management Components

on

  • 3,329 views

This presentation explains in details the structure of CUBRID architecture, its components, modules, as well as source code structure....

This presentation explains in details the structure of CUBRID architecture, its components, modules, as well as source code structure.

Overall Structure
- Query Processing Component
- Transaction Management Component
- Server Storage Management Component
- Client Storage Management Component
- Object Management Component
- Job and Thread Management Component
- Client-Server Communication Layer
- Broker Component

Statistics

Views

Total Views
3,329
Views on SlideShare
1,931
Embed Views
1,398

Actions

Likes
0
Downloads
28
Comments
0

2 Embeds 1,398

http://www.cubrid.org 1094
http://blog.cubrid.org 304

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

CUBRID Inside - Architecture, Source & Management Components Presentation Transcript

  • 1. CUBRID InsideFirst Look Inside CUBRID
    Jan 18, 2009
  • 2. 저작권 Copyright Notice
    CREATIVE COMMONS 저작자표시-동일조건변경허락 2.0 대한민국
    이용자는 아래의 조건을 따르는 경우에 한하여 자유롭게
    이 저작물을 복제, 배포, 전송, 전시, 공연 및 방송할 수 있습니다.
    이차적 저작물을 작성할 수 있습니다.
    다음과 같은 조건을 따라야 합니다:
    저작자표시. 귀하는 원저작자를 표시하여야 합니다.
    What does "Attribute this work" mean? The page you came from contained embedded licensing metadata, including how the creator wishes to be attributed for re-use. You can use the HTML here to cite the work. Doing so will also include metadata on your page so that others can find the original work as well.
    동일조건변경허락. 귀하가 이 저작물을 개작, 변형 또는 가공했을 경우에는, 이 저작물과 동일한 이용허락조건하에서만 배포할 수 있습니다.
    귀하는, 이 저작물의 재이용이나 배포의 경우, 이 저작물에 적용된 이용허락조건을 명확하게 나타내어야 합니다.
    저작권자로부터 별도의 허가를 받으면 이러한 조건들은 적용되지 않습니다.
    Nothing in this license impairs or restricts the author's moral rights.
    CREATIVE COMMONS Attribution-Share Alike 2.0 Korea
    You are free:
    to Share — to copy, distribute and transmit the work
    to Remix — to adapt the work
    Under the following conditions:
    Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
    What does "Attribute this work" mean? The page you came from contained embedded licensing metadata, including how the creator wishes to be attributed for re-use. You can use the HTML here to cite the work. Doing so will also include metadata on your page so that others can find the original work as well.
    Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
    For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.
    Any of the above conditions can be waived if you get permission from the copyright holder.
    Nothing in this license impairs or restricts the author's moral rights.
    http://creativecommons.org/licenses/by-sa/2.0/kr/
    Copyright 2009 Search Solution Corporation. All Rights Reserved.
  • 3. CUBRID
  • 4. Contents
    System Architecture and Processes
    Design & Implementation Concepts
    Module and Source Structure
    In The Next CUBRID Inside
    4/
    41 First Look Inside CUBRID
  • 5.
    • What is CUBRID?
    • 6. System Architecture
    • 7. CUBRID Processes and IPC
    • 8. Query Processing Workflow
    System Architecture and Processes
    1
    5/
    41 First Look Inside CUBRID
  • 9. System Architecture and ProcessesWhat is CUBRID?
    CUBRID is
    Open Source DBMS owned and developed by NHN
    Hosted at nForge site
    Targeted to a database platform for Internet portal service
    Relational database system with object extensions – Object-Relational Model
    1,000,000 line of source code scaled project
    Engine – C/C++, CUBRID Manager (GUI) and JDBC driver – Java
    CUBRID provides
    Full-featured database server engine
    Server and Broker architecture
    GUI management and query tool
    CUBRID Manager
    Various API (JDBC, ODBC(OLE DB), PHP, and CCI)
    Python and Ruby as contributed projects
    1.1
    6/
    41 First Look Inside CUBRID
  • 10. System Architecture and ProcessesSystem Architecture
    1.2
    Server Subsystem
    Multi-threaded storage engine part which runs as DB server
    Consists of Transaction Manager, Object Manager, Lock Manager, Query Manager, Log Manager, and Storage Manager
    Client Subsystem
    Client library part providing native C API
    Consists of Query Parser & Optimizer, Object & Lock Cache, Transaction Manager and Object Manager
    Broker Subsystem
    Linked with client library and implemented CCI protocol
    Does job queuing, connection pooling, monitoring and logging
    Connectors
    JDBC driver
    CCI library
    Many drivers are implemented with CCI library – ODBC, OLEDB, PHP, Python, and Ruby
    7/
    41 First Look Inside CUBRID
  • 11. System Architecture and ProcessesSystem Architecture
    1.2
    CUBRID
    Manager
    GUI
    Interface
    PHP
    OLE DB
    Ruby
    CUBRID
    Manager
    JDBC
    ODBC
    CCI
    Python
    CM Server
    Job
    Queuing
    Monitoring
    Connection
    Pooling
    Logging
    Admin
    Utility
    Broker
    Create, Delete, Copy, Rename
    Query
    Parser &
    Optimizer
    Lock
    Cache
    Object
    Manager
    Transaction
    Manager
    Add Volume
    Load /
    Unload
    Backup /
    Restore
    Query
    Manager
    Lock
    Manager
    Server
    Compact /
    Optimize
    Storage
    Manager
    Log
    Manager
    Check /
    Diag
    Active
    Log
    File Based
    Objects
    Data
    Volume
    Index
    Volume
    Temp
    Volume
    Archive
    Log
    8/
    41 First Look Inside CUBRID
  • 12. 1.2
    CUBRID
    Manager
    GUI
    Interface
    PHP
    OLE DB
    Ruby
    CUBRID
    Manager
    JDBC
    ODBC
    CCI
    Python
    CM Server
    Create, Delete, Copy, Rename
    Job
    Queuing
    Monitoring
    Connection
    Pooling
    Logging
    Admin
    Utility
    Broker
    Client Library
    Add Volume
    Native C API
    Parser
    Object
    Manager
    Schema
    Manager
    Transaction
    Manager
    Load /
    Unload
    Query
    Transform
    Workspace Manager
    Backup /
    Restore
    Query
    Optimizer
    Memory Manager
    Compact /
    Optimize
    Plan
    Generation
    Check /
    Diag
    Communication Module
    Storage Engine
    Server
    Communication Module
    Transaction
    Manager
    Log
    Manager
    Lock
    Manager
    Query
    Manager
    Access
    Method
    B+Tree
    Module
    File Manager
    System
    Catalog Module
    System Architecture
    Buffer Manager
    Disk Manager
    Active
    Log
    File Based
    Objects
    Data
    Volume
    Index
    Volume
    Temp
    Volume
    Archive
    Log
    9/
    41 First Look Inside CUBRID
  • 13. System Architecture and ProcessesCUBRID Processes and IPC
    Master Process ‘cub_master’
    Daemon process listening on the TCP port for clients’ connection
    csql, broker, and admin utilities
    Registrar of server processes using Unix Domain Socket
    Server Process ‘cub_server’
    Multi-threaded process serving clients’ requests
    Has thread pool and job queue
    Accesses database volume and log files
    One server process per one database
    Broker Process ‘cub_broker’
    Daemon process listening on the TCP port for connectors’ connection
    Controls cub_cas processes (fork/kill) with connection queue
    CAS Process ‘cub_cas’
    Connects to the server process in behalf of connectors
    According to the database and user name
    CSQL Program ‘csql’
    Interactive SQL execution
    1.3
    10/
    41 First Look Inside CUBRID
  • 14. System Architecture and ProcessesCUBRID Processes and IPC
    1.3
    JDBC driver
    CCI library
    connect
    query &
    result
    query &
    result
    port listening
    cub_broker
    cubrid_broker.conf
    fork
    parse
    descriptor pass
    AP
    Web Server
    cub_cas
    cub_cas
    shared memory
    cubridcs.so
    cubridcs.so
    csql
    connect
    cubridcs.so
    request &
    response
    request &
    response
    parse
    Broker
    TCP
    job queue
    multi-thread
    port listening
    descriptor pass
    parse
    cub_master
    cub_server
    cubrid.so
    cubrid.conf
    UDS
    Active
    Server
    Standby
    Server
    mount
    (read/write)
    read
    register
    volume file
    log file
    databases.txt
    volume file
    log file
    Replication
    cub_admin
    cubridsa.so
    11/
    41 First Look Inside CUBRID
  • 15. System Architecture and ProcessesQuery Processing Workflow
    1.4
    12/
    41 First Look Inside CUBRID
  • 16. System Architecture and ProcessesQuery Processing Workflow
    1.4
    XASL Type
    UNION
    Extended Access Spec Language
    (XASL)
    DIFFERENCE
    INTERSECTION
    OBJFETCH
    Query Manager
    TransactionManager
    Lock Manager
    SETFETCH
    BUILD_LIST
    BUILD_VALUE
    Query Result Cache
    Query Plan Cache
    Query Evaluator
    (Interpreter)
    SCAN
    MERGE_LIST
    Scan Management
    READ
    UPDATE
    Storage Manager
    DELETE
    INSERT
    13/
    41 First Look Inside CUBRID
  • 17. Design & Implementation Concepts
    2
    • Client-Server and Standalone Mode
    • 18. Object, Class and OID
    • 19. Representation, Record Descriptor, and Memory Object Pointer
    • 20. Workspace – Object & Lock Caching
    • 21. 2PL vs. MVCC
    • 22. XASL (Extended Access Spec Language)
    • 23. Heap, B+tree, Catalog, and Temp
    • 24. Click Counter
    14/
    41 First Look Inside CUBRID
  • 25. Design & Implementation ConceptsClient-Server and Standalone Mode
    2.1
    15/
    41 First Look Inside CUBRID
  • 26. Design & Implementation ConceptsObject, Class and OID
    2.2
    16/
    41 First Look Inside CUBRID
  • 27. Design & Implementation ConceptsRepresentation, Record Descriptor, and Memory Object Pointer
    2.3
    17/
    41 First Look Inside CUBRID
  • 28. Design & Implementation ConceptsWorkspace – Object & Lock Caching
    2.4
    18/
    41 First Look Inside CUBRID
  • 29. Design & Implementation Concepts2PL vs. MVCC
    2.5
    19/
    41 First Look Inside CUBRID
  • 30. Design & Implementation ConceptsXASL (Extended Access Spec Language)
    2.6
    20/
    41 First Look Inside CUBRID
  • 31. Design & Implementation ConceptsHeap, B+tree, Catalog, and Temp
    2.7
    21/
    41 First Look Inside CUBRID
  • 32. Design & Implementation ConceptsClick Counter
    In Terms of User
    Whenever the user clicks an article, the read counter of the article is increased.
    Counts the clicks on the article
    In Terms of Service Application Developer
    The read counter is very important for bulletin board type service.
    Combine getting article data and increasing read counter together
    get_article() + increase_counter() = get_article_and_increase_counter()
    (SELECT article_info) + (UPDATE read_counter+1)
    In Terms of Database Engineer
    Do SELECT and UPDATE in one SQL statement
    SELECT trigger? SELECT FOR UDPATE?
    UPDATE the record with the short term lock
    Example
    SELECT doc_id, title, INCR(read_counter), post_date FROM board WHERE doc_id=?
    2.8
    22/
    41 First Look Inside CUBRID
  • 33. Design & Implementation ConceptsClick Counter
    2.8
    Don’t walk the same passage twice!
    When you get there, do as many things as possible.
    Killing two birds with one stone.
    23/
    41 First Look Inside CUBRID
  • 34. Module and Source Structure
    3
    • Overall Structure
    • 35. Query Processing Component
    • 36. Transaction Management Component
    • 37. Server Storage Management Component
    • 38. Client Storage Management Component
    • 39. Object Management Component
    • 40. Job and Thread Management Component
    • 41. Client-Server Communication Layer
    • 42. Broker Component
    24/
    41 First Look Inside CUBRID
  • 43. Module and Source StructureOverall Structure
    41 First Look Inside CUBRID
    25/
    3.1
    C API
    Transaction Management
    Common & Support
    Broker
    Job & Thread Management
    CCI Library
    Server Storage Management
    CUBRID Manager
    Query Processing
    Client-Server Comm
    PHP Connector
    Query Processing
    Native C API
    Query Processing
    Job & Thread Management
    Utilities
    Object Management
    Memory Manager
    JDBC Driver
    Client Storage Management
    Java Stored Procedure
  • 44. 41 First Look Inside CUBRID
    26/
    Module and Source Structure
    3.1
    src/
    broker
    CUBRID
    Manager
    GUI
    PHP
    OLE DB
    Ruby
    JDBC
    ODBC
    CCI
    Python
    CM Server
    src/
    query
    src/
    storage
    src/
    transaction
    src/
    compat
    Create, Delete, Copy, Rename
    Job
    Queuing
    Monitoring
    Connection
    Pooling
    Logging
    Client Library
    Add Volume
    Native C API
    Parser
    Object
    Manager
    Schema
    Manager
    Transaction
    Manager
    Load /
    Unload
    Query
    Transform
    Workspace Manager
    Backup /
    Restore
    Query
    Optimizer
    Memory Manager
    Compact /
    Optimize
    Plan
    Generation
    Check /
    Diag
    Communication Module
    src/
    cmserver
    src/
    communication
    src/
    jdbc
    src/
    object
    src/
    oledb
    src/
    php
    src/
    cci
    src/
    odbc
    src/
    optimizer
    src/
    base
    src/
    executables
    src/
    heaplayers
    src/
    parser
    src/
    thread
    src/
    connection
    Storage Engine
    Communication Module
    Transaction
    Manager
    Log
    Manager
    Lock
    Manager
    Query
    Manager
    Access
    Method
    B+Tree
    Module
    File Manager
    System
    Catalog Module
    Buffer Manager
    Disk Manager
  • 45. Module and Source StructureQuery Processing Component
    Scanner/Parser
    Parses query string and builds parse tree
    Uses ANTLR v1.x as parser generator
    Will be replaced with ‘bison’ at R2.0
    Source files in src/parser
    Data structure: PT_PARSER, PT_NODE, …
    Semantic Checker
    Type check and binding, name resolution, semantic checking, view translation, and so on
    Source files in src/parser
    Parse tree traversing function: parser_walk_tree()
    Optimizer
    Rewrite optimization by heuristic rules
    Select a query execution plan by CBO (Cost Based Optimization) method
    Source files in src/parser and src/optimizer
    Data structure: QO_NODE, QO_PLANNER, …
    XASL Generator
    Generate XASL tree from the query execution plan
    XASL contains scan information (heap/index/list file/set/method scan), value list, and predicates
    Source files in src/parser
    Data structure: XASL_NODE, REGU_VARIABLE, …
    Query Manager (Executor)
    Executes XASL tree (XASL interpreter)
    Includes query evaluator, query plan cache, query result cache, query result file, and scan management
    Source files in src/query
    Main function: qexec_execute_mainblock()
    Cursor Manager
    Extracts tuple from the list file page shipped from the server Query Manager
    Source files in src/query
    3.2
    27/
    41 First Look Inside CUBRID
  • 46. Module and Source StructureQuery Processing Component
    3.2
    Object Management Component
    Broker
    Semantic Checker
    Scanner/Parser
    Optimizer
    XASL Generator
    Cursor Manager
    Client-Server Communication Layer
    Client-Server Communication Layer
    Server
    Query Plan/Result Cache
    Query Manager
    Transaction Management Component
    Query Evaluator
    (Interpreter)
    Storage Management Component
    (Server)
    Scan Management
    28/
    41 First Look Inside CUBRID
  • 47. Module and Source StructureTransaction Management Component
    Transaction Manager
    Controls transaction – start, commit/abort, savepoint, and top operation
    Works tightly with lock and log manager
    Supports 2PC protocol for global transaction
    Initialize other related modules such as lock, log, and recovery manager
    Source files in src/transaction
    Data structure: LOG_TDES, TRANTABLE, …
    Object Locator
    Controls the flow of objects between the workspaces and the database pages
    Translates between memory representation and disk representation
    Caches objects from the server into the workspace with the granted locks
    Cached object and lock provides fast access to the objects and reduces interacting with the lock manager on the server
    Source files in src/transaction
    Lock Manager
    Based on strict 2PL protocol
    Includes support for OR feature
    class lock and instance lock
    Deadlock detector with WFG
    As separate thread
    Source files in src/transaction
    Data structure: LK_ENTRY, LK_TRAN_LOCK, …
    Log Manager
    Transaction logging and recovering
    REDO/UNDO recovery protocol
    WAL protocol
    Physical logging and logical logging
    Supports group commit and asynchronous commit feature
    Source files in src/transaciton
    Data structure: LOG_GLOBAL, LOG_HDRPAGE, LOG_PAGE,
    3.3
    29/
    41 First Look Inside CUBRID
  • 48. Module and Source StructureTransaction Management Component
    3.3
    Storage Management Component
    (Client)
    Object Management Component
    Transaction Manager
    (Client)
    Broker
    Object Locator
    (Client)
    Client-Server Communication Layer
    Client-Server Communication Layer
    Server
    Object Locator
    (Server)
    Lock Manager
    Transaction Manager
    (Server)
    Storage Management Component
    (Server)
    Log Manager
    30/
    41 First Look Inside CUBRID
  • 49. Module and Source StructureServer Storage Management Component
    File I/O Manager
    Provides disk I/O access functions and implements file structure
    Coordinates the allocation and deallocation of unstructured files and pages
    File>Sector>Page
    File manager requests sectors from the disk manager
    Source files in src/storage
    Identifier: vdes, PAGEID
    Disk Manager
    Volume file management – implements volume structure in a OS file
    A volume corresponds to a singe file
    A set of contiguous pages of fixed size
    Source files in src/storage
    Identifier: volid
    Page Buffer Manager
    Data buffer pool with LRU replacement algorithm
    Uses buffer hash table and fix/unfix protocol (latch)
    Source files in src/storage
    Identifier: VPID
    Data structure: PGBUF_BUFFER_POOL
    Slotted Page Manager
    Manages insertions, deletions, and modifications of records on pages
    Each record has an associated slot identifier
    Source files in src/storage
    OID = (pageid, slotid, volid)
    Overflow File Manager
    Larger object than the size of a page is placed on overflow pages
    Source files in src/storage
    Object Heap Manager
    Inserts/deletes/updates objects within a file
    Permanent unchangeable OID is assigned to an object when it is stored on a heap
    Provides heap scan method (sequential scan) and direct fetch method
    An object heap holds the instances of one class
    Source files in src/storage
    Identifier: HFID
    B+-tree Manager
    Implements prefix B+-tree index with KVL
    Provides index scan method – unique find and range search
    3.4
    31/
    41 First Look Inside CUBRID
  • 50. Module and Source StructureServer Storage Management Component
    3.4
    Broker
    Client-Server Communication Layer
    Client-Server Communication Layer
    Server
    Query Processing Component
    (Server)
    Transaction Management Component
    (Server)
    Object Heap Manager
    B+-tree Manager
    Large Object Manager
    Extendible Hash Manager
    File Manager
    Slotted Page Manager
    Overflow File Manager
    Page Buffer Manager
    Catalog Manager
    Disk Manager
    I/O Manager
    32/
    41 First Look Inside CUBRID
  • 51. Module and Source StructureClient Storage Management Component
    Workspace Manager
    Maintains a cache of database objects within the virtual memory address space of client process
    Maintains hash table that maps a OID into MOP
    MOP has OID field and a pointer to memory object
    Source files in src/object
    Quick Fit Allocator
    Memory manager for workspace
    Source files in src/object, src/base
    Garbage Collector
    To collect and free the unused(dangled) memory objects
    Normally GC is disabled
    Object and Lock Caching
    When the contents of object(s) is(are) required, the object locator is called to fetch the object(s) from the database via the server-side object locator
    The object locator translate the disk representation of the objet into the memory representation and allocates MOP to points it
    While accessing the object in the database, the requested lock is held by the lock manager in the server and the memory object has the cached lock mode
    The cached objects can be decached at any time when its state is not consistent with the disk objects, or will be decached at the time of transaction abort
    At the time of transaction commit, only the cached locks are released; objects remains with null lock
    3.5
    33/
    41 First Look Inside CUBRID
  • 52. Module and Source StructureClient Storage Management Component
    3.5
    Object Management Component
    Broker
    Garbage Collector
    Quick File Allocator
    Workspace Manager
    Transaction Management Component
    Object Locator (Client)
    Client-Server Communication Layer
    Client-Server Communication Layer
    Server
    34/
    41 First Look Inside CUBRID
  • 53. Module and Source StructureObject Management Component
    Object Accessor
    Interface for object creation, deletion, inspection, and modification
    Source files in src/object
    Object Representation
    Transforms (or translates) between the disk representation and the memory representation of the object
    Resolves byte ordering also
    Source files in src/object, src/base
    Functions: or_xxx(), tf_mem_to_disk(), tf_disk_to_mem(), …
    Data Type and Domain
    Internal data structure for data type and domain
    Source files in src/object
    Data structure: TP_DOMAIN
    Sets
    Source files in src/object
    Data structure: SETOBJ, COL
    Schema Manager
    Implements OR model regarding database schema
    Definitions of the class object – attributes, method, class inheritance, and conflict resolution
    Memory representation of class object
    Source files in src/objet
    Data structure: SM_CLASS, SM_ATTRIBUTE, …
    Authentication and Authorization
    User authentication and database privilege
    User, GRANT, REVOKE, …
    Source files in src/object
    Trigger Manager
    Implements trigger feature
    Source files src/object
    Dynamic Loader
    Support dynamic loading of shared object as ‘method’
    Depreciated feature
    Large Object
    Implements glo, elo, fbo classes and supporting methods
    Source files in src/object
    3.6
    35/
    41 First Look Inside CUBRID
  • 54. Module and Source StructureObject Management Component
    3.6
    Object Accessor
    Broker
    Schema Manager
    Authentication
    & Authorization
    Trigger Manager
    Set
    Dynamic Loader
    Data Type and Domain
    Object Representation
    Storage Management Component
    (Client)
    Client-Server Communication Layer
    Client-Server Communication Layer
    Server
    36/
    41 First Look Inside CUBRID
  • 55. Module and Source StructureJob and Thread Management Component
    Connection Manager
    Connection establishment and management and request handler
    Source files in src/communication, src/connection
    Data structure: CSS_QUEUE_ENTRY, CSS_CONN_ENTRY, …
    Job Queue
    Master thread monitors socket fds (select()), receives clients’ request packet, en-queues it, and then wake up a worker thread in the thread pool
    Source files in src/connection
    Data structure: CSS_JOB_ENTRY, …
    Critical Section
    Implements semaphore
    Source files in src/thread
    System Threads
    Master thread
    Deadlock detection thread
    Run deadlock detection algorithm periodically
    Resolves deadlock by aborting unilaterally victim transaction(s)
    Checkpoint thread
    Executes periodic checkpoint action
    OOB handling thread
    Catch OOB signal
    Page flush thread
    Flushes dirty data buffer pages to the volume files in the background
    To reduce burden of page replacement
    Log flush thread
    Flushes dirty log buffer pages to the log file in the background
    Implements group commit and asynchronous commit features
    Source files in src/thread
    3.7
    37/
    41 First Look Inside CUBRID
  • 56. Module and Source StructureClient-Server Communication Layer
    Socket Transceiver
    Socket utility functions
    TCP/IP, Unix domain socket, and named pipe
    Source files in src/connection
    Linux and Windows port
    Packet Handler
    Sends requests and receives response between client and server
    Packet types: request packet, data packet, close packet, out-of-band packet, error packet, abort packet
    Packet format: packet header + payload
    Queuing request and data packets
    Source files in src/connection
    Communication Interface Layer
    RPC stub style functions
    Implements object serialization
    Source files in src/communication
    3.8
    38/
    41 First Look Inside CUBRID
  • 57. Module and Source StructureBroker Component
    Broker Process
    Accepts connection requests from the Connectors (JDBC, CCI, …)
    Allocates and/or assigns CAS process to the request
    Controls and monitors CAS processes
    Has four threads
    main: manages cas process
    receiver_thread: does accept() and enqueues new job
    dispatch_thread: dequeue job and assigns cas process
    cas_monitor_thread: monitors cas process to restart
    Source files in src/broker
    CAS Process
    Linked with CUBRID client library
    So, run as a single thread
    Receives and processes requests from the application(Connectors)
    Connect to database
    Prepare and execute query
    Fetch the result
    Commit/rollback transaction
    Get/set parameters
    Has four states
    IDLE: not connected with AP
    BUSY: processing request
    CLIENT_WAIT: connected and waiting for request; within a transaction
    CLOSE_WAIT: connected and waiting for request; out of a transaction
    Source files in src/broker
    3.9
    39/
    41 First Look Inside CUBRID
  • 58. In The Next CUBRID Inside
    4
    40/
    41 First Look Inside CUBRID
  • 59. In The Next CUBRID Inside
    4
    What topic do you want to see covered in the next CUBRID Inside?
    Suggesting Topics
    41/
    41 First Look Inside CUBRID
  • 60. Question?