Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I want show a message to the user when more than one login is performed. For example, a user called John is logged into Computer A. Now John logs into Computer B. In this case system should show a message to John on Computer A that another login has happened.
In my opinion, this could be done using a push notification service such as Pusher or Firebase Cloud Messaging. Is that correct? or is there another way of doing this.
I'm storing the user's sessions in the database as soon as the login is performed so I can fire an event when more than the desired logins are performed.
Yes, Laravel pretty much as the basics built in to allow for this. If you look into the default boostrap.js file Laravel ships with, you can see the code is already there: see https://github.com/laravel/laravel/blob/master/resources/js/bootstrap.js#L32-L41
If using Laravel's echo server you've broadcast events as described here. Within your application you'd listen for events as explained here
You could also make this even simpler (although I'd recommend websockets).
You could stgore "active" logins in your database and display a message based upon that.
Note that you can avoid multiple logins. When logging out you invalidate other sessions. This feature is built into Laravel, see here.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
Im currently new to end to end testing and planning to do load testing for a website I am currently working on. Im currently looking into jmeter and studying how to use it. My question is, would it make sense to only use one credential for the test? So basically I will be using my credentials then would throwing same HTTP requests multiple times to the server to simulate several users logging in and using the website.
Also if there are other ways to do load testing without using more than one credentials would be helpful!
Thanks in advance for the help!
It depends on your use cases and your site implementation, possible problems could be:
The site may not allow multiple logins under the same credentials like subsequent login will "throw out" the previously logged in user(s)
Depending on how session is being established/maintained you may receive the same Cookies for the same login
Most probably you will be able to implement browsing, but CRUD operations can be a big question mark
From JMeter's perspective it is not a problem to use only one account, any constraints will be on the system under test side.
Ideally you should treat each JMeter thread (virtual user) as the real user and it worth creating that many users as you plan to simulate and use CSV Data Set Config to parameterize your JMeter test so each virtual user could have its own credentials
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
What is the benefit of having different projects (console) than having a single project for all your different apps.
i.e
I have one project that is used for googlesheet auto update
I have another project that is used for google email automation
I have another project for scripting google Maps
vs a single project that is used for the sheet autoupdate, email automation and maps api.
Are the apps sharing quota limits?
The bigest thing in my opinion is the consent screen. When you request access from a user you are requesting access as an application
Now in this instance Google Oauth 2.0 playground would like permission to access my data. As a user i would assume then that only Google Oauth 2.0 playground would be accessing my data and not Super awesome other application under the same project.
Second issue will be quota. A number of the quotas are project based. So if you have a max of 50000 requests that the project can make and you have two different applications using with well. You are going to run out of quota twice as fast.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I'm using phoenix controllers to receive data via REST calls. So an iOS app could send the "events" for each user and based on the event, I need to calculate the score/points and send it back to the user. Calculation and sending back to the user can happen asynchronously. I'm using Firebase to communicate back to the user.
What is a good pattern to do calculation? Calculate could be bunch of database queries to determine the score of that event. Where should this calculation happen? Background workers, GenEvent, streams within user-specific GenServer (I have supervised GenServer per user).
I would look at Phoenix channels, tasks and GenServer.
Additionally, if you would like to manage a pool of GenServer workers to do the calculations and maybe send back the results for you, check out Conqueuer. I wrote this library and it is in use in production systems for my company. It is uses poolboy, which is probably the most pervasive pool management library in Erlang/Elixir.
Admittedly, I do not fully understand the requirements of your system, but it does not seem to me GenEvent has a place in your requirements. GenEvent is about distributing events to one or more consumers of events. So unless you have a graph of processes that need to subscribe to events being emitted from other parts of your system I do not see a role for it.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Is there a web page based version of vb6's Winsock?
I want a web page to send a message to a vb6 program on a different PC.
Any Examples would be great help, thank you
Short answer: No.
Longer answer: You could create a VB6 ActiveX control, but it would be impractical to use due to security lockdown in most IE instalaltions and lack of support in alternative contrarian browsers.
Real answer: You are probably going to look at using some sort of scriptable HTTP Request component (such as XmlHttpRequest) though you must consider cross-domain request security even then. The "VB program on a different PC" would need to be an HTTP server or run under one via classic ASP, as a CGI application, etc.
And of course there would need to be a path from the client web page to the server (i.e. you have firewall and NAT issues to address) in any case.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want the service to automatically send data to the phone when a row on a particular table is updated, how do I do this?
Step 1)
Create an application on your phone that supports push notifications.
Step 2)
Create a webservice (inside Azure) that you send your notification token and uri to plus some type of message that contains the stuff you want to monitor. Store that subscription somewhere, azure tables comes to mind.
Step 3)
have a worker role monitor the Azure database and the azure table of subscriptions to send out updates to your phone.
Monitoring for changes can be done in a number of ways, Sync framework is one of them. But it might be easier to use a a service + queue to isolate access to Sql Azure and then automatically send the push message to the phone if needed.