Normal Topic Telling Sbasic to use a directory on the server (Read 2636 times)
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Telling Sbasic to use a directory on the server
Oct 4th, 2011 at 5:13pm
Print Post Print Post  
In the past when using Sesame over the internet I would deal with shared files by having a cloud based drive, so basically I would have a cloud drive named P:\sesame\scripts\Done to hold prescriptions that multiple people may need to view from a sesame app. My button code would be something like this seen below.

It works well but I need to have every machine that accesses the application have a utility that makes the cloud drive available and named correctly as P:\ .

I would think if I can just have a few large drives hung on my server machine that the application uses to store stuff, everything would be much simpler. Is there a correct method to have Sbasic look at the server drives? I know I use @server dialog to popup a server dialog files on the server, but is there a command or technique to say X:\on the server as apposed to X: being seen as the client drive? Something like n = @AsynchShell("[b]Serverc:[/b]\sesame\script\done\" + ptid +"script.pdf")

I hope my question is somewhat clear.

Thanks

Var n as int
iF      FileExists("P:\sesame\script\done\"+ptid+"script.pdf") // needs to be changed based on working directory
// opens and displays the pdf
n = @AsynchShell("c:\sesame\script\done\" + ptid +"script.pdf")
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Telling Sbasic to use a directory on the serve
Reply #1 - Oct 4th, 2011 at 7:37pm
Print Post Print Post  
You can use a UNC path.
\\COMPUTER_NAME\SHARE_NAME\Directory\file
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Telling Sbasic to use a directory on the serve
Reply #2 - Oct 4th, 2011 at 10:17pm
Print Post Print Post  
so this may be a silly question to those familiar with internet drive usage, but... are you saying that if I access the Sesame application via the internet and I use a UNC name from a drive seen as a unc drive on that machine remotely (the sesame server machine) I can then keep all specific files in 1 place and access them from any machine that can access the Sesame application?

So if i put something like this on a button
var Vunc as string
     Vunc = @Shell("net use")      
or just run net use from a command line on the physical machine to see UNC names and then add that name \\station26\script to my Sbasic code (see below) It should sort of work as I am describing?

Var n as int
iF FileExists("\\station26\script \script\done\"+ptid+"script.pdf")
// opens and displays the pdf
n = @AsynchShell("\\station26\script\done\" + ptid +"script.pdf")
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Telling Sbasic to use a directory on the serve
Reply #3 - Oct 5th, 2011 at 6:18pm
Print Post Print Post  
I know I am a bit slow, however I have been struggling with this concept since the first time (many years ago) I saw a Demo of Sesame over the web at a QAbash and its time for me to get into the current decade and understand using Sesame "properly" via the web.

If I am dealing with multiple machines on the same network in 1 building I have no problems dealing with things (say pdf files) that live outside of my Sesame Application. I map network drives that are used as holders for my data. I use Sbasic commands like @AsynchShell("c:\sesame\script\done\" + vrname) to easily and quickly access a file as needed. Everything is perfect.

Now in modern times users want to exist in remote places and via VOIP phones and cloud based applications  they expect to be able to often access applications via laptops on the road from different places each day.
So everyone being on the same switch and mapping network work drives is out. In the new world I have a server that is hung on the web with its own non changing IP address. Thanks to Sesame's ease of use,  low and behold if a user has Sesame.exe and the correct Sbas.ini on their machine, knows their userid and password they are in the Sesame created application just like they were sitting at a desk next to the server.

Now this is where I get lost and confused. I will admit upfront my knowledge of UNC drives, web connectivity, permissions and all that stuff is somewhat limited. So what I did originally is set up a cloud drive with a small device that has software that loads on each computer and makes it look like a drive on any computer it is attached to. I set that drive up as a drive letter that I then had my Sbasic code use.
Since the local client machine thinks the drive is on the machine, it finds the file and does what is asked of it through sesame. And since all the other users have access to the same files it works for any user that logs into sesame from anywhere else. The problem I think with using this technique is that it makes setting  up each machine more complicated than just loading Sesame.exe, Sbas.ini and a shortcut to start the Sesame application. I am also concerned it seems a bit cumbersome and may be viewed as pretty hokey.

I figured there has got to be a cleaner way, so in my un-educated stupor I thought since the user is already connected to the server machine why couldn't I just plug in a few external drives and have Sesame access the files from the local drives. This is the point Erika suggestion UNC, sounding great I jumped in searched the forum for Topics in the past with UNC and found that UNC is for naming networked drives, so I figured I would hang another machine on the network and map it on the server and try my luck at using the UNC name in my code.

However my lack of skill with Sesame on the web has immediately caused some problems. Since I thought  the machine I was using as a server needed a non changing IP address I connected it directly to the IP providers equipment without running it into a switch because I thought the switch would alter the IP address, so I need to figure out the proper configuration of the server to the IP provider and still be able to have other machines networked to the server so I can get a UNC drive.

So with all this being said, before I go off in any other silly directions, what is "the proper" or  "suggested"  best way to set sesame up to be used over the web, and have users be able to access documents and files that live outside of the Sesame application?
Thanks
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Telling Sbasic to use a directory on the serve
Reply #4 - Oct 5th, 2011 at 6:43pm
Print Post Print Post  
Robert,

Exposing direct access to portions of your server's filesystem to the internet is a dangerous proposal. You should probably not go with UNC, drive mapping, or NFS, in that all three methods are likely to be very easy targets for hackers. You can probably get any of these to work as read-only filesystems with limited access to a single directory tree, but I would be extremely careful.

You might consider serving your files to systems across the internet using a web server instead. You would then use the SBasic HTTP commands to access the files in SBasic from a client. That would at least provide some protections against hackers. You can also automate FTP clients and run an FTP server on your server computer.

Using just Sesame, you might be able to take advantage of server side mass updates to access the files on the server and get the data to the clients, or use the network I/O commands of SBasic. It would take some thought in Sesame2 (a bit less with Sesame3).

If you do decide to go with UNC through the internet, you should can use the server computer's public IP address instead of its local network name (i.e.: //192.168.030/C/Directory). If you have the right IP, you can add that to the hosts file with a unique name on each of the clients.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Telling Sbasic to use a directory on the serve
Reply #5 - Oct 5th, 2011 at 7:12pm
Print Post Print Post  
Mark,

Thanks so much for the input. I value your guys advice and guidance very highly.  With your statements and my lack of knowledge on the subject, I will for now just continue with my cloud based drive set-up that is very secure and works well with Sesame even if it seems a bit Rube Goldberg ish.

I will however look forward to future releases of Sesame and I will personally strive to create a Sesame application that will manage the external documents needs I have in a Safe and non Rube Goldberg manner.

Thanks again for the help and thanks for all the hard work and effort that you All are doing to give us users new features and improvements in future releases of Sesame.
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Telling Sbasic to use a directory on the serve
Reply #6 - Oct 5th, 2011 at 7:51pm
Print Post Print Post  
BOBSCOTT wrote on Oct 5th, 2011 at 7:12pm:
Mark,

Thanks so much for the input. I value your guys advice and guidance very highly.  With your statements and my lack of knowledge on the subject, I will for now just continue with my cloud based drive set-up that is very secure and works well with Sesame even if it seems a bit Rube Goldberg ish.


What about using the cloud server is striking you as clumsy? Most of the impediments to serving files on the internet are there for security. If security is no issue...

For example, using your router's ability to allow a computer to be placed directly on the internet using a static IP address. You could place a computer that has only the files you wish to be shared and an OS. It must have no other network access. As long as these files do not need to be secured, everyone on the internet could access those files. Hackers could, of course, gain access to that one computer, but since it doesn't attach to any others, no harm done. At worst they might bring down the machine or infect it and it alone - inconvenient, but not a disaster.

The problem comes up when you only want to share some of the files with only some people. Now you need a way to identify the people (passwords, encryption, etc...). You need a way to keep the people who are allowed on in only the directories they are allowed to see. If you put a computer directly on the net, you have to set all of that up. Even experts worry about that kind of arrangement, and are constantly battling the hackers.

Having a cloud based server provides a shared filesystem that is protected by a third party. So, while you will have to trust that they know how to do their jobs, it is their job to worry about break-ins so you don't have to.

BTW: if your company is already running a web server, you can place these files in a directory under the public directories but not linked to any web page. Put an index.html file in that new directory that is entirely blank (to protect the files from browsers and search spiders) and then use a free utility like "wget" or "synch" from each of your clients when they start sesame to download the files to a local directory, if they aren't too big. Then your SBasic simply accesses the updated files locally.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Telling Sbasic to use a directory on the serve
Reply #7 - Oct 5th, 2011 at 8:24pm
Print Post Print Post  
Quote:
What about using the cloud server is striking you as clumsy? ...


Mark,

Maybe it's more a matter of the cloud server I am using. It has software that starts when the computer does and stays active all the time on the client machine. I was not successful at getting Sesame to start it and stop it so it would only be active when the Sesame app was running, However I understand they may have recently improved their software and also I just googled  and found they now have an API that I may be able to use to start and stop access when the Sesame App opens and closes on the client machine. I am going to download it now and see what damage I can do.

Thanks again.

  

Team – Together Everyone Achieves More
Back to top
 
IP Logged