Hacker News new | ask | show | jobs
by shaftoe 3992 days ago
How well does Cache interoperate with other languages?

Is it wrapped up in a library and consumed from another language that handles web requests/responses? Can you extend the Cache libraries by writing code in another language (even C) and importing it through a FFI?

2 comments

There are bindings for most of the common languages to access Cache structures/functions (.Net, Java, Python, Perl, C/C++, Node.js) but not much the other way around. The only native to call out from Objectscript is via a low-level C interface.

At the moment we're solving the problem by calling out to a set of Golang microservices from Cache over http.

Cache itself actually has web support baked in, either via early-00's PHP style "echo directly down the pipe" or a newer MVC style framework they've built, but sadly stopped developing. Our product team made the choice to transition to their MVC style framework, another team built on ASP.Net so there are options.

Most clients interact with the database through a standard API like JDBC or REST, but there is an interface for calling functions written in C, and for getting into the database from C. It's kind of similar to Lua's C API. The Node.js binding is based on this interface.