Transition to scaling out with signalr and redis from signalr and sqlserver - asp.net

I am currently testing signalr with sql server as my backplane. If I switch sql with redis, how would I be able to incorporate sql database in that design via programming not set up.
For example My stored procedure saves user profile properties like (height, interests), now when i need to grab that information into an object along with data in redis(how many likes a photo has within that user profile by providing the user profile as a key).
I initially had sql server doing the work where I edit the number of likes on the table and bam, it pops up automatically with signalr like it supposed to.
Now because of performance reasons I would like the same results, except having redis storing the likes of the user profile, and sql persisting the rest of the user profile object.
Sorry if I confused anyone, let me know and I will re-edit immediately.

Related

Can we connect a web application to ONA ODK forms?

Can we connect a web application to ONA ODK forms ?
I need to replace a system where employees goes to field, collect information, and then sync to database when they come back.
What we need is to find a solution, by creating odk surveys, let the employee collect data, and then sync directly to ona and mysql database. And I need to give them the ability to read and edit data directly form the forms into database.
I know the idea is a little bit strange.
You should ask this question in ODK Community and as you want a solution for sending data that can be done by the cloud-based server like google cloud and for editing data. It's not a good practice to edit data in a raw dataset. You can download data from the server and then you can make a change in your computer.
Even if you want to give them access to the server so they can log-in and make a change on the server, you can create a username and password so they can update their records.

session vs profile to store userID in an extremely simple vb.netapp

I am building an extremely simple VB.net web application that uses Visual Studio's forms authentication. As part of this- I am trying to capture the userID upon login and use it while the user is in the app (to dynamically display information via dataset/gridview that is associated with that userID) so I don't have to give them their userID and prompt them for it constantly.
The app is very simple and uses a local DB to do all the authentication (Users, User_Activation, Roles)
This app will have 9-10 users that will be consistent over the years(logging in 10-15 times a year), and 40-50 rotating users that log in once or twice and do not return past that year.
The profiles and authentication/sessions do not need to handle tons of users and authentication requests.
I also want to avoid cookies because I want to keep everything as simple, and centralized to the application as possible.
I have explored building a GetUserID function that queries the database based on the userName every time a user takes an action (button click, page load) that requires the userID. But I am having trouble with the SQL and it seems bulky.
I have also looked into sessions- but they seem unreliable and difficult to manage.(How do i keep each session separate as users login?)
I am now looking at Profiles
https://msdn.microsoft.com/en-us/library/2y3fs9xs.aspx
https://msdn.microsoft.com/en-us/library/system.web.profile.sqlprofileprovider.aspx
I think I can just use the default instance of the SqlProfileProvider and point it to my database I already have built?
I am very new to programming and am not sure how complex the configuration would be for the Profiles, so any guidance or advice would be greatly appreciated!
I can post any code snippets needed, or upload the app to github or something if that helps at all.
Thanks!

How can i store data in database in android application on Qt?

I have made one android application in Qt.that employee registration form application. where i distribute this app to other employee they will details (like name, age, salary etc) and that data will be save in one database so where i can access it.
is anyone have idea about?
thanks
As you are looking to store employee details entered in many mobile devices in one place you will need to have a database your app can all write to.
One way would be to have a server running something like MySQL and a web server. You send the data from the mobile app to the web server using an HTTP POST and some code on the server extracts the data from the POST and inserts it into the database.
If you need to show the data in the database on a mobile app, you can use an HTTP GET adding parameters to the end of the query. Some code on the server interprets the GET string, extracts data from the database and sends it as part of the result.
There will be a temptation to connect directly from your mobile app to the database on the server using something like ODBC. Don't do this, its a bad idea. Always have an intermediary application on the server side to give you some insulation against database attacks. If your application is for more than just internal company use, consider having the database on a separate server and configured to accept connections only from the web server.
As you are sending personal and private information (age, salary etc), ensure you encrypt your data properly when its "in flight".
Hopefully this will give you a few pointers to get you started. The question is really quite broad.

Oracle trigger audit - How to log App user

I'm constructing a website.
In this website, people will be able to manipulate several DB tables data.
Everytime someone wants to make a CUD operation I want to log it (like and audit).
The way I see it, I should use triggers for CUD operations, but I can't understand how do I log the user, since triggers don't accept any input parameter.
NOTE: the user I want to log is the network user. I know this user when they access the website (user to log <> user logged to DB).
ANOTHER NOTE: None of my tables saves creation date, creator, update date and updator. Just don't know why they should when I have the audit tables.
So this is the basic problem with web apps. If you have a huge user base ( more then say 500 ), then provisioning them in the database, while this is very easily doable, it is something most web programmers, sadly, don't want to deal with and want only ONE connection user for the database. You have already shot yourself in the foot because you don't have the created_by,modified_by, created_date, modified_date in the tables. To fix this you really only have one choice:
Put the columns on the tables and force the UI people to push the "network" user name through. The rest of the columns can be handled by one very simple trigger.
Why DB audit will not help you:
The DB audit feature ONLY deals with users defined as actual users in the database, sorry that is just the way it is.
Here are some things to look at when dealing with a front end system.
You can write SP's or Packages that execute as the schema owner, but can be run by ANYONE who is defined in the database and those can handle all the INSERT, UPDATE, DELETE operations on the schema they are defined in by simply giving other users the EXECUTE privilege on that set of SP's. This give the DB fine grain control over how tables are manipulated and you only have to grans the select privilege to all the users.
You can write a SP or Package in the SYSTEM schema that allows a group of people to provision users on the system by granting the execute privilege on that SP. Within that SP you define what ROLES they are assigned and therefor can control all their access.

How to use system_user in audit trigger but still use connection pooling?

I would like to do both of the following things:
use audit triggers on my database tables to identify which user updated what;
use connection pooling to improve performance
For #1, I use 'system_user' in the database trigger to identify the user making the change, but this prevent me from doing #2 which requires a generic connection string.
Is there a way that I can get the best of both of these worlds?
ASP.NET/SQL Server 2005
Unfortunately, no. Identifying the user just from the database connection AND sharing database connections between users are mutually exclusive.
Store the user from your web application in the database and let your triggers go off that stored data. It might even be better to let the web app handle writing all logging information to the database.

Resources