Comments (10)
Yes, please. It's really bad to use Firebase in this way.
from firebase-php.
it's relatively easy to implement, please feel free to fork the repository and send a pull request if you want to have this functionality immediately. otherwise i'll examine the best possible implementation soon. thank you for your suggestion.
from firebase-php.
@ktamas77 Too busy with midterms 👎
Waiting for your solution :) Thank you for fast response
from firebase-php.
Just opened a pull request that adds Keep-Alive support. Please test. Thanks.
from firebase-php.
I added your method + fsocks multi set method. #16
And good for news who needs amazing write speeds !
- Added parallel curl with shell_exec; only works in linux ( i guess ).
But you have no control after setting data, no callbacks no tracing etc.
Some stats (on digitalocean vps - ubuntu 12.04 )
- [default] 50 set request with set method [ it using cURL ]=> 30sec
- [mine]50 set requests with set_multi method [ it using fsocks ] => 12 sec
- [mine]50 set requests with set_fast method [ it using cURL with shell exec /
parallel ] => 0.4 sec
from firebase-php.
Amazing speed is great and all, but I'm not sure whether it should be the job of an API client library to handle parallelization through platform-specific shell commands. Parallelization should be the job of a different library, of which PHP already has plenty.
Not to mention this opens the door to all sorts of nasty security bugs. (addslashes? seriously?)
The fsockopen version looks cool, though. Could you add Keep-Alive support to that? It seems wasteful to close the socket after every request. As long as you don't need to read the responses, it should be just as fast as, if not faster than, the shell_exec method. Forking a shell is kinda expensive.
Anyway, just my $0.02 as the original opener of this issue. Of course @ktamas77 will have the final say.
from firebase-php.
@kijin haha you're right :)
in push request i mentioned :
Be careful it contains shell_exec method and json_data ( may contains your user inputs ).
so if you are not trusting to data, I suggest you to sanitize it carefully.
What is 0.02$, i don't understand.
(i'm newbie in version controlling and github. Sorry if I made mistake )
from firebase-php.
What is 0.02$, i don't understand.
Haha, it's just an American idiom, "my two cents".
from firebase-php.
@kijin
Dude, i just added keep-alive support for fsocks and removed shell_exec method. #16
You have to try it 👍 IT'S AWESOME !!
from firebase-php.
I agree, it's a nice improvement, please see my comment on #15 and #16
from firebase-php.
Related Issues (20)
- How to set the app or version
- how to set name in push?
- Recommend switching to `kreait/firebase-php`
- FirebaseLib HOT 1
- Git push is removing firebase_php folder. HOT 1
- Firestore Usage HOT 1
- Cannot use Database and Auth together HOT 1
- Slow query HOT 8
- firebase connection in php HOT 1
- Firebase created a new authentication HOT 2
- how to authenticate user using email and password
- i got "Permission denied" error
- firebase query "equalTo" doesn't work with "+" symbol HOT 1
- Setting value to 0 (number) is not possible HOT 1
- Credentials provided by firebase HOT 1
- No logging in firebaseLib
- I got 3 arduino devices with same code with same php code using this Lib but in firebase it only update 1 data not simultaneously those 3 devices it requires other device to be turn off so it can be updated HOT 5
- Getting unexpected error code 0/null/100
- Composer with php7.3 first time install issue: HOT 1
- Requirements? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firebase-php.