Skip to content

ES Module that caches Seaware availability and prices

Notifications You must be signed in to change notification settings

hurtigruten/enzo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

enzo

Enzo is a zero dependency ES module that can be used for populating (or reading) a Seaware Bizlogic Cache. It does so by reading sailings defined in a config file, or through an API - and then creating an asyncronous pool of XML requests that are posted to Bizlogic in a throttled manner. This ensures that the CPU threads are fully saturated, leading to optimal caching.

Prerequisites

This module is meant to be used by a Slack bot, script, etc. that need to cache price and availability in Seaware and needs the following:

  • Deno needs to be installed locally and on the Bizlogic Server, check the website.

  • Recommend using VS Code + the Deno extension for developing locally.

  • In Seaware, "Custom Availability Search" rules need to be in place for every search the cache application wishes to perform (that means that any potential new port combination needs to be added to these rules). In addition, any Search scenario XMLs needs to be set up (such as OneWaySearchScenario.xml), these translate the search criteria into "Seaware lingo" and can be expanded to alow loyalty specific prices, B2B specific prices, Promotion based prices, etc.

Consuming Config from a file

Enzo can cache based on a file. Currently "./configs/voyage.ts" is used to cache voyage only sailings. If you need to add or change the way these sailings are cached, this file should be modified.

Consuming Config from an API

Enzo can cache based on an API. The API must implement the Config type as defined in "./types.ts"

Testing

All tests follow the name convention of filename_test.ts. To execute all tests, execute:

deno test -A

... within the root folder (or in a subfolder containing tests)

How to release a new version

  1. Pull in the proposed PR(s) and/or make sure master has the code you want to release a new version for
  2. Create a new tag
  3. If relevant, update Slack bots, scripts and any other component that wishes to use the new version

Seaware cache documentation

Read more about the Seaware Cache here

And here

About

ES Module that caches Seaware availability and prices

Resources

Stars

Watchers

Forks