chadrem / officer Goto Github PK
View Code? Open in Web Editor NEWRuby lock server and client.
Home Page: http://remesch.com/2011/01/23/officer-the-ruby-lock-server-and-client/
License: MIT License
Ruby lock server and client.
Home Page: http://remesch.com/2011/01/23/officer-the-ruby-lock-server-and-client/
License: MIT License
Hello there,
I Am trying to use this via PHP.
There are a few things that i wondered.
If, for some reason there would be an faulty command, or bad json, the connection gets closed.
It would be much nicer if the response could be a something with an error in it.
like {"error":"Invalide Command"} or something like that, maybe even with error codes etc...
Also, i did some testing, and trying to unlock a lock that is not set by that connection will also close the connection. In some situations it could be handy to unlock a lock that has been set by someone else, like usage for semaphore.
But still, if it would not be permitted to unlock a lock of someone else, it should not close the connection.
here is the scenario, where officer does not release lock held even after the client is long gone.
machine 2 was connected to machine 1 using the wireless network in my case.
disable wireless on machine2 .
kill client on machine2
notice that officer stills reports a lock is being held from machine2(waited for > 4minutes)
enable wireless network & restart client => now the client hangs waiting to acquire a lock as officer stills report lock is being held from machine2.
hence the state of locks is not updated properly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.