Sunday, May 01, 2011

Taking Revit Server "off-road"

Borrowing from the title of a recent post by Mr. Revit OpEd I wanted to bring up what I think is a rather critical point to be aware of if you're thinking of running Revit Server on your laptop to solve what is often termed the "Construction Trailer" problem. I've been in touch with the two sets of folks who I know have installed RS on a Win7 computer, that is Mr. Baldachinno and Mr. Cone (Beck / Aaron Maller). For David its an experiment in "low cost" servers for a small company. For Kelly & Co. its an attempt to make an easier way for users in a construction trailer to work on their Central Files.

What I want to highlight is if you're running RS on your laptop, so you can "work" on your central files live over the Construction Trailer's DSL connection with a VPN tunnel, is that your user(s) need to learn how to shut down Revit Server gracefully. The very clear and present danger here is that a user in the trailer, simply turns their computer off, or worse yet, "pulls the plug". I can guarantee that you're playing with fire here if your users do that. There is a good chance that at some point they'll corrupt some or all of the Revit data cached locally to their  "server". Autodesk has some clear instructions on how to shut down a Revit Server properly, the problem is, that it involves locking the whole infrastructure while you take down whichever local server you're shutting down. The good news here is that there is a much smaller risk to the data on the actual Central Server. It does a good job of protecting itself and the data it is responsible for, so a Local Server suddenly going off-line should* not affect any of the data at the central server.

Just a word of caution for those attempting to push technology to the bleeding edge and not just the cutting edge.

*Note, I say should, there are conceivably instances where the sudden shutdown of the client or the local server might cause harm to the Central Server data store, but theoretically these should be pretty remote. Worst case is that a lock is left in place on the Central Server due to the "user" disconnecting in the middle of an operation. Keep in mind that when a user SWCs data is committed directly to the Central and Local Servers, and the data is not committed to the project data store until the transaction is 100% verified.

16 comments:

soender said...

And I have sadly had the last worst case happen, as both our power and UPS for the server failed. You certainly don't want that to happen. "Luckily" I was not at the office, and the users made a mess. Everything was locked up, and I could not use the "Revit Admin" tool to lock/rename/move the file - could only be access the hard way through the server. Took a few days to clean that one up.. :)
I'm sure development is having a blast, going through our server logs and my journals.

David Kingham said...

We've been using Citrix for quite a while now and have been very successful as long as we're working over a decent connection but at some jobsites the connections are very slow, could RS possibly be used at theses sites or do you still need a fast connection to use this effectively?

Robert said...

RS likely has a higher tolerance for latency then your Remote Citrix app as it should be moving far less data then any type of Remote Desktop experience. What I've been told/deduced is that up to 100ms a user is not going to notice (in terms of Rvt server) between 100 - 200ms users are more likely to notice some "sluggishness" and beyond 200ms performance will probably not be acceptable. Which is different from saying it will not work as there is a clear distinction between "working" and acceptable performance to do your work. With regards to the "construction trailer" issue, if the user only gets permission for elements across the WAN, but does not attempt to cut a local file or Sync their changes back to central it will likely work very well. Those two operations are the most demand heavy in terms of bandwidth and latency. So as long as they cut a local before leaving the main office, and SWC when they get back, it could work very well (as long it does not hold up other people attempting to work on the model at the same time). We had a Project Manager who took that approach in the evenings when working on a project, he was able to do effectively do the door schedule at night and check things in the model. However he was first out and first in just about every day so he never held up his team by keeping element locks for an extended period.

Rod Howarth said...

Hi Robert,

After seeing this post I decided to make this utility:
http://rodhowarth.com/Downloads/Software/RevitServerMonitorv0.1.zip

It sits in your tray and shows a red arrow if the revit server is communicating with anyone, and a green arrow if its safe to disconnect.

It does this by monitoring port 808 which Revit server seems to use to communicate data, so to run the program you need to install winpcap (included in the zip) then just run the program.

It'd be great if anyone interested could test this and tell me how it goes, if all goes well I'll write up a blog post about it to advertise it to a wider audience.

Robert said...

I checkout Rod's utility, seems to work. .Net 4 is required and the WinPcAP library checks out. I've seen Rod posting on AUGI too.

Rod Howarth said...

Source code is here by the way, in case anyone is worried about what it might do:
https://github.com/RodH257/RevitServerMonitor

I can probably change the .NET dependency back to 3.5 as well, will do that in my next version.

Robert said...

Rod, thanks for your contributions to the community!

Jose Guia said...

Robert,
Quick question, shouldn't one other concern be mentioned and that is the size of the server models, if a firm for example has 20 models averaging about 100 megabytes, doesnt ALL of the data get synchronized down regardless if the local server has opened it or not?

I would imagine that could easily fill up a notebooks hard drive.

Jose

Robert said...

Jose,

Revit Server will only synchronize data that has been "called" to the Local Server. So a firm has offices A, B, C, D, & E and A has the Central Server. If offices B & C work together on Project X, then the data will be on A, B & C's servers respectively, but not D & E. if D & E work on project Z then the data will be on A, D, & E. If A works with D on Project Y, then once again the data will only be on A & D until such time as another office "calls" that additional data. So, if a user has RS on their laptop and they only open the models they need to open, and not others, then they should be ok.

The other thing to keep in mind is that RS only caches the model data to the Local Servers. The Central server still contains all of the permissions and element table data. The data on a local is what would effectively compose a Revit file without worksharing (more or less) if you could re-assemble all the parts manually.

Rod Howarth said...

So I'd guess that the first time you open a model on a new local server, the process takes quite some time (depending on internet connection), but after that it gets much faster?

Robert said...

Correct. Depending on the size of the model(s) and bandwith and latency of the connection to the Central Server it could take quite some time the first time a user opens a model. However, it is possible to manually pre-populate the cache data on a local if you know what you're doing.

Also, keep in mind that if the file being opened has linked models also on the Server, then those models will also have to copied down from the Central to Local unless they have previously been opened by a user connected to that local.

Dave Baldacchino said...

Thanks a lot Rod, will try your goodies when I get a chance.

I didn't know that the Local server did not house permission info. Interesting. Thanks also regarding the comment about port 808. If that is the only port used to transport data, then a "public" Revit Server behind a pin-holed firewall (port 808 re-direct to the server) is very possible.

I wish Revit server administrator had a way to help clean up a Local Server. For example if a satellite office is done working on a particular project, I would like to easily take it off their local server so it doesn't sync any longer, thus cuting down on wasted bandwidth. I tried deleting the cache files manually but it wouldn't let me as the team was still actively working in the main office where the Central server is located (no one was doing any work on the local, which is what I wanted to delete) so I probably have to do it when everyone is out of the project. Locking the project in the Admin. panel will most likely prevent me from deleting so that won't be a solution I think. I noticed that even if you "touch" a file in the open dialog by highlighting it (through opening from a Local server), it will immediately start caching but have not verified whether once that happens and if the user aborts, whether syncing will happen automatically regardless from then onwards.

Robert said...

Sorry David on not posting your comment sooner! My bad!!

I would not assume that 808 is the only port used, it is probably just a good port to listen to in terms of data transactions. I'm assuming Rod did some port snooping and he settled on that one as being a good choice for what his utility does. I might also add that I think Rod's utility might be giving the dev team the chills a bit, but that is ok, got to keep them on their toes... :-)

If you using RS '12 then I believe they cleaned it up such that if you delete a file from the console (assuming no one is working) then it will clean-up itself from the Local Server(s). However if you want to stop replicated to a specific site (Local Server) then you have to go a bit further. I would recommend locking the whole infrastructure, then logging into the LS console and delete the file's folder from the Cache directory. If you're "off-road" then you can effectively clean-up your cache anytime you are off-line from the RS infrastructure. The Central Server does not track what data Local Server are caching, that is left to each Local on its own.

Rod Howarth said...

Yeah I did a port snoop (and looked around IIS) and port 808 is the main port for data, however I believe HTTP and possibly HTTPS are also needed to be opened, but those seem like the only ports used from what I could tell. Needs thorough testing though

Troy Gates said...

Just wanted to add that you can initiate a sync of a project to the lcal server by merely clicking on the file in the open dialog. You'll notice a slight pause when you click the file. If you check the local server's cache location, you can see it has started caching.

Dave Baldacchino said...

Yes Troy, that's the exact observation I mentioned in my comment. As to deleting the cached info of a project that is no longer being worked on by a Satellite office, I had to have everyone exit from that project and then do a manual deletion.

As for the ports used by Revit server, I observed a lot of other associated ports, some in the 50,000 range if I recall. When I get a chance I will try shutting down the server services and see what ports are open, then start services and see which additional ones open up.