Integrating and using a dotNET library inside a Phoenix/Elixir application

In a different context Saša made an interesting comment:

I take this to be an opinion that is informed by experience. Since then I’ve been a bit more skeptical about C Node/Jinterface based solutions even when they seem to be somewhat convenient.

To get back to your original post about a dotNet library - I personally would favor a solution where the dotNET code can live where it is happiest (Windows Server?) while Phoenix isn’t tied to Windows and Phoenix can access the dotNET library’s capabilities via some non-BEAM specific protocol. But that’s just me.

Whether the capabilities of that library is worth that kind of overhead is a separate issue. What job is more critical? What the library is capable of or what Phoenix is going to be doing? If the library’s capabilities trump everything and it’s too costly to duplicate elsewhere and Phoenix’s contribution would be relatively minor then I would lean towards a dotNET centric solution. On the other hand if the Web API/front end effort is significant enough and Phoenix can have a significant positive impact, wrapping the dotNet Library in a “service” may be worth the effort.

1 Like