How to develop on server via file share?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to develop on server via file share?

WingIDE - User mailing list
Hi folks,

My question revolves around how to set up and use WingIDE to work on a python web project (happens to be django-based, but that's peripheral) such that I can run Wing two different ways:

a) On the linux server's desktop, accessing files locally, or...
b) On a Windows desktop, accessing files over LAN and Samba (file sharing).

There's no problem with just (a), of course. There's also no problem with a Windows project that just happens to have its files stored on (and running from) a share.  But...

In the case at hand, the code will run on the server, and I expect to perform debugging and testing on the server, with WingIDE running on server's desktop.

However machine locations, screens, comfort etc, favor code-writing sessions on luxury Windows machine.  But I want Wing's code completion to work, and consequently I want project files and configuration to make sense when accessed via share, in addition to "locally" on the linux machine.

I of course do not expect the linux-configured project to actually run on the Windows CPU. That is, even if paths are configured so that Windows Wing can see libraries on linux via share(s), those libraries are linux versions and won't necessarily run on Windows.

Is this feasible? What's the general approach? Separate project files for each platform?  Some clever options?

Thanks,  Graham

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to develop on server via file share?

WingIDE - User mailing list


On 18/09/2016 04:13, Graham Wideman via wingide-users wrote:

> Hi folks,
>
> My question revolves around how to set up and use WingIDE to work on a python web project (happens to be django-based, but that's peripheral) such that I can run Wing two different ways:
>
> a) On the linux server's desktop, accessing files locally, or...
> b) On a Windows desktop, accessing files over LAN and Samba (file sharing).
>
> There's no problem with just (a), of course. There's also no problem with a Windows project that just happens to have its files stored on (and running from) a share.  But...
>
> In the case at hand, the code will run on the server, and I expect to perform debugging and testing on the server, with WingIDE running on server's desktop.
>
> However machine locations, screens, comfort etc, favor code-writing sessions on luxury Windows machine.  But I want Wing's code completion to work, and consequently I want project files and configuration to make sense when accessed via share, in addition to "locally" on the linux machine.
>
> I of course do not expect the linux-configured project to actually run on the Windows CPU. That is, even if paths are configured so that Windows Wing can see libraries on linux via share(s), those libraries are linux versions and won't necessarily run on Windows.
>
> Is this feasible? What's the general approach? Separate project files for each platform?  Some clever options?
>
> Thanks,  Graham
>
> _________________________________________________
> Wing IDE users list
> http://wingware.com/lists/wingide
>

Personally I would go for a 3 phase approach:

 1. Write and test the code on the Windows machine(s) and commit the
code to a distributed VCS such as Mercurial or git.  Since you are
writing python almost every library is available for both Windows &
Linux with the same API as long as you make sure that you have the same
version number(s) installed in both/all locations. Just make sure that
you are following best practice by not having any absolute paths. You
can test on your Windows machine with the exception of load testing
including using either a snapshot of any DB or better a specific test DB.

2. Deploy to the/a server, and ideally test in an isolated instance,
using remote debugging if needed rather than shares or using the WingIDE
instance on the server - either by using a remote desktop or by being
physically there. Note that there is no reason why your test instance
cannot be a virtual machine running on your development machine provided
it has a reasonable set of resources.

3. Commit any changes that are required back into the VCS & Push the
changes then in the live instance/server pull the code in and set it
running. Back on your Windows machine(s) pull any changes.

If you write your code in a portable manner, avoiding things like
absolute paths, fixed ports, etc., and the very few libraries that are
not available for both/all platforms then ensure that you manage the
installed libraries & frameworks on both your server(s) and your
development machines to keep them in step you should have no problems.
There are known issues with things like file shares, etc., so using hg
or git is preferable as well of course as the obvious benefits of having
good version control and of being able to roll back your changes if last
minute problems emerge.

--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.
_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to develop on server via file share?

WingIDE - User mailing list
In reply to this post by WingIDE - User mailing list

Very do-able. Look up "remote debugging" in the Wing docs.

What you'll do (in a nutshell) is edit your files in wing-on-windows, and then have a terminal session (ssh/telnet/whatever) open to Linux.  You start your Django server I in the terminal session and wing will work just fine

There are some fiddly bits to getting this just right (file mapping being one, and getting the contents of wingdbstub.py being the other) but once you get that , it's a very smooth flight.


On Sep 17, 2016 11:22 PM, "Graham Wideman via wingide-users" <[hidden email]> wrote:
Hi folks,

My question revolves around how to set up and use WingIDE to work on a python web project (happens to be django-based, but that's peripheral) such that I can run Wing two different ways:

a) On the linux server's desktop, accessing files locally, or...
b) On a Windows desktop, accessing files over LAN and Samba (file sharing).

There's no problem with just (a), of course. There's also no problem with a Windows project that just happens to have its files stored on (and running from) a share.  But...

In the case at hand, the code will run on the server, and I expect to perform debugging and testing on the server, with WingIDE running on server's desktop.

However machine locations, screens, comfort etc, favor code-writing sessions on luxury Windows machine.  But I want Wing's code completion to work, and consequently I want project files and configuration to make sense when accessed via share, in addition to "locally" on the linux machine.

I of course do not expect the linux-configured project to actually run on the Windows CPU. That is, even if paths are configured so that Windows Wing can see libraries on linux via share(s), those libraries are linux versions and won't necessarily run on Windows.

Is this feasible? What's the general approach? Separate project files for each platform?  Some clever options?

Thanks,  Graham

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to develop on server via file share?

WingIDE - User mailing list
In reply to this post by WingIDE - User mailing list
OK, a couple of responses so far, and both contributed interesting info peripheral to the request I made. So thanks for that, but let me point out key elements.

1. The single project's python files, including venv, are on the linux machine, and will run on the linux machine. All source files, libraries and database are local to the linux machine. I have Wing installed on that machine, and could do the entire development work (editing, debugging, testing) on the linux machine's desktop, but for various reasons, extended sessions physically there would not maximally comfortable.

2. I have a nice windows machine that can mount the linux machine's drive(s) as shares and also has Wing installed.  With that I can certainly edit the python files. But it would be nice for code completion and navigation to library source etc to work properly, which would not if the Windows instance of Wing just assumes Windows local paths or attempts to use the paths in the linux-relative project file.  <--- I think that's the key problem area, perhaps requiring two separate project files, each with paths that work relative to the machine on which Wing is running... though that runs afoul of DRY.

The question is specifically not about:

a. Actually running the linux-housed code on the Windows machine.

b. Remote debugging. (It was interesting to hear from Chris that remote debugging works more smoothly than the write-up on the wingware site suggests.. good!)

c. SSH. Yep, I certainly know how to do console activities over SSH.

d. Remote desktop, VNC and the like. I have tried that, and it's marginal. Somewhat sluggish and quirky, clumsy use of desktop space. (Also no doubt varies with particular desktop manager etc. and probably YMMV). Hence not optimal for extended editing, but a candidate for remotely operating Wing on linux for debugging, in preference to remote debugging. Might be some improvements possible, but again not the problem I'm hoping to solve here.

Anyhow, thanks for interest in this question!

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to develop on server via file share?

WingIDE - User mailing list


On 18/09/2016 14:15, Graham Wideman via wingide-users wrote:

> OK, a couple of responses so far, and both contributed interesting info peripheral to the request I made. So thanks for that, but let me point out key elements.
>
> 1. The single project's python files, including venv, are on the linux machine, and will run on the linux machine. All source files, libraries and database are local to the linux machine. I have Wing installed on that machine, and could do the entire development work (editing, debugging, testing) on the linux machine's desktop, but for various reasons, extended sessions physically there would not maximally comfortable.
>
> 2. I have a nice windows machine that can mount the linux machine's drive(s) as shares and also has Wing installed.  With that I can certainly edit the python files. But it would be nice for code completion and navigation to library source etc to work properly, which would not if the Windows instance of Wing just assumes Windows local paths or attempts to use the paths in the linux-relative project file.  <--- I think that's the key problem area, perhaps requiring two separate project files, each with paths that work relative to the machine on which Wing is running... though that runs afoul of DRY.
>
> The question is specifically not about:
>
> a. Actually running the linux-housed code on the Windows machine.
>
> b. Remote debugging. (It was interesting to hear from Chris that remote debugging works more smoothly than the write-up on the wingware site suggests.. good!)
>
> c. SSH. Yep, I certainly know how to do console activities over SSH.
>
> d. Remote desktop, VNC and the like. I have tried that, and it's marginal. Somewhat sluggish and quirky, clumsy use of desktop space. (Also no doubt varies with particular desktop manager etc. and probably YMMV). Hence not optimal for extended editing, but a candidate for remotely operating Wing on linux for debugging, in preference to remote debugging. Might be some improvements possible, but again not the problem I'm hoping to solve here.
>
> Anyhow, thanks for interest in this question!
>
> _________________________________________________
> Wing IDE users list
> http://wingware.com/lists/wingide
>

I still can't emphasis the importance of using a Version Control system
for any development work - using a decent version control system such as
mercurial, (hg), would allow you to develop and test on the Windows
machine then push/pull to get your changes onto the Linux machine for
live testing.  It also adds things like "Such and Such Feature worked
last week and doesn't now I don't know what you changed but get it
working again" - hg & get both have an interesting feature where if you
can give them a range of revisions and a test that passes on the first
and fails on the last they will rapidly isolate the change that broke
the feature.
--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.
_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to develop on server via file share?

WingIDE - User mailing list
In reply to this post by WingIDE - User mailing list
Steve:

Thanks for going to the effort of describing a workflow that's often used for deploying a project from a local machine to a server.  No need to sell me on version control -- I had not mentioned it just because I did not regard it as a constraint or solution for the problem at hand.  In your answer it's part of the solution for synchronizing files on one dev machine with another. Fair enough, though in the scenario I'm addressing I don't have a compelling need to have the code be runnable on the Windows machine, so efforts to make that happen seem like overhead.

Or to put it another way, since the Windows machine can access the files on the linux machine via file-share for editing purposes, I'm not seeing a great return on investment to duplicating the entire project from one machine to the other (and maintaining sync), versus simply understanding how to most easily fudge WingIDE on the Windows machine so it understands the project layout on the Linux machine, for code-completion and navigation purposes.

One point of interest though: You mention "There are known issues with things like file shares, etc.". Could you elaborate what sort of issues you have in mind, and what sort of etc's?  I have worked with Windows sharing files on linux machines for years, and while there are obvious things to bear in mind (for example permissions, slightly different permitted file name patterns), I can't think of any that get in the way of WingIDE on one platform being able to edit the source over a share.

Thanks, Graham

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to develop on server via file share?

WingIDE - User mailing list


On 18/09/2016 21:59, Graham Wideman via wingide-users wrote:

> Steve:
>
> Thanks for going to the effort of describing a workflow that's often used for deploying a project from a local machine to a server.  No need to sell me on version control -- I had not mentioned it just because I did not regard it as a constraint or solution for the problem at hand.  In your answer it's part of the solution for synchronizing files on one dev machine with another. Fair enough, though in the scenario I'm addressing I don't have a compelling need to have the code be runnable on the Windows machine, so efforts to make that happen seem like overhead.
>
> Or to put it another way, since the Windows machine can access the files on the linux machine via file-share for editing purposes, I'm not seeing a great return on investment to duplicating the entire project from one machine to the other (and maintaining sync), versus simply understanding how to most easily fudge WingIDE on the Windows machine so it understands the project layout on the Linux machine, for code-completion and navigation purposes.
>
> One point of interest though: You mention "There are known issues with things like file shares, etc.". Could you elaborate what sort of issues you have in mind, and what sort of etc's?  I have worked with Windows sharing files on linux machines for years, and while there are obvious things to bear in mind (for example permissions, slightly different permitted file name patterns), I can't think of any that get in the way of WingIDE on one platform being able to edit the source over a share.
>
> Thanks, Graham
>
> _________________________________________________
> Wing IDE users list
> http://wingware.com/lists/wingide
>

Graham,

I think that I am a little allergic to people editing code on live
systems having seen it go wrong too many times in the past - either with
bad changes that had a big impact on the systems usability or with
really good, important changes that didn't, or only partially, make in
into the VCS - in some ways this is worse.

Issues that I have come across with file sharing - these are just my
personal ones not an exhaustive list:

 - Cashes that were too slow and said that a write had finished so a run
was triggered which locked, changed or just used the supposedly modified
file.
 - Anti-virus software that quarantined a file (note that I have spent a
lot of time in environments were the developers had no control over the
anti-virus)
 - Windows deciding to index the share
 - Two developers trying to change the same file at the same time
 - A developer, who was also a senior manager, who had a personal copy
of "everything", which was not in sync, and came in at the weekend and
dumped his "better" copy onto the server just after a code freeze for
test development.

As for the "effort" involved with making your code runnable & testable
on your windows machine:
 - In my opinion good python code should always be portable code - any
thing that does not run on Windows and Linux seamlessly is quite likely
to stop working on the next OS or library upgrade - a number of times
the process of getting things running on a different OS has highlighted
problems in the actual code for me.
 - Off line testing cannot provide things like load testing but does
allow you to explore things like crash recovery, attack resistance, etc.
it is also great for demonstrating potential new features.
 - If you are using a distributed VCS and think of a great feature or
problem resolution while travelling, the server is down for a hardware
upgrade or you are otherwise off-line you can still implement & test it.
 - If you are bringing in new staff you can let them try things out
without any risk to the live system.

--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.
_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to develop on server via file share?

WingIDE - User mailing list
In reply to this post by WingIDE - User mailing list
Graham Wideman via wingide-users wrote:

> My question revolves around how to set up and use WingIDE to work on a python web project (happens to be django-based, but that's peripheral) such that I can run Wing two different ways:
>
> a) On the linux server's desktop, accessing files locally, or...
> b) On a Windows desktop, accessing files over LAN and Samba (file sharing).
>
> There's no problem with just (a), of course. There's also no problem with a Windows project that just happens to have its files stored on (and running from) a share.  But...
>
> In the case at hand, the code will run on the server, and I expect to perform debugging and testing on the server, with WingIDE running on server's desktop.
>
> However machine locations, screens, comfort etc, favor code-writing sessions on luxury Windows machine.  But I want Wing's code completion to work, and consequently I want project files and configuration to make sense when accessed via share, in addition to "locally" on the linux machine.
>
> I of course do not expect the linux-configured project to actually run on the Windows CPU. That is, even if paths are configured so that Windows Wing can see libraries on linux via share(s), those libraries are linux versions and won't necessarily run on Windows.
>
> Is this feasible? What's the general approach? Separate project files for each platform?  Some clever options?

Making this easier is a major focus of Wing 6.  You may want to wait for
Wing 6 beta2 to try that out.  It lets you configure a remote host,
which you would do on the Windows machine to point at the Linux machine,
and then you can work with files on that remote host as if they were
local (including debugging, searching, version control, project
operations, unit testing, using the Python Shell remotely, etc... all
the features in Wing).

Don't bother trying Wing 6 beta1 (the current release) for this, since
this capability was still too broken there.  We'll announce beta2 here
when it's ready.  You will need to install it on both the Windows and
Linux machines (later, it'll auto-install on the remote machine).  Also
at least for now on Windows you will need to use Putty to first set up
working password-less SSH using Pageant key server so Wing can establish
the SSH tunnels it uses for this (we may try to support Bitvise in the
future, but there are issues w/ it that make it harder to use).

For Wing 5 we recommend running Wing on the Linux machine and
remote-displaying it via X11 server to the Windows machine as the best
option.

Thanks,

--

Stephan Deibel
Wingware | Python IDE

The Intelligent Development Environment for Python Programmers

wingware.com


_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to develop on server via file share?

WingIDE - User mailing list
In reply to this post by WingIDE - User mailing list
Mostly responding to Steve:

>I think that I am a little allergic to people editing code on live
>systems

Yep. As noted in subject: "develop on server"... the linux box is a dev server. So no editing of live production code.

>Issues that I have come across with file sharing - these are just my
>personal ones not an exhaustive list:

Thanks for listing these, allowing me to verify that none apply to the situation at hand. Except I've made a note to fire any senior managers with copies of the code. Oh wait, that's me!  :-)

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to develop on server via file share?

WingIDE - User mailing list
In reply to this post by WingIDE - User mailing list
Just following up for those interested in this discussion, now or later.

Stephan at wingware, (in direct email) alerted me to this:

http://wingware.com/doc/debug/file-location-maps
http://wingware.com/doc/debug/file-location-map-example

... which is pretty much exactly what I was imagining.

Although it's under the breadcrumb path .... > Remote Debugging, the part of interest is the "file location map".

This feature is present in WingIDE 5.x. I get the impression that it will be less useful (perhaps completely replaced) in 6 by the more substantial "remote development" features that Stephan described in his message to the list on 9/19.

Anyhow, question answered, though motivation somewhat diminished by the prospect of impending superior features.

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Loading...