Putting It All Together (Technically)

Panl was not specifically designed to be web facing, although it could be should you so choose.  The recommended way is to hide the Panl implementation CaFUPs URL and proxy them through a web or application server.

A number of Panl servers can be spun up at the same time (on different ports of course) and load balanced between them.  There is no state to be kept between requests, so it is lightweight and fast.

A Brief Architecture



Image: The recommended approach to integrating the Panl server


In the above diagram, the request hits the front end web/app server, is proxied through to the correct Panl CaFUP which is then handled by a Collection Request Handler.  The URL path part is decoded and parsed, the query built, sent to the Solr server and the response built and returned.

You may wish to open the Panl server to external requests, however, be aware that there is no authentication or authorisation in the Panl server.  See the section on Is Synapticloop Panl For Me? to inform your decision.

Generating SEO Friendly URLs

Going beyond the in-built features of the Panl configuration, generating URLs - especially those with a passthrough parameter requires.

You could either go to the datasource (e.g. a database) and build the URLs programmatically, or let Panl generate all of the URL paths and, or a combination of both.

Data Dependencies

Using the original datasource to generate links will create a dependency on the Panl configuration, and should the Panl configuration change, then the links may not still be valid.

For example, if you generated links for the mechanical pencils collection from a datasource as

/Manufactured+by+Koh-i-Noor+Company/b/

And the Panl configuration changed to generate the path:

/fine-pencils-by-Koh-i-Noor/b/

Then Panl would not return any results as the prefix and suffix did not match and this facet would not be passed through to the Solr server.

Passthrough URLs

Passthrough URLs are a little more able to withstand Panl configuration changes as they are not linked to any Solr field value.

Passthrough URLs are also best used to link to a single document, or a subset of documents.  For example, in the Book Store dataset, the following link uniquely identifies a book (using the ID field from Solr):

http://localhost:8181/panl-results-viewer/book-store/default/4/i/

And consequently any passthrough parameter will give the same result, such that

http://localhost:8181/panl-results-viewer/book-store/default/Michael+Connelly+The+Last+Coyote+-Harry+Bosch+Series/4/zi/,

and

http://localhost:8181/panl-results-viewer/book-store/default/This+is+not+a+link+to+a+book+but+returns+results/4/zi/

Return the same result.

When using passthrough URLs, you may wish to configure a separate file and associated CaFUP  just for these values, and be able to tweak other configured CaFUPs.

Handling Errors

You may also wish to return a 404 HTTP status code if the number of results returned is zero (0). To indicate to users and search engines that are scraping your site that this URL is no longer available.

~ ~ ~ * ~ ~ ~