Skip to content

Develop New Adapters

QIUSHI BAI edited this page Aug 12, 2019 · 1 revision

Develop a New Database Adapter

  • Back-end:

    • add a Generator (extends SQL’s Generator).
    • add a Conn (extends SQL’s Conn).
    • (probably) add a Back-end Schema: TwitterDataStore
      • if your schema differs from those already exists: TwitterDataStoreWithHashtag & TwitterDataStoreWithoutHashtag.
  • Front-end:

    • (probably) add a services-xx.js & Migration file: send request & registration.

      • If your schema differs from those already exists: TwitterDataStoreWithHashtag & TwitterDataStoreWithoutHashtag.
      • The migration's tweet schema should be same as Back-end tweet schema.
  • Config files: 

    • add config file as twittermapweb/conf/cloudberry-xxx.conf, and amend the asterixdb.lang, add its url of connection.
    • add config (# sqlDB = xxxDB) in twittermapweb/conf/application.conf.
  • Add dependency for db's driver.

  • Insertion files (run DB in a docker container):

    • add dockerRun___DB.sh
    • add insert___DBSampleTweetToLocalCluster.sh

Future work:

Generalize Twittermap’s common/services-xx.js:

Write a new module(‘cloudberry.util’) as a basic module for sharable request functions in those services files. Reconstruct services-xx.js files, add ‘cloudberry.util’ to their dependencies.

Reconstruct Twittermap applications:

Reconstruct the directory as follow:

  • Twittermap
    • TwittermapForAsterixDB
    • TwittermapForMySqlDB
    • TwittermapForPostgreSqlDB
    • DrugMap

The TwitermapForxxxDB application differs in:

  • web/conf/cloudberry-xxxdb.conf
  • web/public/common/services.js
  • web/app/model/Migration_date.scala