Sqlite Optimization: Read only scenario [closed] - sqlite

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I use SQLite for a number of application on the desktop and PDA. Most operations are readonly, as SQLite functions as a data store for reference material in my applications.
Basically, I am looking for suggestions on improving performance in a scenario where you know the access to the data is only read-only.
Maybe via various pragma settings? etc...
SQLite performance is excellent, however on the PDA when you have multiple databases I can see a small performance hit. I dont think this is a problem with SQLite, just the reality of the speed of a PDA. However, having said that, maybe there are ways to improve it.
Good advice and well put. I am hoping for something more specific in telling the engine about what I am doing. For example, telling the engine there will be no multiple writes to the DB, or modifying the cache handling in some way.
However, I am glad you called attention to the "design" aspect of the database as a leading issue.

The standard database performance tips still apply:
Make sure your queries use indexes rather than full table scans
Be as selective as you can in your queries so you aren't pulling unneeded rows from the db
Select only the columns you want

sqlite3_open_v2() with the flag SQLITE_OPEN_READONLY alters the way SQLite handles opportunistic locks no real performance advantages. You could use a pragma cache_size if you are doing lots of reads or depending on the size of the db make an in memory copy of the db using the :memory open option.

You can call sqlite3_open_v2() with the flag SQLITE_OPEN_READONLY. I have no idea if sqlite3 actually uses that to optimize its behavior, or just as way to set the appropriate permissions on the open call it makes to the OS.

Related

Storm real-time processing: What if it goes down? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Storm is a free and open source distributed realtime computation system. It receives streams of data and does processing on it. What if Storm goes down and part of the data never goes through it which means that calculations would not be in sync?
How can Storm solve this problem? If it can't, how could one solve this problem?
A similar question would be: How can I read old data that existed before Storm was added?
How can I read old data that existed before Storm was added?
The data must be stored somewhere (say, HDFS). You write a Spout which accepts data from some transport (say, JMS). Then, you would need to write replay code to read the appropriate data from HDFS, put it on a JMS channel, and Storm would deal with it. The trick is knowing how far back you need to go in the data, which is probably the responsibility of an external system, like the replay code. This replay code may consult a database, or the results of Storm's processing, whatever they may be.
Overall, the 'what if it goes down' question depends on what type of calculations you are doing, and if your system deals with back pressure. In short, much of the durability of your streams are dependent on the messaging/transport mechanism that delivers to Storm.
Example: If you need to simply tranform (xslt) individual events, then there is no real-time failure, and no state issues if Storm goes down. You simply start back up and resume processing.
The system that provides your feed may need to handle the back pressure. Messaging transports like Kafka can handle durable messaging, and allow Storm to resume where it left off.
The specific use case that results in "calculations would not be in sync" would need to be expounded upon to provide a better, more specific answer.

Choose framework [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Im thinking about starting a website project with a framework that will be also a study project for me. To be more exact a biologist kinda site with quite some filters and there is the question also if I should use separate database or flat file for 8 translations for the different species names (the site also has to be international, but just with 3-4 languages). Im thinking hard about which road to take... so I am asking for some constructive inputs please!
Im thinking of yii because of its simplicity, I tried it and it seems to be working smoothly.
Im thinking of symfony2 because it seems to be more advanced and some great websites were built with it, also drupal8 was constructed with it if Im not mistaken... and even if its harder to get going with it if its worth the effort I would do it.
Im thinking of spark, a java mini framework or Eclipse Link as later I plan to make an offline version of this webpage and I hope its not that hard to port it as a standalone java app. But I'm novice in java and hate the java documentations filled with acronyms all the time and supposing that I know those essential steps that are considered to be self evident by experienced java programmers.
I think there is no correct answer to your question. Chosing a framework is a matter of philosophy, and personal preferences. Some people will think that Yii is easier to use and some other will be amazed by symfony capabilities.
If you know a framework, I'll advise you to stick to this one and if you don't check out the basis of each ones and choose the one that seems to fit your need the most.
But at the end if you choose a popular framework (Yii, Symfony, Laravel, ...) you'll be able to achieve your goal.
Personally I like Yii, having never used the others :) For this exact reason I've flagged to close this as not constructive. There is no correct answer to this question.
I would start up a project in each, try and accomplish some common tasks, then decide. Ultimately you'll be able to acheive everything in all those frameworks. The deciding factor will be how fast and how comfortably you can use the frameworks, not how everyone else uses them.
Yii supports multiple databases very easy; Think about this;
All you have to do is create the database and the rest is, easy ...
Just create a simple blog app, and see wich one is the easyest and fastest when developing.

Is there any guides on how to use T4 to generate aspx or ascx? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have a task to generate user controls, I'm wondering if there's any guides on that.
thanks
Disclaimer: The answer is for our experience and for a technology that is published and completely open to use. Based on standards, this is not a product "sell", answers exactly to the question.
We have gotten great experience in both productivity and trivialization aspects (for fields unknown to end-developers) in an XML schema and XML controlled T4 generation.
The idea is that the architect in charge will constrain the development by logical architectural limits.
We have published the technology as completely open; the basic idea is to distribute the entire folder with the schema and the T4 generator(s) to each individual project in fully open source form.
In internal development you can version control branching and merging to update the changes to the templates/abstractions of the controls, so that you can build single distribution.
The very nature of the technology is that the end-developers can customize every aspect they need to by adjusting the generator(s), the schema and the xml contents as appropriate.
And the time return-of-investment is basically negative compared to traditional guidance; you also gain the strict control over the code produced.
You can check out the videos for the way of doing; the example demonstrates trivializing PowerPoint add-in, but the technology is completely open, completely target-platform agnostic.
http://www.youtube.com/view_play_list?p=B3366B17004D5DB9
More info and updates are posted through the blog:
http://abstractiondev.wordpress.com
I'm adding more explaining videos for creating abstractions from scratch. The HelloWorld in its bare simplicity works for focused sample in case either Office/COM Add-In (and its complexity) or CQRS stack is not familiar to you
I would first ask why you need to "generate" user controls. If you need a lot of very similar controls for some reason, couldn't you create one user control that adjusts itself depending on some kind of input parameter?
Assuming that you have a good reason for doing this, though, I can offer the following general T4 advice. Start by writing an example of what you want to generate. Create an actual control like the one you want to generate. If possible, do this as a single file (classic asp style), it will be easier to generate the control as one file than multiples which then have to be associated together inside the project file... very messy. Change the file's extension to .tt, and start factoring out the parts of the example control that need to change form one generated control to the next. Try altering one aspect of the control at a time, generating the output, and comparing against what you expected. Keep changing one thing at a time until the control you started with has become a template to generate controls like the one you started with.
T4 templates only know how to write out a single file. Since you want to create multiple controls, you'll need some extra tools. The T4 Toolbox has what you need to accomplish this, as described here.

Free SWF Obfuscator [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Does anybody know of a free flash obfuscator(protector)? All I can find are commercial ones with free trials. I have done numerous google searches, and have been unable to find what I am looking for.
I know that obfuscators do not make your swf hack proof, but they make things harder.
Things I am looking for in an obfuscator:
Unlimited obfuscations
No time limit
No watermark (or on the left side only! Right side is no good, same with center)
Able to publish work (no special player needed other than standard flashplayer)
I really was surprised to see how hard it was to find a good obfuscator (tried encoder, protection, etc. instead as well) and how easy it is to find a decompiler....
It is imperative that my code be protected, at least partially, to discourage the hacking of my game.
amayeta swfencrypt - http://www.amayeta.com/software/swfencrypt/ <= this one existed for a long time and is up to date
secureSWF http://www.kindisoft.com/secureSWF/download.php <== this one fulfill no time limit, but has watermark
and since actionscript format is very like javascript, you can use online free javascript obfuscator like this one to obfuscate sections of the important code
http://www.javascriptobfuscator.com/Default.aspx
or you can search for more at here http://www.google.com/search?q=obfuscator+javascript
I've found:
http://makc3d.wordpress.com/2010/02/09/open-source-swf-obfuscator/
http://github.com/shapedbyregret/actionscript-3-obfuscator
SOB
All open source, all free. I haven't tried any of them yet.
A coworker did some research on the topic a few months ago, and didn't find any free SWF obfuscators. We ended up picking SWF Encrypt (http://www.amayeta.com/software/swfencrypt/) which seems to do a good job.
OBFU - 1500 euros!
Amayeta SWF Encrypt Pro 5.0 - $125 USD. gets "bypassed" too
SecureSWF - Looks like the most promising right now.
A list of decompilers and obfuscators
Found at http://www.balsamiq.com/blog/2008/10/19/my-views-on-software-piracy/
I found SWFProtect. It looks decent, but You'll have to test it to be sure.
http://www.swfprotect.net/swf2.0/index.php
Update: Amayeta SWF Encrypt Version 4 is now being offered for free.
http://www.amayeta.com/promo/mag/

Which CASE Tools do you use? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Which Computer-aided Software Engineering tools do you use and why? In what ways do they increase your productivity or help you design your programs? Or, in case you do not use CASE tools, what are your reasons for this?
The best CASE tool I had to work with is the Enterprise Architect from Sparx.
It's lightweight comparing to Rose (easier to buy and cheaper too) but extremely powerful. You could do great UML diagrams or database model or anything else you want but in a nice and organised way.
It greatly helps on the initial stages of the elaboration process as you could create domain model, do some preliminary use cases, map them to the requirements and present all of it in a nice way to the customer. It helps me thinking and I re-factor my design with it until I am satisfied enough to start proper documentation.
It is also very good for database models as it could reverse-engineer most databases very neatly.
The only (but quite serious) drawback it has in my eyes is that its documentation generator is, to put it mildly, crap. Getting a proper document from it is almost impossible unless you invest a significant amount of work in the templates and then it would be only OK.
I have used Rational Rose and a few other similar packages in the past. Mostly I have used them for the UML diagram elements and have not gone into the more detailed functionality such as code generation etc.
I mostly use them for aiding the design process and clarifying my own ideas. Often I find that, in trying to come up with a design for a componant, I end up needing to write down / draw what I want to happen so I can get a clear overview in my mind of what needs to happen and why. I have found that in a lot of cases, what I end up trying to draw is essentially the same as a predefined kind of diagram in UML, such as a Use Case Diagram etc. and by then adopting that style, it becomes easier to get my ideas on paper as I have some framework to work within.
So, I use CASE tools principally for thier UML / designing tools at a highish, semi-abstract level.
Oracle Designer
Not using any. No money for them.

Resources