I am working in MS Sync Framework 2.1 .I have 15-16 table that i need to synchronized.
I am doing code(in win form C#) which is work fine.I created provisions for each of the tables.
My code work and sequentially sync up one by one tables.Application takes approximately 10 min for download 9500 records from remote database server .But its seemed too slow. How i can speed up downloading records ?.
Can i use thread to downloading records, so all threads work parallely and might be application time will be decreases for download.
Is it thread safe or is server might be crash if hit rate (requesting data by applications) is increase?
How i can increase application speed for downloading record in winform C#
enable Sync Framework Tracing and have a look at where its spending most of its time, then decide how to optimize that part.
Related
I have a sending application that sends a command via an anonymous pipe.
I have a receiving application that receives the command, handles it, and returns a result.
The sending application receives the result.
I can time the length of the complete operation in the first application (steps 1-3). I can also time the handling of the second application that executes the command (step 2).
Looking at both logs I can subtract the time for step 2 form the time of step 1-3 and assuming that the sending application doesn't waste any time, I now know how many time for the transfer was used.
Is there any way, that I can sync both logs in some way, that both logs show the same time-token in msecs. Or to sync all operations in some way, that I can see all timing in the log of the first application.
I know that the applications need some special commands to sync them in some way. But this would be possible, but I have no clue if this is possible at all.
Or the question in other words: Is it possible to time everything in application 1 without looking on both logs individually.
Best possible result:
I know the time that is used for the i/o (pipe)
Time of code executed in app 2 (without i/o)
Time of code executed in app 1 (without i/o)
Further information: The applications run on different machines. Even in different networks connected via VPN.
Similar to what Joseph Larson suggested, but without concern of clocks to be synchronized: could you just append a time spent in app 2 to the result it returns? Then log it from app 1, together with total time.
I'm trying to modify a game engine so it records events (like key presses), and store these in a MySQL database on a remote server. The game engine is written in C++, and I currently have the following straightforward architecture, using mysql++ to directly INSERTrecords into appropriate databases:
Unfortunately, there's a very large overhead when connecting to the MySQL server, and the game stops for a significant amount of time. Pushing a batch of Xs worth of events to the server causes a significant delay in gameplay (60s worth of events can take 12s to synchronise). There are also apparently security concerns with leaving the MySQL port accessible publicly.
I was considering an alternative option, instead sending commands to the server, which can interact with the database in its own time:
Here the game would only send the necessary information (e.g. the table to update and the data to insert). I'm not sure whether the speed increase would be sufficient, or what system would be appropriate for managing the commands sent from the game.
Someone else suggested Log4j, but obviously I need a C++ solution. Is there an appropriate existing framework for accomplishing what I want?
Most applications gathering user-interface interaction data (in your case keystrokes) put it into a local file of some sort.
Then at an appropriate time (for example at the end of the game, or the beginning of another game), they POST that file, often in compressed form, to a publicly accessible web server. The software on the web server decompresses the data and loads it into the analytics system (the MySQL server in your case) for processing.
So, I suggest the following.
stop making your MySQL server's port available to people you don't know and trust.
get your game to gather keystrokes locally somehow.
get it to upload that data in big bunches when your game is not in realtime mode.
write a web service to receive and interpret these files.
That way you'll build a more secure analytics system and a more responsive game.
I have a fairly large Windows application (about 10 years old, written in c++) which works with SQL2000 Express (MSDE). It operates with database pretty extensively, but doesn't have performance issues. Due to SQL2000 MSDE compatibility issues with Windows 7/8 I want to migrate the application to SQL2014 Express.
All database access code is written in t/sql and as such the application migrates to SQL2014 without any code changes and all features work as expected. Except it's so badly slow it makes no sense to use the application under SQL2014. All select/update/insert queries take about 5-20 times more time to execute.
These are connection strings that I tried:
Provider=SQLOLEDB;Data Source=localhost\app;User ID=app_user;Password=password;
Provider=SQLOLEDB;Data Source=localhost\app;Trusted_Connection=yes;
I don't convert SQL2000 database to 2014 as the application creates a new database from scratch from scripts on its first run. Nothing fails, the default DB size is 12MB, the schema is pretty well optimised.
I also tried the same under SQL2008R2 Express - it's as slow as SQL2014 Express. Tried different PCs under Windows 7/8/8.1 - all the same.
The main detail which I noticed is that when I run the application under SQL2014 the most CPU consuming process in Windows Task Manager is "Local Security Authority Process". This process doesn't appear in Task Manager at all when I run it under SQL2000 MSDE and the application runs much faster. I guess LSA may be very heavy processing my "open connection" requests, but I don't know what to do about it.
The application is written is a way that it doesn't keep connections open, but creates them on demand and then releases. I tried to run SQL 2014 service under different accounts - it made no difference.
This process doesn't appear in Task Manager at all when I run it under SQL2000 MSDE and the application runs much faster. I guess LSA may be very heavy processing my "open connection" requests, but I don't know what to do about it.
Typically, lsass.exe (LSA) been used by IPSEC Services(PolicyAgent),
ProtectedStorage and Security Accounts Manager(SamSs)
Try to disable IPSEC Services(PolicyAgent)
I have a mobile application integrated to a server where users can see tasks assigned and close the task request after work. In this project timing is very important, at least ones in a minute program should check if a task is assigned. Moreover mobile should also check the server if there is a change on the task that it already downloaded.
Because of the nature of the project download amount is high. How can we reduce it? Should we use another technology for server communication (Now we use ASP.NET Web Service Application)?
Thanks in advance.
Use JSON instead of XML Server.
Try using selective sync options like instead of complete tasks sync as it would become slow with higher number of tasks.
Mark task changes locally on mobile. mark entities dirty and then only update marked tasks to cloud/Server.
as SLaks suggested use push instead of pull it will save mobile battery and user's data package.
Here is what can help you:
Microsoft Sync Framework.
http://msdn.microsoft.com/en-us/sync/bb887608.aspx
http://weblogs.aspnet05.orcsweb.com/sbehera/archive/2009/04/10/sync-framework-for-windows-mobile-devices-amp-some-use-full-links.aspx
i am developing a turn based multiplayer game with flex and blazeds.
Problem is that i read that the blazeds can handle only hundereds of concurrent users,but this can be increased by using nio server like jetty 7 and servlet 3.0.
does Tomcat 7 supports nio? and i wonder if i can increase concurrent user count by using tomcat 7and blazeds to a few thousands.
Any clue or help will be appreciated.
Thank you.
Do not worry yet about performance. If your game will be successful you will be able to afford the better technical solution. If not, it will not matter if you can handle 1000 or 1000000 requests.
However, related to your question - you may be able to increase the number of concurrent users by doing server related tunings (like stack size, increase the size of the thread pool).
There a couple of solutions implementing Servlet 3.0 (NIO), but you will have to write your own BlazeDS NIO endpoint - so it does not work out of the box.
Edit:
Using the NIO Jetty connector by can be a good idea...but the first thing which should be done is building and testing a valid performance scenario. For example if you plan to support 10000 connected users and to push 1 msg/sec you need to write stress test for that. After that, you can experiment using various connectors/configurations.
There is one tool created by Adobe which can help you with performance testing - it's located here (take a look at the attachments of Adobe LiveCycle Data Services 3 ES2 Performance Brief.pdf). It contains instructions how to configure/run the stress tool. If you cannot manage to run it let me know
Just to give you an example, on my machine (i7 Q820 8gb ram), using the stress tool I was able to handle 10000 connected users.