I
I
Ivan Danilov2022-03-20 12:36:18
C++ / C#
Ivan Danilov, 2022-03-20 12:36:18

Link to a dll on the server, perhaps?

Good afternoon.
Help find a solution to the problem.

There is a Revit program with its own API. An application for Revit must have a manifest, where there is a link to a dll that defines the logic of the program.

I'm trying to hide the application logic, and I still can't figure out if it's possible to somehow put the dll on the server, or is it just my fantasy. In the first instance, trying to find an answer on the forums for Revit, I did not find an answer whether the assembly specified in the manifest should be on the client machine. They say that they tried to move somewhere, the application stopped working. OK. But internally, this assembly can also refer to dozens of others that could theoretically be on the server.

My question is if this is possible. I understand the Revit API, I don’t have any other subtleties, and I’m afraid to go in the wrong direction, spending a lot of time uselessly. I started to study WCF, but the deeper I dig, I don’t find an answer, is it possible to exchange objects, instead of typical strings, ints, etc. They mention something about serialization, but I’m not even close to sure that Revit objects can be serialized, there are objects with hundreds of properties.
Saw that there is something new compared to wcf - gRPC. I think the meaning is the same. There are even some azure clouds, but it is also not clear whether it is worth understanding them.
In my understanding, when a dll is on your computer, Revit App stupidly reads instructions from it and executes it. Is it really impossible to just read it in the same way, only to have it safely on the server?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2022-03-20
@vabka

You can make a plugin that will dynamically load some code from the server.
This will only make life harder for loyal users who are willing to pay for your plugin.
A pirate or someone who wants to copy your logic will also intercept this dll.
It will also create a potential hole and make your plugin unusable for some clients.
Or another option is to move all the logic to the server and constantly transfer data between your plugin and the server.
This will save you from piracy, but still not all clients will be willing to pay for this
. Most often, the task you described is solved with the help of obfuscation


Is it really impossible to just read it in the same way, only to have it safely on the server?

And how should Revit understand how to get data from your server?
There are hundreds of different protocols in the world that allow you to get a file from some server, including custom ones. How does Revit understand how to work with your server? And how do you determine that Revit is doing this, and is doing it on behalf of the user who bought the license?
And no, it doesn't read stupidly. Try to write an application yourself that will dynamically load dlls and execute code.

I started to study WCF, but the deeper I dig, I don’t find an answer, is it possible to exchange objects, instead of typical strings, ints, etc. They mention something about serialization, but I’m not even close to sure that Revit objects can be serialized, there are objects with hundreds of properties.
Saw that there is something new compared to wcf - gRPC. I think the meaning is the same. There are even some azure clouds, but it is also not clear whether it is worth understanding them.

1. You do not have to transfer these objects entirely. You can transfer only the necessary data to your objects and sterilize them.
2. Serialization is the transformation of objects into a certain form that is suitable for transferring somewhere.
3. Azure is just a service where you can rent a server, to put it simply.
4. WCF is deprecated

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question