ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a third party library ".so" on ubuntu 32 bits where I can import it to my code. This lib is an OCR for vehicles. It takes a car image as parameter and return the plate number of the car in text format.
My boss now is selling this product and we can't install it on customer computer because they might steal the lib from us.
So what I am thinking is a online solution where user can our server. So we might need to provide a remote API to the client and he can use it on their end.
Is it possible to do such thing ? I am not too experience on remote apis. But what is the initial steps to start taking a look at this and getting familiar on what is possible or not.
Comunication might be done via sockts (IP + port) and the software running on that port will do the OCR work.
Hi guys,
I have a third party library ".so" on ubuntu 32 bits where I can import it to my code. This lib is an OCR for vehicles. It takes a car image as parameter and return the plate number of the car in text format.
My boss now is selling this product and we can't install it on customer computer because they might steal the lib from us.
If it's a 'third party' library, that means you got it from someone else...so why are you concerned about someone stealing it from YOU, when you don't own it???
Quote:
So what I am thinking is a online solution where user can our server. So we might need to provide a remote API to the client and he can use it on their end. Is it possible to do such thing ? I am not too experience on remote apis. But what is the initial steps to start taking a look at this and getting familiar on what is possible or not.
Comunication might be done via sockts (IP + port) and the software running on that port will do the OCR work.
Short answer is, again: you CANNOT, EVER, 100% protect your software from being stolen. If someone can USE it, they can COPY it...what do you think will happen even IF your idea works? Are you going to put that API somewhere else too? How will you protect THAT?
i dont know much about your environment but generically you can have the clients scp the pic to your server; your server will ocr it; then the client will scp the result back.
If it were me, I would do whatever the application requires ... before your competition serves the customer better than you did. Write a contract which strictly specifies the terms under which the application (including the library) may and may not be used. If they "steal it from you," you can then go after them. The principal consideration here, in my mind, is how to serve the customer best ... and that, it seems likely to me, would be to have the library available right there. Transmission times and so-forth might cost you.
i dont know much about your environment but generically you can have the clients scp the pic to your server; your server will ocr it; then the client will scp the result back.
I understand your point. I could also use database to share results with the customer. However I want something more professional. For example a service listing on some port. I need a way to provide this service remotely.
I think I need to use sockets but I don't know how to start. That's why I am asking you guys here.
I will have it installed on a machine that will be "the server" and my customer will have the "client" on their end.
Simplest way is to set up a web server. Send a form POST request with the image and the customer key, return HTML containing the result. This makes it easy to set up and debug and you don't have to write a lot of infrastructure. There are existing libraries to generate and parse HTML. Use auth if you want to restrict access. The web logs will also tell you whether only your paying customers are using the software.
Well, whatever you do, be sure to use some kind of authentication... And I would go with the secure transfer..
Fortunetly, what you ask is possible in a number of different ways (for example, using an API written in PHP, with a PHP module written in C that connects to your library, or a fastGCI program directly written in C -- the client-server communication could be done over HTTPS on an unusual port.. Authentication could be OAuth based),..
Since you know so little about networking, I would avoid writing a server from scratch.. You'll hit a lot of brick walls when you deploy it..
Anyway, anything you choose at this point means you have to write a bit.. And since that library is not open-source, I doubt you'll find anything related to it open-sourced..
Last edited by Smokey_justme; 04-23-2014 at 12:52 PM.
TB0ne, I have bought this .so library from a software company and we paid a lot of money. That's why we need to protect it.
Unless you purchased the source code and ALL rights to it, then IT IS NOT YOURS. That third-party retains the license, unless you purchased it.
Quote:
And, my question still. How can make a service in linux ? Make a program listen on determined port and provide this service remotely.
This is a different question.
You can do it through sockets, but again, THERE IS NO WAY TO PROVIDE 100% protection, what you're trying to do is pointless, overly complicated, and will only serve to annoy your end-users. You only have to take a look at the crap Apple, Microsoft, and others have done in this arena...they've had decades and billions of dollars, and there are STILL pirated versions of their software around. And the end-users get more and more annoyed.
How happy do you think your users will be if your API doesn't work? Is buggy? If they have a connection issue back to you?? Do you think that they'll be thrilled that they spent money for your product, to have it not work reliably?
And yes, the code on your machine will be invisible to the customer. There are many services I work with that do this kind of thing in the car industry.
What you want is a website, with a customer login, that takes an image upload, passes it to your program, then takes the results and sends it to the customer. The customer never needs to see, touch or know about the background process you are using.
As long as you take precautions to secure your website and network, you will be as protected as you can be while offering a service to the customer.
Simplest way is to set up a web server. Send a form POST request with the image and the customer key, return HTML containing the result. This makes it easy to set up and debug and you don't have to write a lot of infrastructure. There are existing libraries to generate and parse HTML. Use auth if you want to restrict access. The web logs will also tell you whether only your paying customers are using the software.
I liked this solution. Seems to be very close to what I was looking for, thanks for the help.
Let me google it more and see what I can find. Thanks
Do you have site or tutorial so I can get started ? Thanks
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.