开发者

Simple Programming Theory Question

开发者 https://www.devze.com 2022-12-17 20:34 出处:网络
Hi guys does anyone know why the programming language C++ is used more widely in biometric security applications compared to the programming language Java?开发者_运维技巧 The answers that I have colle

Hi guys does anyone know why the programming language C++ is used more widely in biometric security applications compared to the programming language Java?开发者_运维技巧 The answers that I have collected so far are 1) Virtual Compilers 2) OpenCV Library provided by C++. Can anyone help with this question??


Maybe it's the hardware support: I wrote an app that uses a fingerprint sensor. The library support for the device is C++, so I wrote the app in C++. Now they have a .NET version, so my next app will be C#.


I don't know specifically about biometric applications, but in general when security is important Java can be a stumbling block. Depending on how the security requirements are written, they can cover things that one must do manually in C++, but which are done automatically by Java. This poses a problem because one would need to demonstrate that Java properly (and in a timely manner!) satisfies the requirement. It is a lot easier to show that these requirements are met in C++ code, because the code the meets the requirement is part of the program in question.

If the security person/requirements/customer make it clear that relying on Java for some security features is acceptable, then this is no big deal. We could go round-and-round about whether or not it is reasonable to rely on/trust Java to satisfy security requirements, it really just depends on the specific security needs.


I am willing to put money on the reason being simply that the access api's for the hardware are written in c++. Most of the modern/higher-level languages are not going to easily communicate with hardware originaly exposed through a C/C++ api.

On a somewhat related note, Vala has all the languages features expected of a modern\high-level language(and then some), but compiles to C binary and source, and can easily make use of any library written in C (not sure about c++). Check it out, I havnt used it much, but its pretty cool.


Implementing a library in C++ provide a lot over java. Once written, C++ library can run on almost any platform (including embedded ones), and can be made available as a native import to a variety of other languages through tools like SWIG. Java can only run on something with enough speed and memory to run a JVM, and the only other Java programs can include the code as a native import. For biometric applications especially I think running on embedded systems would be a large concern, since you could build this into a small sensor.

The more glib answer would be no one wants to wait for your garbage collection cycle to launch the friggen missiles.


You could replace Java with any other language there. Probably it has more to do with the APIs and hardware.

Also, Java is more suited for Web Applications. Its not the best choice for desktop applications.


For some biometric applications, execution speed is crucial.

For instance, let's say you're doing facial recognition for a checkpoint, and Java takes twice the time to run the algorithm that a compiled language like C++ does. That means if you go with Java, either:

  • The checkpoint lines will be twice as long,
  • You'll have to pay to staff twice as many checkpoints, or
  • Your system will do half as good a job at recognizing faces

None of those are usually acceptable options, which makes using Java a non-starter.

0

精彩评论

暂无评论...
验证码 换一张
取 消