|
Pete,
I dusted off this idea I think I'm going to put together a prototype, but I wanted to respond to your points before I do and see what you thought...
Pete O'Hanlon wrote: Some thoughts for you to consider (based on having worked on apps that faced these issues in the past):
I too have done locking mechanisms. They usually involve writing to a locking table. My idea here removes that table from the architecture, but the issues you pointed out still exist. Here's my thoughts...
Pete O'Hanlon wrote: What would you be sending out a lock message on? When a user starts editing?
I would think an Edit button of some sort would be the initiator. The button is disabled until a SignalR message says the record is no longer locked, at which point it becomes enabled. Clicking it performs a lock.
Pete O'Hanlon wrote: What about the situation where someone takes out a lock but the application crashes so that they don't release the lock? What strategies are you going to put in place to handle this? There's a similar situation where the user starts an edit and then takes a phone call so that they keep this record in an editing state for a period of time?
The basics of the hub would have methods to add/remove a lock using the View Name and User Name, and a method to remove all locks for a user. On startup all preexisting locks for a user are removed (in case they previously crashed) and the app would need an administrator function to do the same.
Pete O'Hanlon wrote: What about if you are editing a record that is used as part of a relationship? A lookup table value for instance? Will the consuming applications need to be aware that the record may be changing?
I've always assumed that if a parent view is locked, then so are its child views.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Like.
WebSocket can be a b1tch.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Kevin Marois wrote: do you guys think this is an idea worth of writing up?
Absolutely.
BTW, my dabbling with SignalR was a great experience. It "just worked." Used it for notifying clients on desktop and tablet devices. Very very cool.
I think the record lock/unlock notification is a really unique and interesting idea! Go for it.
Marc
|
|
|
|
|
If you stab someone during an argument, does he finally get the point?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Not sure, but he probably works up a good thirst for some tang.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
modified 14-Feb-17 12:38pm.
|
|
|
|
|
If you use your rapier wit, then yes
|
|
|
|
|
It would certainly be a cutting remark.
veni bibi saltavi
|
|
|
|
|
What a cutting remark!
EDIT: argh - beat by Nagy
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
Livin' on the edge are we, Griff?
... such stuff as dreams are made on
|
|
|
|
|
"Why a spoon, cousin?"
"Because it hurts more, you twit!"
Software Zen: delete this;
|
|
|
|
|
I see you've played knifey-spoony before.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I hear what you're saying and I do not wish to be blunt... *stabs with knife*
|
|
|
|
|
Huh, I was expecting a Ceaser joke in there somewhere.
if (Object.DividedByZero == true) { Universe.Implode(); }
Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
|
|
|
|
|
Lets back up a minute. What are you trying to say, Brutus?
Mongo: Mongo only pawn... in game of life.
|
|
|
|
|
He ate two?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Don't let any of the other comments strop you from posting these sharp remarks. Admittedly serrated a bit low as far as posts, go, what keen you do?
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
|
Yeah! And if you shoot him, does he bite the bullet?
Get me coffee and no one gets hurt!
|
|
|
|
|
To all you beautiful girls out there... happy Valentines day.
To all you fat birds... chin up, it's pancake day next week...
[SORRY]Don't shoot the messenger - it's from my mate, the stand up comic who should probably remain seated and is not very funny.[/SORRY]
|
|
|
|
|
R. Giskard Reventlov wrote: chin up Which one?
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
All of 'em!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
How about handsome boy?
Bryian Tan
|
|
|
|
|
|
A basic extension method to implement min (yes, I know there's Math.Min, but I want a fluent implementation, so just go with it):
public static int Min(this int a, int max)
{
return (a > max) ? max : a;
}
But what would be a good name for this (which I've tentatively named "MinDelta":
public static int MinDelta(this int a, int delta)
{
return a > a + delta ? a + delta : a;
}
Suggestions? Humor?
Marc
|
|
|
|
|
Oranges
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|