tag:blogger.com,1999:blog-33276612379639728462024-03-13T20:44:35.434-06:00high performance and scalable codeTip's and Trick'sga_chttp://www.blogger.com/profile/04568089492555779828noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-3327661237963972846.post-77224832402587090722020-05-14T19:00:00.001-05:002020-05-14T19:00:12.554-05:00loadrunner http://www.wilsonmar.com/1loadrun.htmga_chttp://www.blogger.com/profile/04568089492555779828noreply@blogger.com0tag:blogger.com,1999:blog-3327661237963972846.post-76862448966863061812020-05-12T12:26:00.002-05:002020-05-12T18:29:44.588-05:00vi, vimhttps://allenan.com/using-the-system-clipboard-with-vim-on-os-x/<br />
<br />
https://stackoverflow.com/questions/253380/how-to-insert-text-at-beginning-of-a-multi-line-selection-in-vi-vim ga_chttp://www.blogger.com/profile/04568089492555779828noreply@blogger.com0tag:blogger.com,1999:blog-3327661237963972846.post-70323748244578561822019-02-21T16:01:00.001-06:002019-02-21T16:01:11.812-06:00las empresas necesitan equipos técnicos integrales mas que desarrolladores, arquitectos ó testers estrellaga_chttp://www.blogger.com/profile/04568089492555779828noreply@blogger.com0tag:blogger.com,1999:blog-3327661237963972846.post-10757912540884849702019-02-21T15:56:00.003-06:002019-02-21T16:02:11.876-06:00la necesidad de Arquitectos en la industria y proyectos de Software y la carencia de diseño orientado a las fuentes de datosga_chttp://www.blogger.com/profile/04568089492555779828noreply@blogger.com0tag:blogger.com,1999:blog-3327661237963972846.post-11007166086721073702017-03-07T09:56:00.000-06:002017-03-07T09:56:04.521-06:00Erlang concurrencyconcurrency oriented language<br />
<br />
BEAM(Bogdan/Björn's Erlang Abstract Machine) is a single OS process<br />
<br />
Erlang process is a unit of concurrent execution<br />
<br />
Scheduler is an OS thread responsible for executing multiple processes<br />
<br />
BEAM uses multiple schedulers to parallelize the work over available CPU cores<br />
<br />
The basic concurrency primitive is called an Erlang processga_chttp://www.blogger.com/profile/04568089492555779828noreply@blogger.com0tag:blogger.com,1999:blog-3327661237963972846.post-18721353702179884192017-03-07T09:43:00.003-06:002017-03-07T09:43:57.432-06:00High availabilty<br />
<ul>
<li>Faul tolerance - A system to keep working when something unforeseen happens. Unexpected errors will happen, bugs will creep in, components might occassionally fail, network connections might drop, even the entire machine where the system is running might crash. Whatever happens, we want to localize the impact of an error as much as possible, recover from the error and keep the system running and providing service.</li>
<li>Scalability - A system should be able to handle any possible load. Of course that we will not busy tons of hardware just in case the entire planet population starts using our system some day. But we must be able to respond to a load increase by adding more hardware resources, without any software intervention. Ideally, this should be possible without a system restart.</li>
<li>Distribution - To make a system that never stops, we have to run it on multiple machines. This promotes the overall stability of the system - if some machines is taken down, another one may take over. Furthermore, this gives us means to scale horizontally - we can address load increase by adding more machines to the system, thus adding more work units to support the higher demand.</li>
<li>Responsiveness - It goes without saying that a system should always be reasonably fast and responsive. Drastic prolongations of request handling shouldn't happen, even if the load increase or unexpected errors happen. In particular, ocassional long tasks shouldn't block the rest of the system, or have a significant effect on its performance.</li>
<li>Live update - In some cases we want to push a new version of our software without restarting any server. For example, in a telephony system, we don't want to disconnect the established calls while upgrading the software.</li>
</ul>
<div>
source: Elixir in Action v8 MEAP-1</div>
ga_chttp://www.blogger.com/profile/04568089492555779828noreply@blogger.com0tag:blogger.com,1999:blog-3327661237963972846.post-5258834402504011932017-02-22T18:52:00.001-06:002017-02-23T09:56:36.204-06:00encode an arbitrary Elixir/Erlang term<br />
<div class="page" title="Page 254">
<div class="layoutArea">
<div class="column">
<span style="font-family: "courier"; font-size: 14.000000pt;">:erlang.term_to_binary/1</span><br />
<span style="font-family: "courier"; font-size: 14.000000pt;"><br /></span>
<span style="font-family: "courier"; font-size: 14.000000pt;">reference: </span><span style="font-family: "courier";"><span style="font-size: 18.6667px;"><a href="http://erlang.org/doc/man/erlang.html">http://erlang.org/doc/man/erlang.html</a></span></span></div>
</div>
</div>
ga_chttp://www.blogger.com/profile/04568089492555779828noreply@blogger.com0tag:blogger.com,1999:blog-3327661237963972846.post-19699058271661899712009-06-19T18:36:00.002-05:002009-06-19T18:38:14.307-05:00despues de buscar como linkear un servidor sql server 2005 por fin pude dar con las instrucciones correctas<div><br /></div><div><div>exec sp_droplinkedsrvlogin @rmtsrvname=N'x.x.x.x',@locallogin=N'sa'</div><div>exec sp_dropserver 'x.x.x.x'</div><div><br /></div><div><br /></div><div>EXEC master.dbo.sp_addlinkedserver @server = N'x.x.x.x', @srvproduct=N'SQL Server'</div><div>EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'x.x.x.x',@useself=N'False',@locallogin=N'sa',@rmtuser=N'sa',@rmtpassword='password'</div><div><br /></div><div><br /></div><div><br /></div></div>ga_chttp://www.blogger.com/profile/04568089492555779828noreply@blogger.com0tag:blogger.com,1999:blog-3327661237963972846.post-88494930809710044922009-06-15T15:02:00.005-05:002009-06-15T17:28:49.266-05:00Una de mis aplicaciones favoritas es <a href="http://docs.blacktree.com/quicksilver/what_is_quicksilver">quicksilver</a> catalogada como application launcher, es gratuita ya que esta en fase beta, conozco otras como <a href="http://googlemac.blogspot.com/2009/01/search-without-effort-quick-search-box.html">quick search box</a> que también es gratuita y una de paga <a href="http://www.obdev.at/products/launchbar/index.html">launch bar</a> si eres usuario mac como yo cualquiera de ellas te será de mucha utilidad.<div><br /></div><div>Agrego algunas ligas de interes <a href="http://mysite.verizon.net/hmelman/QSRef.pdf">Quicksilver Quick Reference</a>, <a href="http://mysite.verizon.net/hmelman/Quicksilver.pdf">Quicksilver User Manual</a>.</div>ga_chttp://www.blogger.com/profile/04568089492555779828noreply@blogger.com0tag:blogger.com,1999:blog-3327661237963972846.post-2783116219175866122009-06-15T13:31:00.002-05:002009-06-15T13:35:59.006-05:00Ahora que tuve la necesidad de utilizar la terminal bash tuve que buscar los shortcuts mas comunes y los encontre en <a href="http://linuxhelp.blogspot.com/2005/08/bash-shell-shortcuts.html">linuxhelp</a>.ga_chttp://www.blogger.com/profile/04568089492555779828noreply@blogger.com0tag:blogger.com,1999:blog-3327661237963972846.post-44262233168454255602008-08-19T07:35:00.000-05:002008-08-28T13:46:01.708-05:00ThreadPool.QueueUserWorkItemSi estas pensando en desarrollar una aplicación con procesamiento en paralelo una de las primeras opciones que deberías evaluar es el thread pool que proporciona el CLR de .net.<div><br /></div><div>Esté es bastante útil sobre todo en escenarios simples o aquellos que no requieren sincronizar resultados y/o threads, el thread pool se encarga de crear y administrar los threads por lo cual no tendremos que agregar toda esta lógica a nuestra aplicación.</div><div>Aunque tiene bastantes ventajas como las ya comentadas también tiene limitantes como por ejemplo no es posible obtener el resultado de un elemento de trabajo como lo veremos mas adelante.</div><div><br /></div><div>Para poder hacer uso del thread pool solo necesitas agregar el namespace System.Threading, crearte un método que cumpla con la firma del delegado System.Threading.WaitCallback y agendar su ejecución invocando el método QueueUserWorkItem del thread pool.</div><div><br /></div><div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">using System;</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">using System.Threading;</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">class test</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">{</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"> public static void Main(String[] args)</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"> {</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"> Console.WriteLine("thread id: " + Thread.CurrentThread.ManagedThreadId);</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"> ThreadPool.QueueUserWorkItem(CallbackMethod);</span></span></div><div><span class="Apple-style-span" style=" ;font-family:'courier new';"><span class="Apple-tab-span" style="white-space:pre"> </span> //...</span><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"> Console.ReadKey(); </span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"> }</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"> private static void CallbackMethod(Object state)</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"> {</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"> Console.WriteLine("thread id: " + </span></span><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">Thread.CurrentThread.ManagedThreadId);</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"><span class="Apple-tab-span" style="white-space:pre"> </span> //...</span></span><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"> }</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">}</span></span></div><div><br /></div><div>Del ejemplo anterior podemos comentar lo siguiente: el thread pool es una clase estática por lo tanto existe solo un thread pool lo cual es una desventaja más.</div><div><br /></div><div><div>QueueUserWorkItem recibe como parámetro un método que debe cumplir con la firma del delegado WaitCallback.</div><div><br /></div><div><span class="Apple-style-span" style=" ;font-family:'courier new';">public delegate void WaitCallback(object state);</span><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></div><div>El método que pasamos como argumento será invocado por el thread pool via delegados y ejecutado en paralelo, decimos que se ejecuta en paralelo porque el thread principal encola nuestro método CallbackMethod que será invocado por otro thread mientras el thread principal continua ejecutando el resto del método Main, las salidas a consola nos ayudan a validar esto último escribiendo el thread id a consola.</div><div><br /></div></div><div>El delegado WaitCallback define un parámetro de tipo Object debido a que nuestro método debe cumplir con esta firma se define dicho parámetro aún cuando no fue utilizado en este ejemplo.</div></div>ga_chttp://www.blogger.com/profile/04568089492555779828noreply@blogger.com0