Multi-language Server SDKs

 

General info

One of the largest payment service providers in the world is responsible for processing the payments of the busiest online e-commerce platforms and merchants. For ISAAC, Wolfpack worked on multiple server and client side SDK’s in different programming languages.Wolfpack created SDK’s for e-commerce servers based on C#, Python2, Python3, Ruby and golang to make connection and testing as easy as possible for merchants by helping with communication with the payment provider’s server API. The primary features are convenient language specific libraries for the API calls and responses (marshall request objects to HTTP requests and unmarshall HTTP responses to objects or exceptions), handling of authentication details and handling of required meta-data.

Client

ISAAC develops usable solutions to complex online problems by making effective use of internet technology. ISAAC achieves measurable advantages for their customers; where ease of use, security and robustness are always a primary concern. Complex projects inspire their over 80 employees to excel in everything they do.

 

Regex in golang

The server side SDK’s are heavily reliant on complex regex constructions for customer data obfuscation. Go (often referred to as golang), a programming language created at Google, however only contains one regex implementation.
This implementation regexp is written in Perl and has a runtime dependency. Since golang regexes are guaranteed to be linear in complexity, they therefore support less than other regex implementations. The most important feature of the server side SDK regexes, backreferences, is missing in golang.
To solve this problem in the golang SDK, Wolfpack removed the regex constructions in golang, and instead parsed the JSON and sanitized all keys.
Performance wise this different construct is no issue; both with regex and JSON parsing an entire string is traversed. The biggest difference is the creation of objects with JSON parsing and formatting them back to JSON. This impact turned out to be negligible.