GeoNetwork is a server side application that allows you to maintain a geographic referenced metadata catalogue. This means: a search portal that allows to view metadata combined with maps.
The yoga man
Based on Free and Open Source Software, it strictly follows different standards for metadata, from Inspire to OGC. It implements the CSW interface to be able to interact with generic clients looking for data. It also has built-in harvesters to connect to other servers and populate data.
This has allowed GeoNetwork su gran expansión en muchas organizaciones. For example: the geoportal suizo o el brasileño,pasando por el neozelandés. GeoNetwork is the most used open sourced spatial catalog in the world. You can find it in most of the public administrations that use free and open source software.
The catalogue deploys on a java application container (like tomcat o jetty). It works over the Jeeves framework. Jeeves is based on XSLT transformation server library. This allows a powerful development of interfaces, for humans (HTML) or machines (XML). Therefore, it makes metadata from GeoNetwork to be easily accessible by different platforms.
Recently half-refactored to Spring and AngularJS, GeoNetwork has a REST API and an event hook system to make extensions and customizations easier.
Las anotaciones o decoradores sobre el código se han vuelto muy comunes en los últimos tiempos. Permiten al programador añadir información útil extra ya sea para comentar mejor el código o para modificar la forma de compilar/ejecutar una clase concreta. Son una extensión a Java para permitir la programación orientada a aspectos.
We have three types of annotations based on the moment of usage:
Información para el Compilador
Estas anotaciones permiten al compilador indicar si debe o no omitir errores y warnings o qué hacer con ellos. A nada que se haya trabajado con un IDE Java (como eclipse) probably you would have used this type of annotations. For example, you can use usando @Override on a function to indicate that you are overwriting a method defined on a parent class.
This annotation is completely optional, but allows both the compiler and the developer to check that they are indeed overwriting existing hierarchical functionality.
Por ejemplo:
public class Parent {
public void do(){
System.out.println("Parent");
}
}
public class Son extends Parent{
usando @Override
public void do(){
System.out.println("Son");
}
}
Anotaciones en Tiempo de Compilación y Despliegue
These annotations allow the compiler to add extra information about how to generate the code. By adding or modifying functionality from that in the source code you can alter how a class behaves. Also to create new classes (based on a file descriptor), etc …
These annotations will only be visible at this point. They are not compiled to the .class files. Therefore they are not available at runtime.
Anotaciones en Tiempo de Ejecución
You can use this annotations on runtime and they work on a very similar way as an interface.
Veamos directamente un ejemplo de cómo crear una anotación Runtime y cómo se puede utilizar. La anotación MyAnnotation se podrá aplicar a elementos de tipo field, es decir, a atributos de una clase:
When facing high concurrency applications, we often find a number of generic problems. In this article I will focus on the problems of resources (CPU and memory). For now on, I will focus on the most typical and most direct solutions.
When we discover threads and the advantages of parallel processing it can happen that we end up abusing their use. We have a lot of threads (100 ¿? 1000?) simultaneously, and the processor will be jumping from one to another without stopping, not letting them finish, no matter how fast is their real excution. And over time there will be more and more threads only slowing down the process. To the cost of execution of each thread, we must consider also the added cost of creating and destroying threads. It can can become significant when we talk about so many threads at once.
High Concurrency with the Thread Pool Pattern
Threads: the holy grail
En este caso, al primer método al que debemos recurrir es al Patrón Thread Pool . Este patrón consiste en limitar el número de hilos que hay ejecutándose en un momento dado. En vez de crear hilos nuevos, creamos tareas, que esperan apiladas. Así mismo, tendremos un pool de hilos que irán cogiendo esas tareas y ejecutándolas lo más pronto posible. Un ejemplo clásico de este patrón se encuentra en la clase SwingWorker. Si queremos implementar "a mano" este patrón, conviene que le echemos un vistazo a la interfaz ExecutorService.
Si tenemos un hilo en background que está haciendo un uso muy intensivo del procesador, pero no nos importa ralentizar su ejecución, podemos hacer uso del comando sleep ( Thread.sleep (...)) to periodically release the thread processor, allowing other threads to run faster .
This is useful for threads running in maintenance mode, which must be kept running but do not have to respond in real time. Another way to temporarily stop a running thread while another is using the method join ( Thread.Join () ), que hace que un hilo espere hasta que el otro hilo termine. Aunque más útil en caso de que tengamos un hilo claramente más prioritario que otro, no es viable si no podemos tener una referencia al hilo más prioritario desde el menos prioritario para indicarle a qué hilo tiene que esperar.
High Concurrency issues
Pero la alta concurrencia no viene dada sólo por el uso del procesador. Puede ocurrir que varios hilos necesiten acceder a grandes cantidades de información de forma casi simultánea. Estos hilos no sólo estarán repitiendo la información en memoria sino que muchas veces estarán repitiendo todo el proceso de extraer dicha información.
Este problema suele estar resuelto en la mayoría de librerías de acceso a datos (base de datos mayormente). Por ejemplo, podemos encontrarnos con el caso de ehcache , que utiliza hilos para almacenar información ( Thread-Specific Storage Pattern ). This way, access and storage of this information is shared. Thus decreasing both the memory usage required and the processor time required to extract and shape information. As the threads wants to process this information, they will be asking ehcache for the data, which will optimize these hits.
Para mejorar esta solución tenemos las colecciones concurrentes. This allow different threads to use the same objects without any problems of concurrency.
There are more solutions to improve the high turnout (without going into optimizations to the code itself). But those described here are usually good ideas to start.
We use cookies on our website to allow authenticated users to function. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duración
Descripción
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Cookie
Duración
Descripción
VISITOR_INFO1_LIVE
5 months 27 days
A cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface.
YSC
session
YSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages.
yt-remote-connected-devices
never
YouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
yt-remote-device-id
never
YouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
yt.innertube::nextId
never
This cookie, set by YouTube, registers a unique ID to store data on what videos from YouTube the user has seen.
yt.innertube::requests
never
This cookie, set by YouTube, registers a unique ID to store data on what videos from YouTube the user has seen.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Cookie
Duración
Descripción
CONSENT
2 years
YouTube sets this cookie via embedded youtube-videos and registers anonymous statistical data.