Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #15710

Re: Local vs. network file

From "Qu0ll" <Qu0llSixFour@gmail.com>
Newsgroups comp.lang.java.programmer
References (1 earlier) <a4ov8oF930U1@mid.individual.net> <PJednaie7P_-0HrSnZ2dnUVZ_hSdnZ2d@westnet.com.au> <nb1dv4z3gq48.15acrjvtu4vh2.dlg@40tude.net> <a4p3ooFfumU1@mid.individual.net> <rbayhr9vyq8c.1csy82qnfcmz3$.dlg@40tude.net>
Subject Re: Local vs. network file
Date 2012-06-28 19:10 +1000
Message-ID <H8adnYzHq-wAgnHSnZ2dnUVZ_tadnZ2d@westnet.com.au> (permalink)

Show all headers | View raw


Reply at the end...

"Peter Duniho"  wrote in message 
news:rbayhr9vyq8c.1csy82qnfcmz3$.dlg@40tude.net...

On Sun, 24 Jun 2012 20:14:44 +0200, Robert Klemme wrote:

> On 24.06.2012 19:49, Peter Duniho wrote:
>
>> Actually, I doubt you can do this in a platform-independent way. Even on
>> Windows, a UNC path (which is normally used to specify a network path) 
>> can
>> refer to a local drive and a drive-letter path can refer to a network
>> location. You need to use platform-specific calls to tell the difference.
>
> How would an UNC path look that points to a local file / directory?  Or
> did you think of \\local_server_name\any\path ?  AFAIK that would still
> be a network path even though the share would be local.

But that's the problem. Windows isn't under any obligation to route traffic
referencing a local drive over the network, just because a UNC path was
used (i.e. the path looks like a network path).

As Eric and Leif have pointed out, the real issue here is a poor
specification.  It's not really clear why the requirement to not run from a
network drive has been imposed in the first place, but depending on the
motivation for the requirement, it may not be possible to tell simply by
the format of the path whether the requirement has been met or not anyway.

Just as in my original reply, I suggested that Qu0ll explain what goal he's
trying to achieve rather than ask about the specific method for achieving
it, there is a need to backtrack even further.

He's been given a requirement that on the face of it has no obvious
explanation (i.e. not running from a network share does not in and of
itself serve any useful purpose); the author of the requirement needs to
explain what ultimate goal the author is trying to achieve, so that Qu0ll
can then help them achieve _that_ goal in the most sensible way (which most
likely won't involve needing to know whether a given path refers to a local
or network location).

--------------------------------------------------------

Sorry for the delay in replying.

The situation is that I have developed some software which the client wishes 
to license as either a stand-alone product or with a network model.  The 
network license permits a fixed maximum number of concurrent users to load 
the software from a single network share.  The stand-alone license permits a 
fixed maximum number of concurrent users to run the software on their local 
machine (the maximum controls the number of concurrent machines on which it 
is running).  It's a pricing and marketing thing; the network license is 
more expensive but doesn't really offer any extra functionality or benefit.

I have implemented a system of license key management where the customer 
name, software version, type of license and max number of concurrent users 
are embedded in a key and that works really well.  Now I have to implement 
some control over the use of the software with a particular license.  I have 
posted in a previous thread about my issues with getting the concurrent user 
control working and it in itself presents quite a challenge, especially 
since the sites that will use this software often have no internet access 
and also have restrictions and security policies on their networks which 
prevent one instance communicating with other instances to verify the number 
concurrently running.

The limited number of responses to the post about network license control 
have not allowed me to resolve that particular issue and now I am trying to 
resolve the other issue of ensuring that the stand alone version is only run 
from a local drive.  I agree this restriction makes little sense but it is 
the requirement I have been given.

If anyone has any further ideas about implementing either network license 
control or control over where the software is launched from I would love to 
hear about them.  Perhaps as an alternative someone could suggest some other 
form of license model that is easier to implement but which also provides 
the ability to ensure that the software is not abused by users running more 
copies than they have paid for.

For network license control I thought about managing a file on the 
installation directory that records the machine names or IP addresses of the 
machines the client is running on and using that to work out how many are 
concurrently running but I couldn't get this to work as the end user does 
not usually have write permission on the directory from where the software 
is launched (i.e. on a network share).  Maybe there is some way to write to 
a writeable location on the launch machine that would be common for all 
users of the software on other machines?  Perhaps I could write to the 
registry on the launch machine if that didn't require admin privileges?

For the issue of control where the software is launched from for the 
stand-alone version I have implemented a system whereby the directory from 
which the software is launched for the first time is recorded in a file on 
the client machine and then checked against for all subsequent launches. 
This means the software can only be run on the client machine when launched 
from its original location which is possibly enough control.

I have to say I am really struggling with these requirements and would very 
much appreciate some input.

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu0llSixFour@gmail.com
[Replace the "SixFour" with numbers to email me] 

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Local vs. network file "Qu0ll" <Qu0llSixFour@gmail.com> - 2012-06-25 02:18 +1000
  Re: Local vs. network file Robert Klemme <shortcutter@googlemail.com> - 2012-06-24 18:57 +0200
    Re: Local vs. network file "Qu0ll" <Qu0llSixFour@gmail.com> - 2012-06-25 03:24 +1000
      Re: Local vs. network file Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-06-24 10:49 -0700
        Re: Local vs. network file "Qu0ll" <Qu0llSixFour@gmail.com> - 2012-06-25 04:01 +1000
          Re: Local vs. network file Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-06-24 14:12 -0400
          Re: Local vs. network file Robert Klemme <shortcutter@googlemail.com> - 2012-06-24 20:20 +0200
          Re: Local vs. network file Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-06-24 14:26 -0500
        Re: Local vs. network file Robert Klemme <shortcutter@googlemail.com> - 2012-06-24 20:14 +0200
          Re: Local vs. network file Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-06-24 13:10 -0700
            Re: Local vs. network file "Qu0ll" <Qu0llSixFour@gmail.com> - 2012-06-28 19:10 +1000
              Re: Local vs. network file Silvio Bierman <silvio@moc.com> - 2012-06-28 11:39 +0200
              Re: Local vs. network file Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-06-28 07:31 -0700
              Re: Local vs. network file Robert Klemme <shortcutter@googlemail.com> - 2012-07-02 19:33 +0200
                Re: Local vs. network file Joerg Meier <joergmmeier@arcor.de> - 2012-07-02 21:49 +0200
                Re: Local vs. network file Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-07-02 16:18 -0400
                Re: Local vs. network file Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-07-02 13:32 -0700
                Re: Local vs. network file Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-07-02 18:32 -0400
                Re: Local vs. network file Lew <lewbloch@gmail.com> - 2012-07-02 16:25 -0700
                Re: Local vs. network file Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-07-02 17:35 -0700
                Re: Local vs. network file Nine of Seventeen <n9seventeen17@gmail.com> - 2012-07-02 21:10 -0400
                Re: Local vs. network file uBend <d0b@d1b.d1b.null> - 2012-07-02 22:45 -0400
                Re: Local vs. network file j00sUck <j00-s.U-c_k@gmail.com> - 2012-07-02 22:59 -0400

csiph-web